<<Prev 1 2 3 4 5 6 7 8 9 10 Next>>
Flood Fill
As we can no longer rely on color as a tracking feature we now turn to shape.
To extract objects based on shape we first need to ensure that the object can be
analyzed as an object. This means we need to group similar colored pixels with each
other to define an object or as known in machine vision terms ... a blob.
Using the Flood_Fill module (set to 65) we apply a
color flattening technique to merge pixels into more meaningful groups. Flood filling is similar
to the flood fill that is present in most paint programs. If a pixel is of similar color
to its immediate neighbor the two pixels are replaced with the mean color of the two.
This works well to define objects but we still have a problem with image #3. If you look closely
the upper square is almost a single color but has a large part of it on the right hand side in
another color. This is caused by the tolerance of the flood fill not being high enough to include
that part of the blob as a single object. However, increasing the tolerance causes other undesirable
effects such as merging the square into the background glare.
Instead we use another feature of the Flood Fill to analyze neighboring blobs and how intense their
borders are. The original edge detection tests showed that the outline of the squares were
the only dominant edge in each square. The border between the parts of the upper square blob in
image #3 above is then not
very significant. Thus we use the Merge Borders interface in the flood fill to help merge blobs
whose borders are not very strong.
This also has the added benefit of merging the glare objects into a single background blob further
decreasing the image noise. Now that we have all of our squares a single color we can start analyzing the shapes of the remaining
blobs ....
<<Prev 1 2 3 4 5 6 7 8 9 10 Next>>
|