start of recursive binarization