I have a RGB image which i converted into HSV color model. Then I have extracted the V- component. I draw simple histogram of this V-component. Now i wanted to divide this created histogram in such 8 part where each partition should have the same ent

6 ビュー (過去 30 日間)
I have a RGB image which i converted into HSV color model. Then I have extracted the V- component. I draw simple histogram of this V-component. Now i wanted to divide this created histogram in such 8 part where each partition should have the same entropy. Or if not 8 then number of partition must be same.
  2 件のコメント
Fahad Mairaj
Fahad Mairaj 2018 年 3 月 27 日
would you plz share your code? this will be helpful for me.
Im_possible_woman
Im_possible_woman 2018 年 4 月 15 日
Hello @sumit kumar, could you please share the codes of RGB image which is converted into HSV color model. Then have extracted the V- component? I really hope that you can help me to share the codes and respond me.

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

採用された回答

Image Analyst
Image Analyst 2016 年 11 月 15 日
Compute the histogram. Then compute the entropy in each bin: sum(p*log(p)). Then compute the CDF of the entropy array using cumsum(). Then split it at the 1/8, 2/8, 3/8, etc. points to find out what gray levels give you the eight part splitting that you seek.
  2 件のコメント
sumit kumar
sumit kumar 2016 年 11 月 15 日
Thank you sir. One more thing by entropy array do you mean that when i am calculating entropy for each bin then each value must be stored in an array and that array is called entropy array.?????/
sumit kumar
sumit kumar 2016 年 11 月 16 日
can you elaborate. if i apply sum(p*log(p)) then i will get single entropy for entire image? Secondly how can i proceed to divide in 1/8 2/8 3/8...... please explain this a bit. Thank you

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

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 11 月 15 日
You could use quantile
  3 件のコメント
Walter Roberson
Walter Roberson 2016 年 11 月 15 日
It is part of the Statistics and Machine Learning Toolbox
Walter Roberson
Walter Roberson 2016 年 11 月 15 日
Though I am not sure what you mean by "have the same entropy" with respect to a portion of a histogram?

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

カテゴリ

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