Docsity

Digital Image Processing Lecture Notes: Edge Detection, Cheat Sheet of Digital Image Processing

Partial preview of the text

Download Digital Image Processing Lecture Notes: Edge Detection and more Cheat Sheet Digital Image Processing in PDF only on Docsity!

July 1, 2021 Digital Image Processing, Lecturer 1

Digital Image Processing Digital Image Processing

Lecture #5 Lecture #

Dr. Md. Hasanuzzaman

Professor

Department of Computer Science & Engineering

Dhaka University

July 1, 2021 Digital Image Processing, Lecturer 2 Contents Contents

Introduction of Edge detection

Point Detection Method

Line Detection Method

Edge Detection Method

Edge Linking and Boundary Detection

July 1, 2021 Digital Image Processing, Lecturer 4 Edge Detection (2 of 3) Edge Detection (2 of 3) The usual approach is to simply define edges as step discontinuities in the image signal. The method of localizing these discontinuities often then becomes one of finding local maxima in the first derivative of the signal, or zero-crossings in the second derivative of the signal. In computer vision, edge detection is traditionally implemented by convolving the signal with some form of linear filter, usually a filter that approximates a first or second derivative operator.

July 1, 2021 Digital Image Processing, Lecturer 5 Edge Detection (3 of 3) Edge Detection (3 of 3)

Detection of Discontinuity

Point Detection

Line Detection

Edge Detection

July 1, 2021 Digital Image Processing, Lecturer 7 Point Detection  (^) A point has been detected at the location on which the mask is centered if, |R|  T  (^) T is the nonnegative threshold and R,  (^) z

i

is the gray level of the pixel associated with the mask coefficient w

i

 (^) The idea is that isolated point will be quite different from its surroundings Sum of all point is Zero Center point is equal to sum of other points but opposite sign Point Detection Mask 1 1 2 2 9 9 Rw zw z   w z

w

1

w

2

W

3

w

4

w

5

W

6

w

7

w

8

w

9

July 1, 2021 Digital Image Processing, Lecturer 8 Contents Contents

Introduction of Edge detection

Point Detection Method

Line Detection Method

Edge Detection Method

Edge Linking and Boundary Detection

July 1, 2021 Digital Image Processing, Lecturer 10 Contents Contents

Introduction of Edge detection

Point Detection Method

Line Detection Method

Edge Detection Method

Edge Linking and Boundary Detection

July 1, 2021 Digital Image Processing, Lecturer 11 Edge Detection Method Edge Detection Method

 First Order Differential Method

Second Order Differential method

July 1, 2021 Digital Image Processing, Lecturer 13 Model of a Digital Edge Model of a Digital Edge Blurring in the edge

July 1, 2021 Digital Image Processing, Lecturer 14 Model of First Derivative Model of First Derivative Edge Detection Edge Detection The first derivative is, positive at the point of transition into and out of the ramp as we move from left to right along the profile; Constant for points in the ramp And zero in areas of constant gray level Separated by Vertical edge 2 nd derivative

July 1, 2021 Digital Image Processing, Lecturer 16 Applications of First and Applications of First and Second Derivatives of an Second Derivatives of an Image Image

The Magnitude of the first derivative can be used to

detect the presence of an edge at a point in an image

The sign of the second derivatives can be used to

determine whether an edge pixel lies on the dark and

light side of an edge

An imaginary straight line joining the extreme

positive and negative values of the second derivative

would cross zero near the midpoint of the edge.

( Zero Crossing property )

July 1, 2021 Digital Image Processing, Lecturer 17

First Order derivative First Order derivative

(Gradient Operators) (Gradient Operators)

First order derivatives of a digital Image are based

on various approximations of the 2-D gradient,

The gradient of an image f(x,y) is defined as the

vector,

x y

f

G x

f

G f

y

  ^ ^ 

  ^ 

x y

 f  mag  f  G  G 

and magnitude

y x

G  G  f 

July 1, 2021 Digital Image Processing, Lecturer 19 Example of Example of Edge DetectionEdge Detection (2) (2) 7 8 9 1 2 3 ( ) ( ) x Gzzzzzz 3 6 9 1 4 7 ( ) ( ) y Gzzzzzz First order partial derivatives at point z 5 Prewitt Gradient Operator: differences between 1 st and 3 rd rows x direction; 3 rd and 1 st columns y direction

July 1, 2021 Digital Image Processing, Lecturer 20 Example of Example of Edge DetectionEdge Detection (3) (3) 7 8 9 1 2 3 ( 2 ) ( 2 ) x Gzzzzzz 3 6 9 1 4 7 ( 2 ) ( 2 ) y Gzzzzzz First order partial derivatives at point z 5 Sobel Gradient Operator: A weight value of 2 is used in the center point to achieve some smoothing