Update thresholds and drawContours