forked from: Otsu thresholding

And now for something completely different...
@see http://www.labbookpages.co.uk/software/imgProc/otsuThreshold.html