Claims
- 1. A system for analyzing an image, comprising:
a pixel-by-pixel edge follower which includes rules for termination; wherein rules for target recognition allow the edge follower to recognize target-like shapes.
- 2. The system of claim 1, wherein the edge follower is not required to form a closed contour.
- 3. The system of claim 1, wherein the edge follower is operable to:
follow an edge including an initial pixel and a plurality of edge pixels, each of the initial pixel and the edge pixels having a plurality of respective neighboring pixels; and for each of the initial pixel and the plurality of edge pixels, measuring contrast with the respective neighboring pixels.
- 4. A method for analyzing an image, comprising:
selecting an initial location within an image to initiate a chaincode; initiating the chaincode at the initial location, the chaincode being operable to follow a path defined, at least in part, by a plurality of adjacent pixels having approximately equal changes in brightness therebetween; and measuring direction changes of the path until a condition is identified that disqualifies further travel, before the chaincode returns to the initial location.
- 5. The method of claim 4, further comprising storing a starting point and a history of the direction changes of the path.
- 6. The method of claim 4, wherein the condition is excessive meandering, and further comprising:
calculating meander values corresponding to successive positions of the chaincode as a chaincode follower progresses along the path; wherein the meander values are related to the proportion of traversed pixels with respect to a straight-line distance traveled by the chaincode from an initial point; and terminating the chaincode if one of the meander values exceeds a predetermined threshold meander value.
- 7. The method of claim 4, wherein the path includes at least a first limit of extent which is approximately parallel to a reference axis, wherein a length of the first limit of extent is determined by a first point at which the chaincode follower is no longer extending in a direction of the first limit of extent.
- 8. The method of claim 7, wherein:
the path includes at least a second limit of extent which extends approximately perpendicular to the reference axis; a length of the second limit of extent is determined by a second point at which the chaincode follower is no longer extending in a direction of the first limit of extent; and the first and second limits of extent at least partially defining a contour.
- 9. The method of claim 4, further comprising:
identifying portions of the chaincode that include contiguous points that do not deviate by more than one least significant bit of a chaincode range; and recording straight segments for further analysis of straightness.
- 10. The method of claim 8, wherein the contour is an edge with at least first and second limits of extent, and further comprising:
calculating an approximate area of the contour defined, at least in part, by the first and second limits of extent, using x, y locations of the first and second limits of extent.
- 11. The method of claim 7, further comprising identifying generally straight edges which occur within a region defined by the contour as being a location of a target candidate.
- 12. The method of claim 4, wherein selecting the location to initiate the chaincode comprises:
selecting a first seed point within the image; analyzing a first linear segment which extends from the first seed point, the first linear segment including a plurality of pixels of the image; detecting changes in brightness between successive ones of the plurality of pixels of the image; identifying first and second adjacent pixels, of the plurality of pixels, having a change in brightness therebetween which exceeds a predetermined threshold change in brightness; and wherein the location is selected proximate the first and second pixels.
- 13. The method of claim 12, wherein selecting the location to initiate the chaincode further comprises:
identifying two of the successive pixels having the greatest change in brightness therebetween; and wherein the first and second adjacent pixels comprise the two of the successive pixels.
- 14. The method of claim 12, wherein selecting the location to initiate the chaincode further comprises:
selecting a grid of seed points within the image, the grid of seed points including the first seed point; analyzing a plurality of linear segments along the image, each linear segment initiating at, and extending away from, a respective one of the grid of seed points; wherein the plurality of linear segments includes the first linear segment; for each of the plurality of linear segments, identifying a pair of adjacent pixels having the greatest change in brightness; wherein the first and second adjacent pixels comprise one of the pairs of adjacent pixels; and initiating chaincodes proximate each of the pairs of adjacent pixels.
- 15. The method of claim 4, wherein the path of the chaincode at least partially defines a contour and further comprising:
measuring an approximate area of the contour; comparing the area with a range of acceptable area values; and performing a second level of evaluation of the contour, if the area is within the range of acceptable area values.
- 16. The method of claim 4, further comprising terminating the chaincode if the chaincode demonstrates singularity such that the chaincode returns to an identical pixel, in one step.
- 17. The method of claim 4, further comprising measuring a plurality of edge directions along the path, wherein the edge directions are determined by a ratio of adjacent gray values.
- 18. The method of claim 17, further comprising calculating, for an edge segment, a deviation from a mean of the plurality of edge directions to obtain a measure of a degree of straightness of the edge segment.
- 19. The method of claim 18, further comprising:
detecting a plurality of generally straight edges of the path, clustered in a region of the image; calculating a centroid of a contour defined, at least in part, by the plurality of generally straight edges; and identifying the centroid as a target candidate.
- 20. The method of claim 18, further comprising:
detecting at least one generally straight edge along the path; determining if the at least one generally straight edge is located within a contour of interest; and identifying the contour as a target candidate.
- 21. The method of claim 4, wherein the path at least partially defines a contour, and further comprising:
identifying the contour as a target candidate if the path includes a first limit of extent which extends generally parallel to a reference axis, and which is smaller than a predetermined maximum size, and at least a second limit of extent which extends generally perpendicular to the reference axis.
- 22. A method for analyzing an image, comprising:
initiating chaincodes at a plurality of initial points of an image; for each chaincode, monitoring a path of the chaincode; and terminating each of the plurality of chaincodes that meanders excessively.
- 23. The method of claim 22, further comprising:
for each chaincode, storing the starting point and directional changes until the chaincode is terminated; and for each chaincode that meets certain predefined target candidate criteria, passing the starting point and directional changes along to a second level of evaluation.
- 24. A method for analyzing an image, comprising:
initiating chaincodes at a plurality of edge points of an image; for each chaincode, monitoring a path of the chaincode; and terminating any of the plurality of chaincodes having a straight-line distance that exceeds a predetermined maximum length.
- 25. The method of claim 24, further comprising:
for each chaincode, storing a starting point and a history of directional changes until the chaincode is terminated; and for each chaincode that meets certain predefined target candidate criteria, passing the starting point and history of directional changes along to a second level of evaluation.
- 26. The method of claim 24, further comprising:
monitoring a plurality of extents associated with each chaincode; wherein the plurality of extents of each chaincode at least partially define an associated contour of each chaincode; for each chaincode, continuously calculating an approximate area of the associated contour as the chaincode extends along the path; and terminating any of the plurality of chaincodes having an associated contour that exceeds a predetermined maximum area.
- 27. The method of claim 24, further comprising:
identifying portions of the chaincode that include contiguous points that do not deviate by more than one least significant bit of the chaincode range (one eighth of 360 or forty-five degrees); and recording the portions for further analysis of straightness.
- 28. The method of claim 27, further comprising:
identifying generally straight edges which occur within a region defined by an appropriate size contour as being a location of a target candidate.
- 29. The method of claim 24, further comprising measuring a plurality of edge directions along the path, wherein the directions are determined by a ratio of adjacent gray values.
- 30. The method of claim 29, further comprising calculating, for an edge segment, a deviation from a mean of the plurality of edge directions to obtain a measure of degree of straightness of the edge segment.
RELATED PATENT APPLICATIONS
[0001] This application is being filed concurrently with patent applications entitled System and Method for Analyzing a Contour of an Image by Applying a Sobel Operator Thereto (Attorney's Docket 019937.0436) and System and Method for Template Matching of Candidates within a Two-Dimensional Image (Attorney's Docket 019937.0440).