ir_threshold_with contour