Smarter binarization (but with naive algorithm)