GRAYTHRESH(I) computes a global threshold (LEVEL) that can be
used to convert an intensity image to a binary image with IM2BW. LEVEL
is a normalized intensity value that lies in the range [0, 1].
GRAYTHRESH uses Otsu's method, which chooses the threshold to minimize
the intraclass variance of the thresholded black and white pixels.