how can i plot a histogram of pixel values?

조회 수: 2 (최근 30일)
sanaz
sanaz 2014년 7월 20일
댓글: sanaz 2014년 7월 21일
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?
  댓글 수: 2
Wayne King
Wayne King 2014년 7월 20일
Did you attach anything?
sanaz
sanaz 2014년 7월 20일
i had but seems like it was not attached, i did again, can you see it now?

댓글을 달려면 로그인하십시오.

채택된 답변

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;
  댓글 수: 3
Image Analyst
Image Analyst 2014년 7월 21일
Yes.
sanaz
sanaz 2014년 7월 21일
i corrected it and got the right answer. thank you very much.

댓글을 달려면 로그인하십시오.

추가 답변 (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