+ All Categories
Home > Documents > Edge Detection 9 1

Edge Detection 9 1

Date post: 05-Jan-2016
Category:
Upload: nanx-bocai
View: 222 times
Download: 0 times
Share this document with a friend
Description:
Materi Pemrograman Citra Digital Deteksi Garis Tepi
Popular Tags:
33
EE663 Image Processing Edge Detection 3 Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals
Transcript
Page 1: Edge Detection 9 1

EE663Image ProcessingEdge Detection 3

Dr. Samir H. Abdul-Jauwad

Electrical Engineering Department

King Fahd University of Petroleum & Minerals

Page 2: Edge Detection 9 1

2

Edge Detection

• Operator-operator Gradient− Roberts− Prewitt− Sobel

• Gradient Gaussian (Canny)• Laplacian Gaussian (Marr-Hildreth)

• Detektor:

Page 3: Edge Detection 9 1

3

Edge Detection Using the Gradient

• Definis gradient:

• Magn dihitung dengan:

Page 4: Edge Detection 9 1

4

Edge Detection Using the Gradient

• Sifat gradient:

− Magnitude gradient memberikan informasi tentan kekuatan dari edge

− Arah gradient selalu tegak lurus dengan arah sisi

• Main idea:

− Menghitung turunan dari arah x dan y − Mencari besaran Gradient− Ambang dari besaran gradient

Page 5: Edge Detection 9 1

5

Edge Detection Using the Gradient

• Menentukan gradient dengan beda hingga

− Pendekatan beda hingga

Page 6: Edge Detection 9 1

6

Edge Detection Using the Gradient

• Menggunakan notasi koordinat pixel (ingat: j berkaitan denga arah x dan i arah negative y):

Page 7: Edge Detection 9 1

7

Edge Detection Using the Gradient

• Contoh :− Misal menghitung

gradient pada z5

• Dapat mengimplementasikan I/x dan I/y menggunakan mask

Catatan: Mx adalah hitungan pada (i, j + 1/2) dan My pendekatan pada (i + 1/2, j)

Page 8: Edge Detection 9 1

8

Edge Detection Using the Gradient

• Detektor sisi Roberts ( Robert Operator )

• Dapat diimplementasikan dengan mask

Note: Mx and My pendektan pada (i + 1/2, j + 1/2)

Page 9: Edge Detection 9 1

9

Edge Detection Using the Gradient

• Prewitt edge detector

− Turunan parsial dihitung dengan:

Note: Mx and My hitungan pada (i, j))

− Perhatikan pixel (i, j):

− c mempengaruhi pixel yang dekat dengan pusat mask− Jika c = 1, didapatkan Prewitt operator:

Page 10: Edge Detection 9 1

10

Edge Detection Using the Gradient

• Sobel edge detector

Note: Mx and My perhitungan pada (i, j))

− Jika c = 2, didapatkan Sobel operator:

Page 11: Edge Detection 9 1

11

Edge Detection Using the Gradient

• Langkah-langkah utama dalam deteksi tepi menggunakan mask:

Page 12: Edge Detection 9 1

12

Edge Detection Using the Gradient

(contoh menggunakan Prewitt edge detector – jangan dibagi dengan 2)

Page 13: Edge Detection 9 1

13

Edge Detection Using the Gradient

• Example:

Idx

d

Idy

d

Page 14: Edge Detection 9 1

14

Edge Detection Using the Gradient

• Example – cont.:

22

I

dy

dI

dx

d

Page 15: Edge Detection 9 1

15

Edge Detection Using the Gradient

• Example – cont.:

100 Threshold

Page 16: Edge Detection 9 1

16

Edge Detection Using the Gradient

Page 17: Edge Detection 9 1

17

Edge Detection Using the Gradient

Page 18: Edge Detection 9 1

18

Edge Detection Using the Gradient

