Edge Detection (Dosen : Ibu Yeni) Dirangkum oleh: Eko Zulkaryanto (http://zulkaryanto.wordpress.com) Computer Science Bogor Agricultural University (http://www.ipb.ac.id) What are edges? Local intensity change Strong edge = the steep areas in a 3D plot (show: blobs-for-edge, surface plot) Second-Order Derivative Edge Detection Laplacian Canny Edge Detectors Mudah diimplementasikan dan cepat Berdasarkan grey-level gradient Dihitung pada setiap piksel => Gradient image: g(x,y) Menggunakan 16-bit atau 32-bit image untuk merepresentasikan gradient! Gradient : the first-order derivative: Bekerja pada arah x dan y: Deteksi Tepi Deteksi tepi (Edge detection)adalah operasi yang dijalankan untuk mendeteksi garis tepi (edges)atau boundary untuk segmentasi, registrasi, dan identifikasi objek. Edge adalah beberapa bagian dari citra di mana intensitas kecerahan berubahsecara drastis. Edge adalah beberapa bagian dari citra di mana intensitas kecerahan berubahsecara drastis. Dalam objek berdimensi 1, perubahan dapat diukur dengan menggunakan fungsi turunan (derivative function). Perubahan mencapai maksimum pada saat nilai turunannya pertamanya mencapai nilai maksimum atau nilai turunan kedua (2ndderivative) bernilai 0. Gradient Operators Fist-Order Derivative Edge Detection Introduction Fist-Order Derivative Edge Detection Fig.1.Edgesareboundariesbetweendifferenttextures.Edgealsocanbed efinedasdiscontinuitiesinimageintensityfromonepixeltoanother..[4] EDGE DETECTION METHOD First-Order Derivative Edge Detection The Roberts operators The Prewitt operators The Sobeloperators First-Order of Gausssian(FDOG) The Roberts operators
First-order derivative edge detection The Prewitt operators The Sobel operators Second Order Derivation Laplacian The Laplacian of a 2-D function f(x, y) is a second-order derivative defined as: Edge Detector: Laplacian Operators First-Order of Gausssian
Edge Detector: Laplacian Second Order Derivation Canny Sensitive to noise Gaussian function Low-pass filter The Drawbacks of the Differentiation Method for Edge Detection : Sensitivity to noise Not good for ramp edges Make no difference between the significant edge and the detailed edge Good detection Good localization Single response Many edge candidate The accurate edge
Edge Detection Using the Gradient Using pixel-coordinate notation (remember: j corresponds to the x direction and i to the negative y direction): Conlusion Fist-Order Derivative Edge Detection: the simplest method Second-Order Derivative Edge Detection: sensitive to noise DeteksiTepi Deteksitepi(Edge detection)adalah operasi yang dijalankan untuk mendeteksi garis tepi (edges) yang membatasi dua wilayah citra homogen yang memiliki tingkat kecerahan yang berbeda (Pitas 1993). Tujuannya adalah untuk mengubah citra 2D menjadi bentuk kurva. Edge adalah beberapa bagian dari citra di mana intensitas kecerahan berubah secara drastis. Edge adalah beberapa bagian dari citra di mana intensitas kecerahan berubahsecara drastis. Dalam objek berdimensi1, perubahan dapat diukur dengan menggunakan fungsi turunan (derivative function). Perubahan mencapai maksimum pada saat nilai turunannya pertamanya mencapai nilai maksimum atau nilai turunan kedua (2nd derivative) bernilai 0. Edge Detection Using the Gradient:
Operator Robert Operator Sobel#1 Operator Sobel#2 AlgoritmeDeteksiTepi Robert Operator SobelOperator Prewitt Operator Canny Operator Laplacian operator dan lain-lain. Edge Detection Using the Gradient Operator Prewitt ImplementasiMatlab Deteksi tepi dengan operator Prewitt citra=imread('cameraman.tif'); ic= citra(:,:,1); px=[-1 0 1;-1 0 1;-1 0 1]; %% DeteksiVertikal icx=filter2(px,ic); % convolution figure,imshow(icx/255); py=px'; %% DeteksiHorizontal icy=filter2(py,ic); figure,imshow(icy/255); edge_p=sqrt(icx.^2+icy.^2); figure,imshow(edge_p/255); edge_t=im2bw(edge_p/255,0.3); figure, imshow(edge_t);
10Edge Detection Using the Gradient Image Gradient Perubahan intensitas kecerahan dapat dihitung dengan menggunakan gradient citra(image gradient). Edge Detection Using the Gradient Gradient Magnitude gradient magnitude. Gradient Magnitude dapat dihitung dengan cara:
Effects of noise Consider a single row or column of the image Plotting intensity as a function of position gives a signal Solution: smooth first Derivative theorem of convolution This saves us one operation: