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 Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by