Defect thresholding (using a good test image)