Tweaking thresholding and edge detection parameters to do better edge detection