In "A Computational Approach to Edge Detection", John Canny explains that the optimal "detector" for finding step edges profiles in an image via convolution is a non-closed-form function closely approximated by the first derivative of a Gaussian. He derives this by defining "optimal" as the function which maximizes the product of signal-to-noise ratio and localization (ability to detect the edges at the right location), as well as another criteria concerning multiple responses.
On p.5 of the paper, he also shows in a picture the optimal detectors, under that those criteria, for ridge and roof profiles, which also look Gaussian-ish in shape.
I'd like to compute the optimal detector for other, arbitrary profiles. Unfortunately, I'm not quite well-versed in numerical optimization enough to figure out how to do that based on the formulas in the paper, and I'm not able to find any resources that explains how to do so explicitly. Does anyone know of a guide or an implementation that will do that - finding the optimal detector for an arbitrary feature in an noisy image?