Patent ID: 7149356

Claim:
A method for matching a stored contour template with a contour of an object, comprising: receiving at least one candidate array comprising a respective plurality of direction values at least partially defining a respective contour of an object within a two-dimensional image, wherein each candidate array is derived from a path-chaincode produced by a path-chaincode follower, the path chaincode including the plurality of directional values and defining a path that passes through equivalent gray values; applying a Sobel operator to pixels adjacent path-chaincode pixels to obtain Sobel chaincodes corresponding to the path chaincodes, each Sobel chaincode comprising an array of gradient directions corresponding to the way brightness falls off in a vicinity of an edge; applying angle corrections to each of the gradient directions which go beyond the π radian transition to convert each array of gradient directions to arrays which are free of artificial discontinuities; and comparing the candidate array with at least one stored template array comprising a respective plurality of direction values at least partially defining an outline of a predetermined object of interest.