How can i perform ratioing of two images?

조회 수: 3 (최근 30일)
aswathy nair
aswathy nair 2013년 3월 5일
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
Walter Roberson
Walter Roberson 2013년 3월 5일
How are you displaying the image ?
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에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by