fixed up removal of edge detections for non-square images