Professional Documents
Culture Documents
Filtering and Edge Detection 2
Filtering and Edge Detection 2
viewpoint Vanishing
line
Vanishing Vanishing
point point
depth discontinuity
illumination discontinuity
Source: D. Hoiem
Slide partially based on Stanford U. CS131
Depth discontinuity
Source: D. Hoiem
Slide partially based on Stanford U. CS131
Source: D. Hoiem
Slide partially based on Stanford U. CS131
Backward
Forward
Central
• Forward: [-1 1 0]
• Central: [1 0 -1]
The gradient vector points in the direction of most rapid increase in intensity
edges correspond to
extrema of derivative
(we will develop techniques to
Slide partially based on Stanford U. CS131 localize them)
METU Lecture 5 - 36 CNG 483
Finite differences: example
• Which one is the gradient in the x-direction? How about y-direction?
Original Gradient
Image magnitude
x-direction y-direction
Intensity
Gradient
Source: D. Hoiem
Slide partially based on Stanford U. CS131
Where is
the edge?
f*g
* [1 0 -1] =
2D-gaussian x - derivative
x-direction y-direction
• original image
Slide partially based on Stanford U. CS131
x-direction y-direction
Source: J. Hayes
Slide partially based on Stanford U. CS131
Source: J. Hayes
Slide partially based on Stanford U. CS131
Before
Slide partially based on Stanford U. CS131
After
METU Lecture 5 - 71 CNG 483
Canny edge detector
• Suppress Noise
• Compute gradient magnitude and direction
• Apply Non-Maximum Suppression
– Assures minimal response
• Use hysteresis and connectivity analysis to
detect edges
Range of (angle) is 90
• Step 4: Find the line candidetes (i.e. value(s) of (P, θ)) where A[P, Q] is maximum or
above threshold. (For Line Detection!)