How does the imhist function work for RGB image?

2 ビュー (過去 30 日間)
John Doe
John Doe 2020 年 5 月 30 日
編集済み: John Doe 2020 年 5 月 30 日
Hello everyone.
I looked up the use of imhist function. It plots the histogram for a grayscale image. But if the input is an RGB image, it still produces a histogram? Is it converting the RGB to grayscale and then showing the histogram?
And would it be technically correct to show the histogram for a RGB image this way? Thanks in advance!

採用された回答

Image Analyst
Image Analyst 2020 年 5 月 30 日
編集済み: Image Analyst 2020 年 5 月 30 日
Did you try to look at the source code
>> edit imhist.m
Also, see attached demo. You might like it.
  2 件のコメント
John Doe
John Doe 2020 年 5 月 30 日
Thanks for the prompt answer, Image analyst.
So, should I go for color histograms in case of RGB image or should I use the default imhist function? imhist shows a colorbar in graytone for RGB image. I just want to be technically correct here.
John Doe
John Doe 2020 年 5 月 30 日
編集済み: John Doe 2020 年 5 月 30 日
I checked the source code. I think it's performing operation determining the class (uint8/logical) etc.

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

その他の回答 (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