How can i perform ratioing of two images?

6 次查看(过去 30 天)
I have two images of different wavelength and i want to know the difference in the two images. Simply dividing gives me a dark image. So is there any way to divide the image which give a ratio image from which we can interpret any changes in the images due to change in wavelength.

回答(2 个)

Walter Roberson
Walter Roberson 2013-3-5
编辑:Walter Roberson 2013-3-5
You could imagesc() the result of the division.
Also, make sure that you convert the images to floating point before doing the division, as dividing integer data types is going to give you an integer data type as an answer.
Would it possibly make more sense to subtract than to divide?

aswathy nair
aswathy nair 2013-3-5
Thanks Walter for the response. when i made it floating point the image after division was brighter.But am nt yet near the result. Actually i want to take the ratio of two intensities of these two images at each and every pixel . So i thought of dividing the pixel value and then pseudolored. How can we give psuedolor according to the different range of ratios that we get after dividing. jst givivg colormap(jet) is not working
  3 个评论
aswathy nair
aswathy nair 2013-3-13
the two images that i want to divide is not that exact. Its bit shifted due to different timings. I hope i have to go for image registration before division. So is there any way that i can generate control points automatically. I can paste an example.
base = imread('westconcordorthophoto.png');
unregistered = imread('westconcordaerial.png');
iptsetpref('ImshowAxesVisible','on');
imshow(unregistered);
load westconcordpoints
tform = cp2tform(input_points, base_points, 'projective');
registered = imtransform(unregistered, tform,...
'FillValues', 255);
figure; imshow(registered);
hold on;
h = imshow(base, gray(256));
set(h, 'AlphaData',0.5);
[registered2 xdata ydata] = imtransform(unregistered, tform,...
'FillValues', 255);
figure; imshow(registered2, 'XData', xdata, 'YData', ydata);
hold on;
h = imshow(base, gray(256));
set(h, 'AlphaData', 0.5);
Here the control points are loaded(westconcordpoints). But these points cnnot be used in other images. Is ther any way to use the same control points in every images that i upload in order to make the program work. Or can you suggest any other way to make the images alike. Ihope u understood what i really want to do?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Display Image 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by