3D histogram of RGB image

20 ビュー (過去 30 日間)
John Andrew
John Andrew 2015 年 5 月 10 日
コメント済み: Image Analyst 2017 年 9 月 11 日
Hey guys! I'm performing the 3D histogram of RGB image my teacher said me there is a simple and faster way to do all what I'm doing with my code. But I do not find any reference that help me to achieve that.
I want to obtain the image attached. Does anyone knows how?
Thanks!!

採用された回答

Image Analyst
Image Analyst 2015 年 5 月 11 日
I just don't see how hist3 can do it. Despite it's poor choice of a name (in my opinion), it's really a 2D histogram, not a 3D histogram because there are only 2 independent variables. Try my color gamut visualizer program, attached way below, below all the images.
It's a primitive MATLAB version of the really nice one that is an ImageJ plugin.
  4 件のコメント
salma samiei
salma samiei 2017 年 9 月 11 日
Actually, your answer is related to "gamut3D(rIndex, gIndex, bIndex) = gamut3D(rIndex, gIndex, bIndex) + 1;" part. but I am asking why we plus the value of channels with one?! for example, if the value of red channel in row 2, column 1 = 128 we add it with 1 and save 129 in rindex. I hope my question be clear now?
Image Analyst
Image Analyst 2017 年 9 月 11 日
Because indexes can't be zero, but gray levels can. You can't have indexes in the range 0-255, but you can in the range 1-256 so that's why 1 is added to the index.

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

その他の回答 (1 件)

Thomas Koelen
Thomas Koelen 2015 年 5 月 11 日

カテゴリ

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