working otsu's binarization method