Professional Documents
Culture Documents
Luminance and second order derivative. Noisy luminance and second order derivative.
Why edges?
How do edges look in practice?
Ideal models:
• Linear:
- Differentiation
- High-pass filtering
- Matching with model patterns
• Non-linear:
- Fitting of parameterized edge models
- Non-linear diffusion
• Common approach:
1. Detect edge points
2. Link these to polygons
3. Abstraction: Fit to model (straight lines, splines, ellipses )
• Attributes:
- Position
- Orientation
- Strength
- Diffuseness (width)
• Problems: • Most methods are gradient based
- Noise • Detection of maxima of gradient
- Interference (nearby structures at different scales) • Detection of zero crossings of second derivative
- Physical interpretation • Edge pixels need to be connected together to get to a se-
quence of edge points (edge linking)
DD2422 BILDAT DD2422 BILDAT
The gradient
Question?
Gradient
Gradient
Magnitude
Basic edge detection
• Advantages:
- Closer to mechanisms of visual perception
- One parameter only (size of the filter)
- No threshold
- Produces closed contours
• Disadvantages:
- Is more sensitive to noise (usage of second derivative)
- No information on the orientation of the contour
• Combination of gradient and contour:
- Search for zero-crossings of the Laplacian in the neighbor-
hood of local maxima of the gradient
DD2422 BILDAT DD2422 BILDAT
Zero crossings Detecting Edges by Matching
• Zero-crossings of ∇2(Gaussian)
• Motivation:
- Gaussian function best compromise between detection and
localization.
- Intensity change = Peak in 1st derivative =
Zero-crossing in 2nd derivative
- Rotational invariance ⇒ choose ∇2
• Detect zero-crossings in the result of convolving f by
x2 + y2 − 2t
∇2 g(x, y;t) = √ g(x, y;t) Marr/Hildreth edge detection is based on the zero-crossings of the Laplacian
t2 of the Gaussian operator applied to the image for various values of sigma, the
standard deviation of the Gaussian. Image shows a mosaic of zero-crossings
1 − x2 +y2
g(x, y;t) = e 2t for four choices of sigma:1, 2, 3 and 4.
2πt
DD2422 BILDAT DD2422 BILDAT
DD2422 BILDAT DD2422 BILDAT
Canny example
Gaussian smoothing
Gradient orientation
Non-maximum suppression
Ln̄n̄ = (cos ∂x + sin ∂y )2 L = cos2 αLxx + 2 cos α sin αLxy + sin2 αLyy
Directional derivative in gradient direction: L2 2Lx Ly Ly2
= q x Lxx + q Lxy + q Lyy
Lx Ly Lx2 + Ly2 Lx2 + Ly2 Lx2 + Ly2
∂n̄ = q ∂x + q ∂y
Lx2 + Ly2 Lx2 + Ly2 (Lx2 Lxx + 2Lx Ly Lxy + Ly2 Lyy )
= q =0
Lx2 + Ly2
Denote:
• Since denominator is irrelevant, edges are given by
Lx Ly
∂n̄ L = Ln̄ = q Lx + q Ly Lx2 Lxx + 2Lx Ly Lxy + Ly2 Lyy = 0
Lx2 + Ly2 2 2
Lx + Ly
Lx3 Lxxx + 3Lx2 Ly Lxxy + 3Lx Ly2 Lxyy + Ly3 Lyyy ≤ 0
Summary
Readings