Fix img_thresh ref