Implement blurring and thresholding.