# Chapter 4, section 4.2.1. in Szelisky computer vision, is there a mistake?

I've already asked a similar question in mathematics exchange without getting an answer, I read a bit more and I think the question might be more suitable for the signal processing exchange.

Basically I was reviewing my background in edge detection methods and I've found the following statement:

For many applications, however, we wish to think such a continuous gradient image to only return isolated edges, i.e., as single pixels at discrete locations along the edge contours. This can be achieved by looking for maxima in the edge strength (gradient magnitude) in a direction perpendicular to the edge orientation, i.e., along the gradient direction. Finding this maximum corresponds to taking a directional derivative of the strength field in the direction of the gradient and then looking for zero crossing. The desired directional derivative is equivalent to the dot product between a second gradient operator and the result of the first... The gradient dot product with the gradient is called the Laplacian.

I did the calculations but I'm not getting the laplacian, however I've accidentally found this Jim Little - CPSC 505 Example: Laplacian vs Second Directional Derivative, where basically the explanation seems essentially to be "directional derivative and laplacian are different but not that much, so given that taking the laplacian instead of the second directional derivative is less expensive (computationally speaking) we can use the laplacian"

My question is then... is this what Szelisky mean?

The Laplacian is the trace of the Hessian (matrix of second order derivatives), not the second derivative in the gradient direction. Thus the text is wrong. The two are similar, if you don’t care about scaling, but they’re not equivalent and certainly not the same thing.

Although, on second reading and with a lot of kindness, one can interpret

as saying the Laplacian operator is $$[\frac{\partial}{\partial x}, \frac{\partial}{\partial y}] \cdot [\frac{\partial}{\partial x}, \frac{\partial}{\partial y}]$$, which would be correct. If the author means this, they could have expressed it more clearly. But this statement doesn’t match their earlier description of “in the direction of the gradient.” That is not what the dot product does here.

When computing gradients, usually one applies regularization (smoothing) to reduce the effect of noise. This smoothing causes a shift of the location of curved edges. The zero crossings of the Laplacian are therefore shifted. Adding the second order derivative in the gradient direction to the Laplacian corrects for this shift, improving the location accuracy of the zero crossings by an order of magnitude, as described in

P.W. Verbeek and L.J. van Vliet, “On the location error of curved edges in low-pass filtered 2-D and 3-D images”, IEEE Transactions on Pattern Analysis and Machine Intelligence 16(7):726-733, 1994.

This idea is implemented in DIPlib in the functionLaplacePlusDgg. [Disclaimer: I’m an author.]

The 2nd directional is a linear combination of the 2nd derivative in each direction.
The Laplacian is a specific combination as such.
The source you linked indeed specify that in practice it coincide:

• Yes but "in practice" i.e. there's no theoretical equality between the two. Jul 23, 2023 at 3:14
• @user8469759, He went for intuition over formulation.
– Mark
Jul 23, 2023 at 6:35