edge detection

17
EDGE DETECTION Prof. B.A.Khivsara

Upload: bhavana-khivsara

Post on 11-Apr-2017

84 views

Category:

Engineering


0 download

TRANSCRIPT

Page 1: Edge detection

EDGE DETECTION

Prof. B.A.Khivsara

Page 2: Edge detection

What is Edge Detection?• Identifying points/Edges in a digital image at which the image brightness changes sharply or has discontinuities.

• - Edges are significant local changes of intensity in an image.• - Edges typically occur on the boundary between two different regions in an

image.

Page 3: Edge detection

Goal of edge detection

Edge detection is extensively used in image segmentation when we want to divide the image into areas corresponding to different objects.

If we need to extract different object from an image, we need Edge Detection.

Using Edge Detection, we can- recognition, Image comparizon, Unaccepted object can be remove.

Page 4: Edge detection

TYPES OF EDGES

Variation of Intensity / Gray Level• Step Edge• Ramp Edge• Line Edge• Roof Edge

Page 5: Edge detection

Process of Edge Detection

There are three steps to perform edge

detection:

Noise reduction

Edge enhancement

Detection – Identify edges

Page 6: Edge detection

Process of Edge Detection - Noise reduction•  where we try to suppress as much noise as possible,

without smoothing away the meaningful edges.

Original Image After Nois Reduction

Page 7: Edge detection

Process of Edge Detection - Edge enhancement• where we apply some kind of filter that responds strongly at

edges and weakly elsewhere.

Page 8: Edge detection

METHODS OF EDGE DETECTION

First Order Derivative / Gradient Methods• Roberts Operator• Sobel Operator• Prewitt Operator

Second Order Derivative• Laplacian• Laplacian of Gaussian

Optimal Edge Detection• Canny Edge Detection

Page 9: Edge detection

First Order Derivative

At the point of greatest slope, the first derivative has maximum value

• E.g. For a Continuous 1-dimensional function f(t)

Page 10: Edge detection

Gradient • For a continuous two dimensional function Gradient is defined as

yfxf

GyGx

yxfG )],([

GyGxGyGxG 22

GxGy1tan

Page 11: Edge detection

Gradient Methods – Roberts Operator

Convolution Mask

Gx =

Gy=

1 00 -1

0 -11 0

Page 12: Edge detection

Roberts Operator - Example

The output image has been scaled by a factor of 5

Spurious dots indicate that the operator is susceptible to noise

Page 13: Edge detection

Gradient Methods – Sobel Operator

The 3X3 convolution mask smoothes the image by some amount , hence it is less susceptible to noise. But it produces thicker edges. So edge localization is poor

Convolution Mask

-1 0 1-2 0 2-1 0 1

1 2 10 0 0-1 -2 -1

Gx= Gy=

Page 14: Edge detection

Sobel Operator - Example

Compare the output of the Sobel Operator with Roberts• The spurious edges are

still present but they are relatively less intense

• Roberts operator has missed a few edges

• Sobel operator detects thicker edges

Outputs of Sobel (top) and Roberts operator

Page 15: Edge detection

Second Order Derivative Methods

Zero crossing of the second derivative of a function indicates the presence of a maxima

Page 16: Edge detection

Second Order Derivative Methods - Laplacian

• Defined as

• Mask

• Very susceptible to noise, filtering required, use Laplacian of Gaussian

0 1 01 -4 10 1 0

Page 17: Edge detection

Second Order Derivative Methods - Laplacian of Gaussian

Steps• Smooth the image using Gaussian filter• Enhance the edges using Laplacian operator

• Zero crossings denote the edge location• Use linear interpolation to determine the sub-pixel location of the edge