COMP322/S2000/L201 Recognition: Object Descriptor Example: A binary image, object is indicated by one’s Run Length encoding of the image: (0,11,3,5,5,4,5,5,5,4,4,6.2,13) Question: How to describe the object? Boundary Chain code of the object: starting pixel: (2,1) (0,0,7,6,7,6,5,5,4,3,2,2,3,2,1)
COMP322/S2000/L202 Recognition: Object Descriptor “Object” in a binary image is indicated by “1”. Moments The moments of an object (O) are defined as where (x,y) is the coordinates of a pixel in O. Consider, 1. k = 0; j = 0 ==> ==> Size of O, i.e. no. of pixels with value of 1 m 00 = 29 (example)
COMP322/S2000/L203 Recognition: Object Descriptor 2. k = 1; j = 0; ==> m 10 = 100 (example) 3. k = 0; j = 1; ==> m 01 = 111 (example) Centroid (Center of Mass) (x c,y c ) = (100/29, 111/29) = (3.45, 3.83) (example)
COMP322/S2000/L204 Recognition: Object Descriptor Central Moments The central moments of an object (O) are defined as where (x,y) is the coordinates of a pixel in O and (x c,y c ) is the centroid of the object. Note: Invariant to translation of object. Q: what about Rotation? If the origin is translated to the centroid, the central moments become the standard moments 11 is called a product moment 20, 02 are moments of inertia of the object w.r.t. the x and y axes through the centroid.
COMP322/S2000/L205 Recognition:Object Descriptor (x) m 00 = 9; m 10 = 36; m 01 = 27; (x c,y c ) = (36/9, 27/9) = (4,3); 10 = 0; 01 = 0; 11 = 12; 20 = 30; m 02 = 6; Image Translated: m 00 = 9; m 10 = 36; m 01 = 18; (x c,y c ) = (36/9, 18/9) = (4,2); 10 = 0; 01 = 0; 11 = 12; 20 = 30; m 02 = 6;
COMP322/S2000/L206 Recognition: Object Descriptor Orientation of the Object: The principle angle of an object (O) is defined as where atan2(y,x) is defined by the following table: casequandrantatan2(y,x) x > 0 1, 4 arc tan(y/x) x = 0 1, 4[sign(y)] /2 x < 0 2, 3arc tan(y/x) + sign(y) Example given in class.
COMP322/S2000/L207 Recognition: Object Description For a robot to grip a part, the exact shape of the part need not be known sometimes. If we know the centroid of the part, the principle axes, and the bounding boxes of the part, the robot should be able to pick up the part. Bounding Rectangle is defined as the smallest rectangle that encloses the object and is aligned with the object’s orientation. Refer to class notes for details and examples