I'm trying to get the cutting points which were used for creating histogram equalization (by histeq
or in another way), i.e. to get the original pixel values which were used to determine every bin edges.
In order to simplify the following example, I will use 1D matrix:
If the original image is: [ 0.2 , 0.25 , 0.34 , 0.4 , 0.4 , 0.4 , 0.6 , 0.6 , 0.6 ]
and the image after histogram equalization (to 3 bins) is: [ 0.2 , 0.2 , 0.2 , 0.4 , 0.4 , 0.4 , 0.6 , 0.6 , 0.6 ]
how do I get the edges of the 3 bins?
i.e. how do I get the following vector (which represent the cutting points): [0.37 0.5]
?
Thanks a lot !!!
P.S. getting the vector [0.34 0.4]
or [0.4 0.6]
(Respectively, minimum and maximum values to be included in a specific bin after histeq) is also satisfying.