Computes the global image threshold using Otsu's method by minimizing the
histogramCounts : is the histogram data of the image, that can be calculated
using `imhist` function.
total: is the total number of pixels that can be counted using the
ll : is the level of the global threshold in [0 1]
consider the grayscale image is Ig