changed pixel discarded threshold to 1 pixel