Thresholding

Working image thresholding.