Adjusting test images for better thresholding