Edge ¡Detec)on ¡
CSE ¡576 ¡ Ali ¡Farhadi ¡
Many ¡slides ¡from ¡Steve ¡Seitz ¡and ¡Larry ¡Zitnick ¡
Edge Detec)on CSE 576 Ali Farhadi Many slides from - - PowerPoint PPT Presentation
Edge Detec)on CSE 576 Ali Farhadi Many slides from Steve Seitz and Larry Zitnick Edge ABneave's Cat (1954) Origin of edges surface normal discontinuity depth
Many ¡slides ¡from ¡Steve ¡Seitz ¡and ¡Larry ¡Zitnick ¡
ABneave's ¡Cat ¡(1954) ¡ ¡
depth discontinuity surface color discontinuity illumination discontinuity surface normal discontinuity
image ¡ intensity ¡func)on ¡ (along ¡horizontal ¡scanline) ¡ first ¡deriva)ve ¡ edges ¡correspond ¡to ¡ extrema ¡of ¡deriva)ve ¡
The gradient direction is given by:
How does this relate to the direction of the edge?
The edge strength is given by the gradient magnitude
How would you implement this as a filter?
1 ¡
2 ¡
1 ¡
0 ¡ 0 ¡ 0 ¡ 1 ¡ 2 ¡ 1 ¡
Where is the edge?
Source: ¡D. ¡Forsyth ¡
Where is the edge?
Look for peaks in
g dx d f ∗
f
g dx d
Source: ¡S. ¡Seitz ¡
How can we find (local) maxima of a function?
x-‑direc)on ¡ y-‑direc)on ¡
Laplacian of Gaussian
Where is the edge? Zero-crossings of bottom graph
is the Laplacian operator: Laplacian of Gaussian Gaussian derivative of Gaussian
smoothed (5x5 Gaussian)
smoothed – original
(scaled by 4, offset +128)
Why does this work?
Laplacian of Gaussian Gaussian delta function
Analysis ¡and ¡Machine ¡Intelligence, ¡8:679-‑714, ¡1986. ¡ ¡
Source: ¡L. ¡Fei-‑Fei ¡
norm of the gradient
thresholding
thinning (non-maximum suppression)
5 3 4 1 6 3 1 3 2 4 5 7 5 4 6 4 6 2 3 7 Picture ¡from ¡Prem ¡K ¡Kalra ¡
X-‑Deriva)ve ¡of ¡Gaussian ¡ Y-‑Deriva)ve ¡of ¡Gaussian ¡ Gradient ¡Magnitude ¡
Canny with Canny with
The choice of depends on desired behavior
How can we detect lines ?
x y m b m0 b0
image space Hough space
x y m b
image space Hough space – A: the solutions of b = -x0m + y0 – this is a line in Hough space
x0 y0
¡ ¡ ¡ ¡for ¡θ ¡= ¡0 ¡to ¡180 ¡ ¡ ¡ ¡ ¡ ¡H[d, ¡θ] ¡+= ¡1 ¡
hBp://www.cs.utah.edu/~vpegorar/courses/cs7966/ ¡
hBp://www.cs.utah.edu/~vpegorar/courses/cs7966/ ¡
¡ ¡ ¡H[d, ¡θ] ¡+= ¡1 ¡
– give ¡more ¡votes ¡for ¡stronger ¡edges ¡
– change ¡the ¡sampling ¡of ¡(d, ¡θ) ¡to ¡give ¡more/less ¡resolu)on ¡
– The ¡same ¡procedure ¡can ¡be ¡used ¡with ¡circles, ¡squares, ¡or ¡any ¡other ¡ shape, ¡How? ¡