produce low res image for use of approximate segmentation
changed the image input method and other cleanup
finds bounds on margin