StrataQuest Home › StrataQuest Glossary › Laplace filter
BOM Operation

Laplace filter

Bright where intensity curves; zero-crossings trace the edges

View
Definition
The Laplacian of an image is the sum of its second derivatives in x and y, a measure of how the intensity surface curves at each pixel. The filter approximates it with one of two predefined convolutionLoading... kernels, chosen by Kernel size (px): 3×3 (the default) or 5×5. The kernel weights sum to zero, so a uniform region gives no response and only intensity variation survives.
Same response in every direction
Unlike Sobel, which is direction-specific
Zero-crossings trace edge locations
Sign changes locate edges to sub-pixel precision
Pair it with smoothing
Second derivatives are noise-sensitive
Bright dots respond strongly
Useful as a blob detector

The math, in two registers

The continuous 2D Laplacian is ∇²I = ∂²I/∂x² + ∂²I/∂y². A central finite difference approximates each second partial derivative: ∂²I/∂x² ≈ I(x+1, y) − 2I(x, y) + I(x−1, y), and likewise for y. Summing the two gives the 4-neighbor discrete Laplacian:

∇²I(x, y) ≈ I(x+1,y) + I(x−1,y) + I(x,y+1) + I(x,y−1) − 4·I(x, y)

Written as a convolution kernel, this is L₄ = [0, −1, 0; −1, 4, −1; 0, −1, 0]. The 8-neighbor variant L₈ = [−1, −1, −1; −1, 8, −1; −1, −1, −1] adds the diagonals. It is closer to rotationally symmetric and slightly more sensitive to noise.

The Laplacian of Gaussian (LoG) builds the smoothing into the Laplacian. Its analytical form is LoG(x, y; σ) = (−1/πσ⁴) · [1 − (x²+y²)/(2σ²)] · exp(−(x²+y²)/(2σ²)), a center-positive peak inside a negative ring, often called the "Mexican hat." Convolving with the LoG gives the same result as a Gauss filterLoading... with σ followed by Laplace.

Both are linear convolutions, so the Laplacian commutes with the Gaussian: LoG = Gauss(Laplace(I)) = Laplace(Gauss(I)). The order doesn't matter; only the scale does. This commutativity underpins scale-space theory.

Simplified

The Laplace filter applies one simple idea twice. The first derivative of a 1D signal at point x is roughly the signal at x+1 minus the signal at x−1. The second derivative is the first derivative of the first derivative, and it works out to (signal at x+1) − 2×(signal at x) + (signal at x−1): add the two neighbors and subtract twice the center.

Do this along x and along y, add the results, and you have the discrete Laplacian. A pixel among neighbors of similar brightness gives a response near zero. A pixel much brighter than its neighbors gives a large positive response, and a pixel much darker gives a large negative one. The filter is measuring how the intensity curves at each pixel.

Share This Term
Term Connections