• Isotropic property of gradient magnitude:− The magnitude of gradient is an isotropic operator (it detects edges

in any direction !!)

Page 19: Edge Detection 9 1

19

Edge Detection• Practical issues:

− High-pass filters – cenderung memperkuat noise.− Mengurangi noise - smooth pergtama dengan low-pass filter.

1) The noise suppression-localization tradeoff

− Meperbesar pengurangan noise, memperburuk penentuan tepi( menambah ketidakpastian posisi dari sisi/tepi) dan begitu sebaliknya

Page 20: Edge Detection 9 1

20

Edge Detection

2) Memilih treshold

Page 21: Edge Detection 9 1

21

Edge Detection

3) Penipisan tepi dan linking

− Diperlukan untuk mendapatkan kontur yang baik

Page 22: Edge Detection 9 1

22

Edge Detection

− Good detection: detektor optimal harus meminimkan kemungkinan kesalahan deteksi (mendeteksi sisi palsu yang disebabkan oleh noise ) dan juga meminimumkan hilangnya sisi yang sesungguhnya,

− Good localization: deteksi tepi harus mendekati sisi/tepi yang sesungguhnya.

− Single response constraint: detector harus menghasilkan satu titik hanya pada setiap titik sisi yang sesungguhnya, yaitu meminimalkan jumlah local maxima disekitar sisi sebenarnya

• Kriteria untuk deteksi tepi optimal

Page 23: Edge Detection 9 1

23

Edge Detection• Examples:

True edge

Poor robustness to noise

Poorlocalization

Too manyresponses

Page 24: Edge Detection 9 1

24

The Canny Edge Detector

− Banyak sekali digunakan.− Canny telah menunjukan bahawa turunan pertama dari Gaussian

adalah operator yang lebih sesuai yaitu mengoptimalkan hasil signal-to-noise ratio dan penempatan posisi

− Ini didasarkan pada "step-edges" yang disebabkan “penambahan Gaussian noise".

• Canny edge detector:

Page 25: Edge Detection 9 1

25

The Canny Edge Detector

Page 26: Edge Detection 9 1

26

The Canny Edge Detector• Turunan Gaussian:

),( yxg

),( yxg x

),( yxg y

Page 27: Edge Detection 9 1

27

The Canny Edge Detector• Canny – penghalusan dan derivatives:

xf

yf

f

Page 28: Edge Detection 9 1

28

The Canny Edge Detector• Canny – Besaran gradient:

image gradient magnitude

Page 29: Edge Detection 9 1

29

Edge Detection

− To find the edge points, we need to find the local maxima of the gradient magnitude.

− Broad ridges must be thinned so that only the magnitudes at the points of greatest local change remain.

− All values along the direction of the gradient that are not peak values of a ridge are suppressed.

• Non-maxima suppression

Page 30: Edge Detection 9 1

30

Edge Detection• Non-maxima suppression – cont.

Page 31: Edge Detection 9 1

31

Edge Detection• Non-maxima suppression – cont.

− What are the neighbors?− Look along gradient normal

− Quantization of normal directions:

0

12

3

41420tan41422-:3

41422|tan|:2

41422tan41420:1

41420tan41420:0

:onQuantizati

.θ.

.θ.

.θ.-

directiongradientθ tan

Page 32: Edge Detection 9 1

32

Edge Detection• Canny – Non-maxima suppression:

gradient magnitude thinned

Page 33: Edge Detection 9 1

33

Edge Detection

− The output of non-maxima suppression still contains the local maxima created by noise.

− Can we get rid of them just by using a single threshold?− if we set a low threshold, some noisy maxima will be accepted too.

− if we set a high threshold, true maxima might be missed (the value of true maxima will fluctuate above and below the threshold, fragmenting the edge).

• Hysteresis thresholding / Edge linking

− A more effective scheme is to use two thresholds:− a low threshold tl

− a high threshold th

− usually, th ≈ 2tl


Recommended