I am trying to write a function for automatic threshold value but I don't know how to get them from histogram.
For example I have this input image:
I convert input image to other color space (HSV) then I split channels and then I print out on histogram all channels H-blue line, S-green line, V-red line.
How would I write a function to get automatic binarization (thresholding values)?