Uploading Otsu's method implementation.