How do I compare two images?
显示 更早的评论
Hi,
I am beginner in image analysis. I am doing my studies in physics and I have a task of comparing two images where they appear to be similar but have differences in Dose(gray) and gamma. How can I read these images in matlab and compare the results?
Please help me by guiding me on which functions that would be useful to my given task.
Thank you
回答(3 个)
Matt J
2013-5-16
0 个投票
IMREAD might be applicable, depending on the format the data is in.
Image Analyst
2013-5-17
If the only thing different is the dose and gamma, then you would notice that the histograms are different.
% Display the original gray scale image.
subplot(2, 2, 1);
imshow(grayImage, []);
title('Original Grayscale Image', 'FontSize', fontSize);
% Enlarge figure to full screen.
set(gcf, 'units','normalized','outerposition',[0 0 1 1]);
% Give a name to the title bar.
set(gcf,'name','Demo by ImageAnalyst','numbertitle','off')
% Let's compute and display the histogram.
[pixelCount, grayLevels] = imhist(grayImage);
subplot(2, 2, 2);
bar(pixelCount);
grid on;
title('Histogram of original image', 'FontSize', fontSize);
xlim([0 grayLevels(end)]); % Scale x axis manually.
Then repeat in subplots 3 and 4 for image #2. But they can be similar in lots of ways and different in lots of ways. Which ways do you care about and which do you not care about? What action or decisions would you make if you knew that the shape, or mean, of the histograms were different from each other? Anything? Or are you interested in something entirely different?
1 个评论
Image Analyst
2013-5-17
P.S. See my File Exchange for a few tutorials. http://www.mathworks.com/matlabcentral/answers/contributors/1343420-image-analyst/answers
prashant khati
2015-7-6
0 个投票
how to compare two image in face recognization system
类别
在 帮助中心 和 File Exchange 中查找有关 Contrast Adjustment 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!