SIEVE -- Sieve Filter (Class Merging)

Reads an image channel, and merges image value polygons smaller than a user specified threshold with the largest neighbouring polygon. This is typically used to filter small classification polygons from a classification result.

Progress of this program can be monitored. See MONITOR section.

See Also: FMO, POG

PARAMETERS

SIEVE is controlled by the following global parameters:

Name     Prompt                                  Count     Type
FILE     Database File Name                      1-64      Char
DBIC     Database Input Channel List             1         Int
DBOC     Database Output Channel List            1         Int
STHRESH  Polygon Size Threshold                  1         Int
KEEPVALU Values not to be filtered               0-16      Int
CONNECT  Connectedness of Lines (4 or 8)         1         Int

FILE

Specifies the name of the PCIDSK file containing the input and output image channels on which to operate.

 EASI>FILE="filespec"

DBIC

Specifies the image channel containing the classification polygons.

 EASI> DBIC=i

DBOC

Specifies the image channel into which the merged classification result is to be placed. This may be the same as DBIC. Note that 32 bit real data will be truncated to integer values.

 EASI> DBOC=i

STHRESH

  Valid Values:   x >= 0
  Default:        <none>
Specifies the size in pixels of the smallest polygon not to be merged into a neighbour. Large values of Polygon Size Threshold will require more memory.

 EASI>STHRESH=n

KEEPVALU

  Valid Values:   <see below>
  Default:        <none>
Specifies a list of up to 16 image values that should not be affected by the sieve operation. Polygons with these values will not be replaced, nor will other polygons be replaced with these values unless the polygon is surrounded by pixels in this list.

 EASI>KEEPVALU=i

CONNECT

  Valid Values:   4, 8
  Default:        4
Specifies whether polygons are determined on the basis of eight connectedness, or four connectedness.

 EASI>CONNECT=8         | polygons are 8-connected
 EASI>CONNECT=4         | polygons are 4-connected
 EASI>CONNECT=          | defaults to 4-connected
Polygons are determined on the basis of adjacent pixels of the same value. In a four connected polygon pixels are considered adjacent if they are in contact horizontally or vertically. Eight connectedness also includes pixels in contact on the diagonal.

MONITOR

Program progress can be monitored by printing the percentage of completed processing in odometer fashion. A system parameter, MONITOR, controls this activity:

EASI>MONITOR="ON"           | turn monitor ON  (default)
EASI>MONITOR="OFF"          | turn monitor OFF (recommended if
                            | running in batch/background mode)

DETAILS

The SIEVE program performs a sieve filtering operation on the input data. The sieve filter removes all polygons smaller than the given size, measured in pixel area. Each polygon that is smaller than the threshold is merged with its largest neighbour.

A polygon is defined as a four or eight connected collection of pixels with the same digital value. Eight connected implies that two pixels with the same grey level value are part of the polygon if they are side by side, one above the other, or diagonally in contact. Four connected, on the other hand only includes side by side, or one above the other.

The SIEVE program may have to make multiple passes to remove all polygons smaller than the threshold size, though this is rarely necessary. Also note that the SIEVE program operates on integer values, and 32R input channels will lose precision.

The SIEVE program builds up a list of all the polygons in the input channel in memory. Therefore input channels with many small polygons will require much more memory than those with relatively few polygons. An error will occur if SIEVE exhausts available memory for storing polygon information. It may be helpful to run SIEVE outside of EASI to make additional memory available, or to run FMO to reduce the number of polygons before running SIEVE.

EXAMPLE

Pass the supervised classification result in channel 7 of irvine.pix through a sieve filter with a threshold of 6, to remove any polygons of 5 or less pixels.

 EASI> FILE = "irvine.pix"
 EASI> DBIC = 7
 EASI> DBOC = 8
 EASI> STHRESH = 6
 EASI> RUN SIEVE

About PCI Help Gateway