Bài giảng Nhập môn thị giác máy tính - Chapter 7: Edge detection - Lê Thanh Hải

Chapter 7 – Edge Detection  
7-1  
Chapter 7  
Edge Detection  
Prof. Fei-Fei Li, Stanford Univers ity  
Department of Mechatronics  
Chapter 7 – Edge Detection  
7-2  
Contents  
Edge detection  
• Canny edge detector  
Department of Mechatronics  
ge Detection  
7-3  
(A) Cave painting at Chauvet, France, about 30,000 B.C.;  
(B) Aerial photograph of the picture of a monkey as part of the Nazca Lines geoplyphs, Peru, about 700  
– 200 B.C.;  
(C) Shen Zhou (1427-1509 A.D.): Poet on a mountain top, ink on paper, China;  
(D) Line drawing by 7‐year old I. Lleras (2010 A.D.).  
Department of Mechatronics  
Chapter 7 – Edge Detection  
7-4  
We know edges are special from human  
(mammalian) vision studies  
Department of Mechatronics  
Chapter 7 – Edge Detection  
7-5  
Walther, Chai, Caddigan, Beck & Fei-‐Fei, PNAS, 2011  
Department of Mechatronics  
Chapter 7 – Edge Detection  
7-6  
Edge detection  
• Goal: Identify sudden changes  
(discontinuities) in an image  
– Intuitively, most semantic and shape  
information from the image can be  
encoded in the edges  
– More compact than pixels  
• Ideal: artist’s line drawing (but  
artist is also using object ‐ level  
knowledge)  
Source: D. Lowe  
Department of Mechatronics  
Chapter 7 – Edge Detection  
7-7  
Origin of Edges  
surface normal discontinuity  
depth discontinuity surface  
color discontinuity  
illumination discontinuity  
• Edges are caused by a variety of factors  
Department of Mechatronics  
Chapter 7 – Edge Detection  
7-8  
Characterizing edges  
• An edge is a place of rapid change in the image intensity  
function  
intensity function  
image  
(along horizontal scanline)  
first derivative  
edges correspond to  
extrema of derivative  
Department of Mechatronics  
Chapter 7 – Edge Detection  
7-9  
Image gradient  
• The gradient of an image:  
The gradient points in the direction of most rapid increase in intensity. 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  
Source: Steve  
Seitz  
Department of Mechatronics  
Chapter 7 – Edge Detection  
7-10  
Differentiation and convolution  
• We could approximate this  
• Recall, for 2D function,  
as  
f(x,y):  
f x , y f x, y   
f x , y f x , y   
   
   
f  
x  
f  
x  
n1  
n
lim  
0   
x  
• (which is obviously a  
convolution)  
• This is linear and shift  
invariant, so must be the result  
of a convolution.  
-1  
1
Source: D. Forsyth, D. Lowe  
Department of Mechatronics  
Chapter 7 – Edge Detection  
7-11  
Finite difference filters  
• Other approximations of derivative filters  
Department of Mechatronics  
Chapter 7 – Edge Detection  
7-12  
Finite differences: example  
Which one is the gradient in the x-direction? How about y‐direction?  
Department of Mechatronics  
14  
Chapter 7 – Edge Detection  
7-13  
Effects of noise  
• Consider a single row or column of the image  
– Plotting intensity as a function of position gives a signal  
Where is the edge?  
Department of Mechatronics  
Chapter 7 – Edge Detection  
7-14  
Effects of noise  
• Finite difference filters respond strongly to noise  
– Image noise results in pixels that look very different  
from their neighbors  
– Generally, the larger the noise the stronger the response  
• What is to be done?  
Department of Mechatronics  
Chapter 7 – Edge Detection  
7-15  
Effects of noise  
• Finite difference filters respond strongly to noise  
– Image noise results in pixels that look very  
different from their neighbors  
– Generally, the larger the noise the stronger the response  
• What is to be done?  
– Smoothing the image should help, by forcing pixels  
different to their neighbors (=noise pixels?) to look more  
like neighbors  
Department of Mechatronics  
Chapter 7 – Edge Detection  
7-16  
Solution: smooth first  
f
g
f * g  
d
f * g  
dx  
d
• To find edges, look for peaks in  
f * g  
Source: S.  
Seitz  
dx  
Department of Mechatronics  
Chapter 7 – Edge Detection  
7-17  
Derivative theorem of convolution  
• Differentiation is convolution, and convolution is associative:  
d
d
f * g f * g  
dx  
dx  
• This saves us one operation:  
f
g
풅
풇 ∗ 품  
풅풙  
Source: S. Seitz  
Department of Mechatronics  
19  
Chapter 7 – Edge Detection  
7-18  
Derivative of Gaussian filter  
* [1 -1] =  
• Is this filter separable?  
Department of Mechatronics  
Chapter 7 – Edge Detection  
7-19  
Derivative of Gaussian filter  
y-direction  
x-direction  
• Which one finds horizontal/vertical edges?  
Department of Mechatronics  
Chapter 7 – Edge Detection  
7-20  
Tradeoff between smoothing and localization  
1 pixel  
3 pixels  
7 pixels  
• Smoothed derivative removes noise, but blurs edge.  
Also finds edges at different “scales”.  
Department of Mechatronics  
Tải về để xem bản đầy đủ
pdf 35 trang myanh 20220 Free
Bạn đang xem 20 trang mẫu của tài liệu "Bài giảng Nhập môn thị giác máy tính - Chapter 7: Edge detection - Lê Thanh Hải", để tải tài liệu gốc về máy hãy click vào nút Download ở trên

File đính kèm:

  • pdfbai_giang_nhap_mon_thi_giac_may_tinh_chapter_7_edge_detectio.pdf