Almost working binarize.