Otsu's method implementation done.