How does the imhist function work for RGB image?

5 vues (au cours des 30 derniers jours)
John Doe
John Doe le 30 Mai 2020
Modifié(e) : John Doe le 30 Mai 2020
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!

Réponse acceptée

Image Analyst
Image Analyst le 30 Mai 2020
Modifié(e) : Image Analyst le 30 Mai 2020
Did you try to look at the source code
>> edit imhist.m
Also, see attached demo. You might like it.
  2 commentaires
John Doe
John Doe le 30 Mai 2020
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 le 30 Mai 2020
Modifié(e) : John Doe le 30 Mai 2020
I checked the source code. I think it's performing operation determining the class (uint8/logical) etc.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by