Ameliorated algorithm - constrast is increased before thresholding