Download presentation
1
Edge Detection Phil Mlsna, Ph.D. Dept. of Electrical Engineering
Northern Arizona University
2
Some Important Topics in Image Processing
Contrast enhancement Filtering (both spatial and frequency domains) Restoration Segmentation Image Compression etc. EE 460/560 course, Fall 2003 (formerly CSE 432/532) Edge Detection uses spatial filtering to extract important information from a scene.
3
Types of Edges Physical Edges Image Edges
Different objects in physical contact Spatial change in material properties Abrupt change in surface orientation Image Edges In general: Boundary between contrasting regions in image Specifically: Abrupt local change in brightness Image edges are important clues for identifying and interpreting physical edges in the scene.
4
Goal: Produce an Edge Map
Original Image Edge Map
5
Edge Detection Concepts in 1-D
Edges can be characterized as either: local extrema of zero-crossings of
6
Continuous Gradient But is a vector.
We really need a scalar that gives a measure of edge “strength.” This is the gradient magnitude. It’s isotropic.
7
Classification of Points
Let points that satisfy be edge points. PROBLEM: T Non-zero edge width Stronger gradient magnitudes produce thicker edges. To precisely locate the edge, we need to thin. Ideally, edges should be only one point thick.
8
Practical Gradient Algorithm
Compute for all points. Threshold to produce candidate edge points. Thin by testing whether each candidate edge point is a local maximum of along the direction of . Local maxima are classified as edge points.
9
Cameraman image Thresholded Gradient Thresholded and Thinned
10
Directional Edge Detection
Horizontal operator (finds vertical edges) Vertical operator (finds horizontal edges) finds edges perpendicular to the direction
11
Horizontal Difference
Directional Examples Horizontal Difference Operator Vertical Difference Operator
12
Discrete Gradient Operators
Pixels are samples on a discrete grid. Must estimate the gradient solely from these samples. STRATEGY: Build gradient estimation filter kernels and convolve them with the image. Two basic filter concepts First difference: Central difference:
13
Simple Filtering Example in 1-D
Convolving with [ ] [ 0]
14
Simple Filtering Example in 1-D
Convolving with [ ] [ 0 0]
15
Simple Filtering Example in 1-D
Convolving with [ ] [ ]
16
Simple Filtering Example in 1-D
Convolving with [ ] produces: [ ]
17
Gradient Estimation 1. Create orthogonal pair of filters,
2. Convolve image with each filter: 3. Estimate the gradient magnitude:
18
Roberts Operator Small kernel, relatively little computation
First difference (diagonally) Very sensitive to noise Origin not at kernel center Somewhat anisotropic
19
Noise Noise is always a factor in images.
Derivative operators are high-pass filters. High-pass filters boost noise! Effects of noise on edge detection: False edges Errors in edge position Key concept: Build filters to respond to edges and suppress noise.
20
Prewitt Operator Larger kernel, somewhat more computation
Central difference, origin at center Smooths (averages) along edge, less sensitive to noise Somewhat anisotropic
21
Sobel Operator 3 x 3 kernel, same computation as Prewitt
Central difference, origin at center Better smoothing along edge, even less sensitive to noise Still somewhat anisotropic
22
Discrete Operators Compared
Original Roberts
23
Roberts Prewitt
24
Prewitt Sobel
25
T = 5 T = 10 Roberts T = 40 T = 40 T = 20
26
Continuous Laplacian This is a scalar. It’s also isotropic.
Edge detection: Find all points for which No thinning is necessary. Tends to produce closed edge contours.
27
Discrete Laplacian Operators
Origin at center Only one convolution needed, not two Can build larger kernels by sampling Laplacian of Gaussian
28
Laplacian of Gaussian (Marr-Hildreth Operator)
Let: Then:
29
LoG Filter Impulse Response
30
LoG Filter Frequency Response
31
Laplacian of Gaussian Examples
32
LoG Properties One filter, one convolution needed
Zero-crossings are very sensitive to noise (2nd deriv.) Bandpass filtering reduces noise effects Edge map can be produced for a given scale Scale-space or pyramid decomposition possible Found in biological vision!! Practical LoG Filters: Kernel at least 3 times width of main lobe, truncate Larger kernel more computation
33
Summary Edges can be detected from the derivative:
Extrema of gradient magnitude Zero-crossings of Laplacian Practical filter kernels; convolve with image Noise effects False edges Imprecise edge locations Correct filtering attempts to control noise Edge map is the goal
34
Questions?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.