フィルターのクリア

what does a histogram represent of a image ?

5 ビュー (過去 30 日間)
Farjana Yeasmin
Farjana Yeasmin 2014 年 12 月 28 日
コメント済み: Image Analyst 2014 年 12 月 30 日
What is the x axis and y axis in a histogram of a image. how does it work ?

採用された回答

Image Analyst
Image Analyst 2014 年 12 月 28 日
The x axis is the gray level (intensity, brightness) of the image. The y axis is the count of how many pixels in the image have the gray level. It's often useful to look at the histogram to figure out how to threshold the image to create a binary image of foreground and background objects so that you can do connected components labeling and measurement of various characteristics with the regionprops() function.
  3 件のコメント
Farjana Yeasmin
Farjana Yeasmin 2014 年 12 月 30 日
Is the ans is approved for both RGB and gray scale image ?
Image Analyst
Image Analyst 2014 年 12 月 30 日
Yes. Normally you'd take the histogram of each color channel separately.
% Extract the individual red, green, and blue color channels.
redChannel = rgbImage(:, :, 1);
greenChannel = rgbImage(:, :, 2);
blueChannel = rgbImage(:, :, 3);
% Now take histograms of the individual color channels.
[countsR, grayLevelsR] = imhist(redChannel);
[countsG, grayLevelsG] = imhist(greenChannel);
[countsB, grayLevelsB] = imhist(blueChannel);

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeHistograms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by