Add threshold before cropping