



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Pradeep Sen Advanced Graphics Lab
Class 9 February 23, 2009
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Announcements
ย HW2 will be posted today
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Last time
ย Linear filters and Fourier transforms
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Today
ย Edge detection
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Edge detection
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Noise
ย Noise can affect edge detection algorithms because they look for sharp changes in the image, and noise creates these sharp changes were none exist ย One common model for noise is additive stationary Gaussian noise
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Additive stationary Gaussian noise
ย Each pixel has a value chosen from a Gaussian probability distribution added to it
ย The probability distribution of all pixels are the same
ย The Gaussian distribution has a given standard deviation ฯ and a mean ฮผ, typically which is zero
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Example
ฯ = 1/256 ฯ = 4/256 ฯ = 16/
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Problems with noise model
ย Allows for negative pixel values
ย Every pixel is independent, does not allow for noise correlation across pixels
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Finite difference filters on noisy images
ย By applying a finite difference โderivativeโ filter to itself, we can generate a whole family of derivative filters ย However, these filters increase the standard deviation of the Gaussian noise
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Increasing standard deviation
Original ฯ = 4/256^ ฮผ^ = 0^3
rd (^) derivative 6 th (^) derivative
derivative
standard deviation
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Smooth to reduce noise
ย So we must smooth the signal to reduce the noise problems ย We typically use a Gaussian to do thisโฆ
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Example
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Bad behavior
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Gradient-based edge detectors
ย Compute the image gradient
ย From this, calculate the magnitude of the gradient at every pixel
ย Identify points where the magnitude is maximal in the direction perpendicular to the edge (in direction of gradient)
ย Label these as โedge pixelsโ
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Gradient magnitude
original Gradient magnitude after filtering with Gaussian with ฯ = 1 Gradient magnitude after filteringwith Gaussian with ฯ = 2
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Non-maximum suppression
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Edge following
ย During non-maximum suppression we determine: ย Is a given point an edge point?
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Hysteresis
ย We use two different thresholds:
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Implementation
ย We now look at the details of implementing a gradient-based edge detection algorithm ย Perhaps the best known is the Canny edge detector, introduced in 1986
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Canny Edge Detector
ย Canny, J. โA computational approach to edge detection,โ IEEE Trans. Pattern Analysis and Machine Intelligence, 8: 679 โ 714, 1986
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Cannyโs goals
ย Good detection โ the algorithm should mark as many real edges in the image as possible ย Good localization โ the edges marked should be close to the true edges ย Minimal response โ the edges should only be marked once and image noise should be suppressed
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Step 1 โ Noise reduction
ย Convolve with a Gaussian to reduce noise
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Example
source: wikipedia
ย Applying a 5x5 Gaussian kernel to an image
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Step 4 โ Tracing edges
ย Follow the edge (perpendicular to the gradient) from identified points and determine if those pixels are also part of the edge
ย Use a lower threshold than before
ย This is the application of hysteresis
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Canny edge detector results
source: wikipedia
ECE516 / CS532 Computer Vision Pradeep Sen Class 9 โ February 23, 2008
Reading
ย Forsyth, Ch 8