Remove Small Islands

Remove Small Islands

The purpose of this option is to filter an image prior to contouring to remove small regions of the image lying just to one side or the other of the threshold. Unlike convolution filters, this filter does not have any spatial smoothing at the boundaries of large regions to either side of the threshold. The filtering process proceeds as follows:

        1) Start from the beginning of the image.

        2) Locate a region ("blob") with an intensity less than the threshold
           is located and evaluate the area of the region.

        3) If the blob contains less than the minimum allowable number of
           pixels, then its intensity is reset to a value equal to the
           threshold.

        4) Repeat from step 2) until no more blobs less than the threshold
           are found.

        5) Start from the beginning of the image.

        6) Locate a blob with an intensity greater than or equal to the
           threshold and evaluate its area.

        7) If the area is less than the minimum allowable number of pixels,
           then fill the blob with an intensity one less than the threshold.

        8) Repeat from step 6) until no more blobs with an intensity greater
           than or equal to the threshold are found.

As an option, the above process may be repeated a fixed number of times, or repeated until no more changes are made in a given pass.

Remove islands on what buffer ?

The island filter may be applied to any valid DigImage buffer. The buffer selected will be made the current output buffer and image contained within it altered. Extended memory buffers will be copied to buffer 0 for display purposes.

Islands in Window or whole Screen ?

The island filter may be applied to either a window (<W>) or the entire buffer (<S>).

Window Selection: Region containing islands

If removal of small islands in a window is selected, the normal window selection submenu will be produced to aid the specification of the desired window. For assistance on window specification, see [H Help] within the submenu.

Threshold intensity ?

If the resultant image is to be contoured using [C Contours] or [E Locate edge in window], then the threshold specified here should be the same as the one to be used in either of these two options. Islands are defined relative to this threshold value.

Minimum island size ?

The whole purpose of this filter is to remove islands whose area is less than the size specified by this entry. The value specified depends on how many of the small scale features are to be kept in the final image prior to contouring. The minimum value is 2, corresponding to the removal of individual anomolous points (ie. islands one pixel in size).

Number of passes (0 => repeat until no more changes) ?

The filter may be applied recursively so that islands containing islands, containing... may be removed. The entry here specifies the number of passes of the filter to be made. However, if no changes are detected before the specified number of passes has been made, the routine will exit anyway. If zero is specified, then the filter will be applied repeatedly until no further changes are detected. Generally changes will only be made on the first two passes, though for the zero value a third pass is necessary to check that this is indeed the case.

Removing small islands...


Parent menu

Main Menu

DigImage User Documentation


Stuart Dalziel, last page update: 19 February 1996