eNotes: Software Engineering
   



TOC PREV NEXT

14.9 SEGMENTATION


ؕؓ

An image can be broken into regions that can then be used for later calculations. In effect this method looks for different self contained regions, and uses region numbers instead of pixel intensities.



A simple segmentation algorithm might be,

1. Threshold image to have values of 1 and 0.
2. Create a segmented image and fill it with zeros (set segment number variable to one).
3. Scanning the old image left to right, top to bottom.
4. If a pixel value of 1 is found, and the pixel is 0 in the segmented image, do a flood fill for the pixel onto the new image using segment number variable.
5. Increment segment # and go back to step 3.
6. Scan the segmented image left to right, top to bottom.
7. If a pixel is found to be fully contained in any segment, flood fill it with a new segment as in steps 4 and 5.

14.9.1 Segment Mass Properties

When objects are rotated in the vision plane it may become difficult to use simple measures to tell them apart. At this point global attributes, such as perimeter lengths, length/width ratios, or areas can be used.

The centroid of a mass can be determined with the expression for the x direction (y is identical)



Area is simply the sum of all pixels in the segment,



Perimeter is the number of pixels that can be counted around the outside of an object.



Compactness can be a measure of mass distribution,



Another measure of mass distribution is thickness,



TOC PREV NEXT

Search for More:

Custom Search