ANSI-C program: multi_class_mapping.c
NAME
multi_class_mapping - Mapping of multiple classes based
on co-registered multiple input files.
SYNOPSIS
multi_class_mapping <nfiles> <f1> <f2>
... <classf> <ras_out> <width> [start] [nlines]
[pixav_x] [pixav_y] [LR] [color_flag]
<nfiles> | number of input data files |
<f1> | 1. input data file (float) |
<f2> | 2. input data file (float) |
... | further input files (float) |
<classf> | Classification table:ASCII file with decison
thresholds: each line contains thresholds for one class. For each class lower and upper thresholds are requested, in addition color table values. |
<ras_out> | output 8-bit SUN raster, BMP format image file (SUN raster file: *.ras, BMP file: *.bmp) |
<width> | number of samples/row |
[start] | starting line (default=1) |
[nlines] | number of lines to display (default: 0=to end of file) |
[pixav_x] | number of pixels to average in range (default=1) |
[pixav_y] | number of pixels to average in azimuth (default=1) |
[LR] | left/right flipping flag (default: 1=normal, -1=mirror image) |
[color_flag] | flag indicating if a color table is defined in file
classf (default=0: no col table defined; 1: color table defined) |
EXAMPLE
multi_class_mapping 2 1825_1868.cc 1825_1868.pwr1
1825_1868.class.par 1825_1868.landuse.ras 2500 1 0 1 1
-1
Generates a classification based on the 2 input data files and the decision intervals and the color table listed in the classification table 1825_1868.class.par. To classify the 5 classes: water, layover, forest, agriculture, and urban, the classification table (ASCII text file 1825_1868.class.par), may look like this for example:
0.0 | 0.2 | 0.0 | 0.01 | 0 | 0 | 255 |
0.0 | 0.2 | 0.2 | 100. | 255 | 255 | 0 |
0.2 | 0.4 | 0.05 | 0.2 | 0 | 255 | 0 |
0.4 | 1.0 | 0.02 | 0.2 | 128 | 255 | 128 |
0.4 | 1.0 | 0.2 | 100. | 255 | 0 | 0 |
The first and second column define the lower and upper limit for the value of the first input data file (in this case the coherence). The third and fourth column define the lower and upper limit for the value of the second input data file (in this case the backscattering coefficient). Columns 5 to 7 define the color table values (RGB: red, green, blue, ranging from 0 to 255). Each row corresponds to a different class.
INSTALLATION
Source code multi_class_mapping.c in $LAT_HOME./src. For
compilation adjust and use Makefile: Executable of
multi_class_mapping resides 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
multi_class_mapping provides a simple classification
algorithm. Multiple input data sets are read and a classification
based on decision intervals listed in the classification table is
performed. The number of classes to classify is determined by the
number of rows in the classification table.For each input data
set (files of type float) and class a decision interval is
defined in the classification table, i.e. a pixel belongs to a
certain class if its values are within the specified interval for
all input data sets.
OPTIONS
The output image may be left/right flipped to generate a geometry
corresponding better to the natural geometry.
SEE ALSO
display.h, rasterfile.h, bmp_image.h
DIAGNOSTICS
All messages are generally self-explanatory.
NOTES
© Copyrights for Documentation, Users Guide and Reference Manual by Gamma Remote Sensing, 2000.
UW, CW, last change 24-Jan-2000.