how can i plot a histogram of pixel values?

2 次查看(过去 30 天)
i'm working on a simulation and it contains a histogram of pixel differences for original image and marked one. but i do not understand this plot (that comes in attachment). can anybody please review it and guide me on that?

采纳的回答

Image Analyst
Image Analyst 2014-7-20
编辑:Image Analyst 2014-7-20
Your plot shows that there is a pixel-to-pixel difference (same location) of anywhere from -4 to +0.5 gray levels.
diffImage = double(image1) - double(image2);
minValue = min(diffImage(:));
maxValue = max(diffImage(:));
edges = linspace(minValue, maxValue, 500); % 500 bins
counts = histc(diffImage(:));
plot(edges, counts, 'b-');
grid on;

更多回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by