MATLAB Answers

What does 'imfuse' exactly do and how does it differ from 'imadd'?

64 ビュー (過去 30 日間)
cniv_we
cniv_we 2017 年 12 月 15 日
Edited: Michal Dobai 2017 年 12 月 15 日
I know imfuse creates a composite image from two images and I got the result I wanted. However, I do not know how imfuse does exactly work.
- What kind of transformation function does it use? Wavelet? Fourier? I couldn't find any information regarding this on MATLAB.
- Also, if I understand correctly, does imadd only add two images (or matrices) -let's say A and B- in normal way? i.e. pixel i in image A has RGB vector [0 30 12] and pixel i in image B has RGB vector [15 2 13], then by using C = imadd(A,B) would create pixel i = [15 32 25] in image C. Is that correct?

  0 件のコメント

サインイン to comment.

採用された回答

Michal Dobai
Michal Dobai 2017 年 12 月 15 日
編集済み: Michal Dobai 2017 年 12 月 15 日
imfuse can combine input images in several different ways. You can select one of them by setting method argument. Default method is 'falsecolor'.
This method converts both images to gray-scale and scale values of pixels the way, that darkest pixel is represented by 0 and brightest by value of 1. You can choose scaling mode by argument Scaling. Default mode is independent. That means both images are scaled separately. You can also choose 'joint' scaling, when only one darkest an one brightest value is chosen for both images, as if they were together in the same image. By setting Scaling to 'none' you can turn off scaling completely.
Each gray-scale image is then put into different color channel ( green-magenta by default).
All of this is described quite well in documentation . If you need some specific low-level implementation details, you can always read source code in imfuse.m located here: fullfile(matlabroot,'toolbox','images','images','imfuse.m').
---
As for imadd, it pretty much does what you described. One more thing, though:
"If X and Y are integer arrays, elements in the output that exceed the range of the integer type are truncated, and fractional values are rounded."
Again, whole functionality is described in documentation , even with some nice examples.

  0 件のコメント

サインイン to comment.

More Answers (0)

サインイン してこの質問に回答します。


Translated by