# 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

3 views (last 30 days)
sumit kumar on 15 Nov 2016
Commented: Im_possible_woman on 15 Apr 2018
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 CommentsShowHide 1 older comment
Im_possible_woman on 15 Apr 2018
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 on 15 Nov 2016
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 CommentsShowHide 1 older comment
sumit kumar on 16 Nov 2016
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

### More Answers (1)

Walter Roberson on 15 Nov 2016
You could use quantile
Walter Roberson on 15 Nov 2016
Though I am not sure what you mean by "have the same entropy" with respect to a portion of a histogram?