Edge Detectors Edge Detection
• Convert a 2D image into a set of curves Extracts salient features of the scene More compact than pixels
2 Edges
• Edges are caused by a variety of factors
surface normal discontinuity
depth discontinuity
surface color discontinuity
illumination discontinuity
3 Edges
• Edge is Where Change Occurs
• Change is measured by derivative in 1D
• Biggest change, derivative has maximum magnitude
• Or 2nd derivative is zero.
• The gradient of an image:
• The gradient points in the direction of most rapid change in intensity
5 Image Gradient
• gradient direction
• The edge strength
• Discrete Gradient: by finite differences f(x+1,y) – f(x,y) f(x, y+1) – f(x,y)
6 Types of Edges
7 Sobel Operator
• Better approximations of the derivatives Sobel operators -1 0 1 121 -2 0 2 000 -1 0 1 -1 -2 -1
• The standard def. of the Sobel operator omits the 1/8 term Doesn’t make a difference for edge detection The 1/8 term is needed to get the right gradient value
8 Sobel Operator - Result
Original Convolution Thresholding Thresholding with Sobel (Value = 64) (Value = 96)
9 Noise - Effect
10 Solution: Smooth First