Gamma LAT: Reference Manual


ras_majority

ANSI-C program: ras_majority.c

NAME
ras_majority - Majority filtering of SUN raster or BMP format class map files.

SYNOPSIS
ras_majority <file_in> <file_out> <pwr_out> [filter_width] [LR]

<file_in> input (8-bit) SUN raster or BMP image file (SUN raster: *.ras, BMP image format: *.bmp)
<file_out> output (8-bit) SUN raster or BMP image file (SUN raster: *.ras, BMP image format: *.bmp)
[filter_width] filter width (select from 3,5,7 default = 3)
[LR] left/right flipping: default=1:normal, -1:mirror image

EXAMPLE
ras_majority 1352_1610.landuse.ras 1352_1610.landuse_maj7.ras 7

INSTALLATION
Source code ras_majority.c in $LAT_HOME/src. For compilation adjust and use Makefile: Executable version ras_majority in $LAT_HOME/bin

AVAILABILITY
Uses display programs definition file display.h, SUN raster file definition file rasterfile.h, and BMP format definition file, bmp_image.h.

DESCRIPTION
ras_majority carries out a majority filtering on the input image file in either SUN raster of BMP format. Around each pixel a window with size defined by the user is selected. The value occurring most often in the window area is associated to the output pixel value. Only odd numbers (3,5,7,9, ...) may be selected for the window size. Majority filtering is appropriate to improve classification results, i.e. to supress small areas belonging to a different class. Useful only in classification maps with a relatively small number of differerent classes.

OPTIONS
The output image may be left/right flipped relative to the input image.

SEE ALSO
display.h, rasterfile.h, bmp_image.h

DIAGNOSTICS
All messages are generally self-explanatory.

NOTES
None.


© Copyrights for Documentation, Users Guide and Reference Manual by Gamma Remote Sensing, 2000.
UW, CW, last change 24-Jan-2000.