The transition method for binarization