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
Matt J 2013-5-16

0 个投票

IMREAD might be applicable, depending on the format the data is in.
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?
prashant khati
prashant khati 2015-7-6

0 个投票

how to compare two image in face recognization system

Community Treasure Hunt

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

Start Hunting!

Translated by