CV Lab 11 · Module 3 — Edge Detection

Laplacian Edge Detection

Sobel measures the slope of brightness — how fast it's changing. Laplacian measures the slope of the slope — how the rate of change itself is changing. That second derivative doesn't peak at an edge, it crosses through zero exactly at it. That crossing is a razor-precise edge location.

intensity 1st derivative 2nd derivative (Laplacian)
Where the edge actually is Same step edge, three views. Intensity just jumps. The 1st derivative peaks near it — close, but the peak has width. The 2nd derivative crosses zero exactly at the edge — a single, unambiguous location. That's why Laplacian-based detectors talk about "zero-crossings," not "peaks."
Ready.
Pre-blur σ
0 (off)

Click any row on the image to scan that horizontal line and plot Intensity, 1st derivative, and the Laplacian together. Every amber dot on the bottom trace is a genuine zero-crossing — a candidate edge.

Scanline profile
Intensity 1st derivative Laplacian (2nd derivative)

Second derivative, second set of trade-offs

What "second derivative" really means

The 1st derivative (Sobel) answers "how fast is brightness changing here?" The 2nd derivative answers "is that rate of change itself increasing or decreasing?" At the exact middle of an edge, the rate of change stops accelerating and starts decelerating — that inflection is the zero-crossing.

Why it's noisier than Sobel

Differentiating amplifies high-frequency content, and differentiating twice amplifies it twice as aggressively. A single stray noisy pixel that Sobel would barely notice can flip the sign of a Laplacian response entirely — hence the Noise Battle mode, and why LoG exists.

Isotropy — the one thing Laplacian gets for free

Sobel needs two kernels (X and Y) and a magnitude step to respond equally in all directions. The single Laplacian kernel already treats every direction the same by construction — no combining step needed. That symmetry is Laplacian's biggest practical advantage over gradient operators.

Predict, then verify

You apply a plain Laplacian kernel (no pre-blur) to a photo taken on a cheap, grainy sensor at night. What's the most likely result?