电子科线女学光电科学与工程学院 SCHOOL OF OPTOELECTRONIC SCIENCE AND ENGINEERING OF UESTC 4.Basic Edge Detection The image gradient and its properties The gradient of an image fx,y)at location(x,y)is defined as r-a-- Some properties about this gradient vector It points in the direction of maximum rate of change of image at (x.y) ·Magnitude:M(x,y)=mag(Vf)=√g+g? Angle: a(x,y)=tan
✓ Some properties about this gradient vector ✓ The gradient of an image f(x,y) at location (x,y) is defined as ( ) T x y g f f f grad f g x y = = = ( ) ( ) 2 2 , M x y mag f g g = = +x y 4. Basic Edge Detection ◼ The image gradient and its properties ( ) 1 , tan y x g x y g − = ◼ It points in the direction of maximum rate of change of image at (x,y) ◼ Magnitude: ◼ Angle:
电子科线女学光电科学与工程学院 SCHOOL OF OPTOELECTRONIC SCIENCE AND ENGINEERING OF UESTC Example:Properties of the gradient Gradient vector Gradient vector gray pixels:0 white pixels:1 《 a-90° 耳dgedirection a b c FIGURE 10.12 Using the gradient to determine edge strength and direction at a point. Note that the edge is perpendicular to the direction of the gradient vector at the point where the gradient is computed.Each square in the figure represents one pixel. 18x =-450 Note:The edge is perpendicular to the direction of the gradient vector
2 2 , T x y g f f f g x y = = = − Note: The edge is perpendicular to the direction of the gradient vector. 1 0 tan 45 x y g g − = = − Example: Properties of the gradient gray pixels: 0 white pixels: 1 x: ↑, y:←
电子科发女学光电科学与工程学院 SCHOOL OF OPTOELECTRONIC SCIENCE AND ENGINEERING OF UESTC 4.Basic edge detection Gradient operator ab -1 -1 FIGURE 10.13 Vf= One-dimensional masks used to gy」 implement Eqs. (10.2-12)and (10.2-13). ■Digital difference 8:=of(x,y)/ox=f(x+1,y)-f(x,y) 8,=0f(x,y)/∂y=f(x,y+1)-f(xy)
x y f g x f g f y = = ( , ) ( 1, ) ( , ) ( , ) ( , 1) ( , ) x y g f x y x f x y f x y g f x y y f x y f x y = = + − = = + − ◼ Digital difference 4. Basic edge detection ◼ Gradient operator
电子科枝女学光电科学与工程学院 "Omeo时the true fatherso时the Internet" -USA Today SCHOOL OF OPTOELECTRONIC SCIENCE AND ENGINEERING OF UESTC 4.Basic edge detection Lawrence G.Roberts(1937-) ■ Roberts operator(1963) af 0 8x =2g-25 ar gy dy 3-26 Zi Z Z3 ZA Z5 Z6 Z Zs 0← Roberts L G.Machine Perception of Three-dimention[D].Massachusetts Institute of Technology,1963
1 0 0 1 − 0 1 1 0 − 000 0 1 0 0 0 1 − ◼ Roberts operator(1963) 0 0 0 0 0 1 0 1 0 − 4. Basic edge detection z1 z2 z3 z4 z5 z6 z7 z8 z9 9 5 8 6 x y f g z z x f g z z y = = − = = − Roberts L G. Machine Perception of Three-dimention[D]. Massachusetts Institute of Technology, 1963. Lawrence G. Roberts(1937-)
电子件枝女学光电科学与工程学院 SCHOOL OF OPTOELECTRONIC SCIENCE AND ENGINEERING OF UESTC 4.Basic edge detection Prewitt operator (1970) 8= fx,》=(,++2)-(++3) Ox fx,2=(3,+6+2)-(3+24+27) ay ZI Z2 Zs -1-1-1 -1 ZA Z5 Z6 8x= 000 8 1 Z Zs Zo 1 11 Prewitt J M S.Object enhancement and extraction[J].Picture processing and Psychopictorics,1970,10(1):15-19
( ) ( ) ( ) ( ) 7 8 9 1 2 3 3 6 9 1 4 7 ( , ) ( , ) x y f x y g z z z z z z x f x y g z z z z z z y = = + + − + + = = + + − + + − − − 1 1 1 0 0 0 1 1 1 1 0 1 1 0 1 1 0 1 − − − gx = gy = ◼ Prewitt operator (1970) 4. Basic edge detection z1 z2 z3 z4 z5 z6 z7 z8 z9 Prewitt J M S. Object enhancement and extraction[J]. Picture processing and Psychopictorics, 1970, 10(1): 15-19