In an image processing system, successive segmentation steps are carried
out. In the case of a "hole" in the segmentation result, which is defined
as a small area of one type (such as black) within a slightly larger
"island" of another type (such as white), a basic segmentation technique
may result in an error. The error is avoided by retaining, for each
distinct area in the image, a variable indicating whether the area has
been "flipped" from one type to another in a previous processing
operation.