Rationalizing edge detectors