# Numerical optimization method for optimal edge detector

John Canny, in his paper "A Computational Approach to Edge Detection" (PDF), finds the expression of an optimal edge detector by first using an analytical approach (Euler-Lagrange equation). The coefficients of the solution still undetermined, a numerical optimization method is used to determine these coefficients. But the paper only provides a table of example values without any mention of the method used to calculate the coefficients.

I am trying to find optimal detectors for several profiles based on Canny's approach in this paper, but now I find myself unable to make any progress because of the lack of information on the method used.

Do you have an idea about the numerical optimization method used to calculate the coefficients? Any resources to read, details or just a simple description of this method would be very helpful.

• Welcome to SE.SP! What's wrong with just looking at Canny's reference 15: D. G. Luenberger, Introduction to Linear and Non-Linear Programming. Reading, MA: Addison-Wesley, 1973. Most of Luenberger's books explain penalty methods for solving constrained optimization problems.
– Peter K.
Commented May 27, 2022 at 1:06
• @PeterK. Penalty methods seem to be an efficient way to solve the problem. Still the approach is not really explicit. The objective function to maximize (SNR*Localization) involves several integrals which may be calculated analytically or numerically, the last one might introduce errors. Another way to look at it is by doing constrained optimization of the function solution to the differential equation derived from the Euler-Lagrange equation, without giving the expression of the function, which seems pretty complicated to implement. Commented May 29, 2022 at 17:27
• Without any explicit examples, I'm at a loss. Canny describes how he does it for the different example edge types (ridge and roof) in the linked paper. I'd just use a symbolic math package (e.g. Wolfram Alpha or Matlab's) to solve for those analytically and then just apply your favorite numerical optimization approach (e.g. Matlab or Python).
– Peter K.
Commented May 29, 2022 at 20:59
• Another approach to optimal edge detection by learning dsp.stackexchange.com/questions/43172.
– Royi
Commented Jul 20, 2023 at 6:30