Next: 5. Match Space Up: Fuzzy Doc Recognition With Previous: 3. Feature Space

# 4. Blob Space

While represented as colors in the above Figures 10 and 11, the color segmentation process actually produces five monochrome (1-bit) images - one for each region defined previously: Doc's hat, Doc's suit, Doc's shoes, Doc's skin, and Doc's beard, shown in Figure 12. These images contain a number of pixels forming areas called blobs which have been classified as belonging to the set of colors which define one or more of Doc's regions.

One wishes to identify the location of each blob in each of these region images. This is accomplished through application of two algorithms. First, contour extraction is employed to find the bounding contour for each blob, and as a result, obtain the maximum and minimum X and Y locations of pixels belonging to that particular blob. Then a simple bounding box algorithm is used to form a box which covers this area, defining an internal representation of each blob as a rectangle in a list. Contour extraction is defined algorithmically as follows:

1.
Start in the top, left corner of the image.
2.
Scan the image, stepping through all the pixels in a row, then increasing the row, and stepping through all those pixels, repeating until a non-zero pixel is reached.
3.
Proceed clockwise around the edge of the blob, drawing an edge. Stop when the initial point of impact with the blob is reached.
4.
Form a minimum-sized bounding box to enclose the contour. Store this box in a list and erase the blob's pixels from the image. Repeat to step 2.

Figure 13 shows the contour extraction process with five panels: original blobs, extracted contour of blob 1, minimum enclosing box for blob 1, extracted contour of blob 2, and the minimum enclosing box for blob 2.

Figure 14 shows the blobs extracted by the above method for our familiar test scene. Additionally, Figures 15 and 16 show results when Doc is in more realistic test scenes.

Next: 5. Match Space Up: Fuzzy Doc Recognition With Previous: 3. Feature Space
Mike Andrews
1999-05-09