Use this procedure to classify an AIRSAR image based on the scattering.

Syntax


ENVI_DOIT, 'AIRSAR_SCATTER_DOIT', CLASS_NAMES=string array, DIMS=array, FNAME=string array, FNL=integer, FNS=integer, GENFAC=array, /IN_MEMORY, KX=integer, KY=integer, LOOKUP=array, METHOD={0 | 1}, OFFSET=array, OUT_BNAME=string array, OUT_NAME=string, R_FID=variable, /RULE_IN_MEMORY, RULE_OUT_BNAME=string array, RULE_OUT_NAME=string, RULE_R_FID=variable, XSTART=value, YSTART=value

Keywords


CLASS_NAMES

Use this keyword to specify names for each output class. CLASS_NAMES is an array of strings with num_classes+1 elements. Remember to set Class 0 to “Unclassified.”

DIMS

The “dimensions” keyword is a five-element array of long integers that defines the spatial subset (of a file or array) to use for processing. Nearly every time you specify the keyword FID, you must also specify the spatial subset of the corresponding file (even if the entire file, with no spatial subsetting, is to be processed).

  • DIMS[0]: A pointer to an open ROI; use only in cases where ROIs define the spatial subset. Otherwise, set to -1L.
  • DIMS[1]: The starting sample number. The first x pixel is 0.
  • DIMS[2]: The ending sample number
  • DIMS[3]: The starting line number. The first y pixel is 0.
  • DIMS[4]: The ending line number

To process an entire file (with no spatial subsetting), define DIMS as shown in the following code example. This example assumes you have already opened a file using ENVI_SELECT or ENVI_PICKFILE:

  envi_file_query, fid, dims=dims

FNAME

Use this keyword to specify a string array of compressed stokes matrix file names for C, L, and P bands. You must specify all bands for this function.

FNL

Use this keyword to specify the number of lines in the AIRSAR image.

FNS

Use this keyword to specify the number of samples per line in the AIRSAR image.

GENFAC

Use this keyword to specify an array of COMP SCALE FACTORS for each of the files specified by FNAME.

IN_MEMORY

Set this keyword to specify that output should be stored in memory. If you do not set IN_MEMORY, output will be stored on disk and you must specify OUT_NAME (see below).

KX

Set this keyword to specify the x size, in pixels, of the averaging box.

KY

Set this keyword to specify the y size, in pixels, of the averaging box.

LOOKUP

Use this keyword to specify an array of color table values for the classification image. Each output class can have a unique color triplet [r, g, b]. LOOKUP is a byte array of size (3, num_classes+1). Remember that Class 0 must also have a color triplet (commonly black [0, 0, 0]).

METHOD

Set this keyword to a value of 0 to compute scattering only. Or, set it to a value of 1 to classify the data based on the scattering mechanism. For a minimum-rule decision, the class (or band) with the smallest value becomes the selected class.

OFFSET

Use this keyword to specify an array of long integers representing header offsets for each of the files specified by FNAME.

OUT_BNAME

Use this keyword to specify a string array of output band names.

OUT_NAME

Use this keyword to specify a string with the output filename for the resulting data. If you set the keyword IN_MEMORY, you do not need to specify OUT_NAME.

R_FID

ENVI Classic library routines that result in new images also have an R_FID, or “returned FID.” This is simply a named variable containing the file ID to access the processed data. Specifying this keyword saves you the step of opening the new file from disk.

RULE_IN_MEMORY

Set this keyword to store output rule images in memory.

RULE_OUT_BNAME

Use this keyword to specify a string array that contains the output band names for the rule image.

RULE_OUT_NAME

Use this keyword to specify an output filename for the rule image. If this item is present, the rule image is automatically saved.

RULE_R_FID

Use this keyword to specify a named variable that contains the file ID for the rule image. This file ID can be used to access the data.

XSTART

Use this keyword to specify the x offset of the input file. Set to 0 for no offset.

YSTART

Use this keyword to specify the y offset of the input file. Set to 0 for no offset.

API Version


4.2