Practical computational methods discrete method for finding first order gradient) First order gradient operators Roberts operator Prewit operator Sobel operator Tutorial for CMSC5711: Edge vo. 1a 11
Practical computational methods (discrete method for finding first order gradient) • First order gradient operators • Roberts operator • Prewiit operator • Sobel operator Tutorial for CMSC5711 : Edge v0.1a 11
Convolution method Convolution is an important and popular technique In signal processing Edges can found by convoluting an image with a mask Tutorial for CMSC5711: Edge vo. 1a 12
Convolution method • Convolution is an important and popular technique in signal processing • Edges can found by convoluting an image with a mask Tutorial for CMSC5711 : Edge v0.1a 12
Gradient calculation by convolution Differentiate an image I wrtx G(=gradient of l= dl/dx ·| t is the same as d/dx≈(d/d×) Gradient mask *=Convolution operator Or filter mask Graident mask Examp le -horizontal direction 000 hA=-101 000 Tutorial for CMSC5711: Edge vo. 1a 13
Gradient calculation by convolution* • Differentiate an image I w.r.t x • G(I)=gradient of I= dI/dx • It is the same as • dI/dx (d/dx)*I = 0 0 0 -1 0 1 0 0 0 h_A Graident mask Examp le - horizontal direction : Gradient mask *=Convolution operator Or filter mask Tutorial for CMSC5711 : Edge v0.1a 13
Assume Gx, Gy are separable the total gradient gm becomes Horizontal gradient =Gx(i,j)=h a*li,j) Horizonta direction · vertical gradient=Gj)=hB米1 vertica ·here 000 direction Horizontal_edge_filt er_mask: h_A=1-101 * is the 000 convolution operator Vertical_e dge_filter_mask: hB=000 (=√G(,)+G( _A*(,)}2+{_B*l(1 Oe edge direction(8)=tan in degre G An edge is found and direction is Tutorial for CMSC5711: Edge vo.1a tan(Gy/Gx)=0e 14
Assume Gx,Gy are separable, the total gradient Gm becomes • Horizontal gradient =Gx (i,j)= h_A * I(i,j) • vertical gradient= Gy (i,j)= h_B * I(i,j) • here, _ ( ) tan in degrees _ * ( , ) _ * ( , ) ( , ) ( , ) ( , ) 0 -1 0 0 0 0 0 1 0 Vertical_e dge_filter _mask : h_B 0 0 0 -1 0 1 0 0 0 Horizontal _edge_filt er_mask : h_A 1 2 2 2 2 = = + = + = = − x y e m x y G G edge direction h A I i j h B I i j G i j G i j G i j * is the convolution operator Horizontal direction vertical direction An edge is found and direction is tan-1(Gy/Gx)=e e Tutorial for CMSC5711 : Edge v0.1a 14
What is convolution Discrete convolution c= *h Bydefinition(http://en.wikipedia.org/wiki/convolution (m,m)=∑∑(m-1,n-k)×(,k) i=-∞k X=multiplication convolution Tutorial for CMSC5711: Edge vo. 1a 15
What is convolution ? Discrete convolution C=I*h • By definition (http://en.wikipedia.org/wiki/Convolution) = =− = =− = − − j j k k C(m,n) h(m j,n k) I( j, k) X=multiplication *=convolution Tutorial for CMSC5711 : Edge v0.1a 15