| Environments | PYTHON :: EASI :: MODELER |
| Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Examples :: Related |
| Back to top |
| Back to top |
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| FILE * | String | Input-file name | 1 - 192 | |
| DBNNS * | Integer | Input neural-network segment | 1 - 1 | |
| DBOC * | Integer | Output classification channel or channels | 1 - 254 | |
| PROBCHAN | Integer | Output probability channel | 0 - 254 | |
| MASK | Integer | Area mask | 0 - 4 | |
| NULLCLAS | String | Null Class (YES|NO) | 0 - 3 | YES | NO Default: YES |
| MONITOR | String | Monitor mode | 0 - 3 | ON, OFF Default: ON |
| Back to top |
FILE
The name of the PCIDSK image file to process.
DBNNS
The neural-network segment (type 180) trained as a classifier by NNTRAIN.
NNCLASS processes the image channels listed in the neural-network segment as the input image data. If an untrained neural network with zero training iterations is specified, NNCLASS will not run.
DBOC
The output image channel or channels that receive the classification results. The first channel holds the most likely class, the second channel the second most likely class, and so on. Typically, however, only one output channel is specified.
Up to 254 channels can be handled and up to 48 values can be specified.
The number of output channels cannot exceed the number of output units (training site bitmaps) defined for the neural network.
At least one channel must be specified. Duplicate channels are not allowed.
Ranges of channels or segments can be specified with negative values. For example, {1,-4,10} is internally expanded to {1,2,3,4,10}. When you are not specifying a range in this way, only 48 numbers can be specified explicitly.
PROBCHAN
The output channels in which to store estimated probabilities (values between 0.0 and 100.0) that a pixel belongs to the class to which it was assigned. For each specified output-classification channel (DBOC), you can specify a corresponding probability channel for PROBCHAN.
This function handles up to 254 channels and you can specify up to 48 integer values; however, the number of values you specify cannot exceed that of the output-classification channels (DBOC).
Duplicate channels cannot be defined for DBOC (OutputNN) and PROBCHAN (Probability).
The values generated represent a measure that approximates the true statistical probability. The value generated for a pixel is calculated as the activation value of the output unit for the selected class divided by the activation of all output units for that pixel.
The range of values varies according to the number of output classes: more output classes decrease the range. Higher values, generally, are produced for classes that are well trained; therefore, the probability values produced can be considered relative to the range of probability values produced.
If a second probability channel is specified, it contains the value of the second most active output unit divided by the activation of all output units for that pixel position, and so on.
This parameter is optional.
Ranges of channels or segments can be specified with negative values. For example, {1,-4,10} is internally expanded to {1,2,3,4,10}. When you are not specifying a range in this way, only 48 numbers can be specified explicitly.
MASK
The window or bitmap that defines the area to be processed and classified.
If a single value is specified, it represents the channel number of the bitmap segment in the input file. Only the pixels of the bitmap are processed; the rest of the image remains unchanged.
If four values are specified, they define the x,y offsets and x,y dimensions of a rectangular window identifying the area to process. Xoffset, Yoffset define the upper-left starting pixel coordinates of the window. Xsize is the number of pixels that define the window width. Ysize is the number of lines that define the window height.
If no value is specified, the entire channel is processed.
This parameter is optional.
NULLCLAS
Specifies whether pixels can be assigned to the NULL class (value 0).
MONITOR
The program progress can be monitored by printing the percentage of processing completed. A system parameter, MONITOR, controls this activity.
Available options are:
| Back to top |
NNCLASS classifies multispectral imagery using a back-propagation neural network created by NNCREAT and trained by NNTRAIN.
The input PCIDSK image file (FILE) contains the image channels that receive the output-classification results (DBOC), the input neural-network segment (DBNNS) that defines the trained back-propagation neural network to use, and the input-image channels to process. In addition, output channels for storing the probabilities that each pixel belongs to a class (PROBCHAN) can also be specified.
The classification can be restricted to those pixels beneath a specified rectangular window or bitmap mask (MASK). If no mask is specified, each pixel in the image is classified.
The NULLCLAS (Null Class) parameter specifies whether to create a NULL class (YES) where none of the pixels belong to any output class, or whether to assign each pixel to one of the output classes (NO).
Before running NNCLASS, you must first run NNCREAT and NNTRAIN according to the descriptions in the corresponding Help topic for each.
| Back to top |
This example uses the neural network created by NNCREAT and trained by NNTRAIN.
The training bitmaps, input imagery, and output-class values used for the neural network are the same as those used for the maximum likelihood classification (MLC) example; therefore, the output from MLC and NNCLASS can be compared.
First, perform the classification using MLC (from the Multispectral Analysis component).
EASI>file = "irvine.pix" EASI>maxl = "FULL" ! Full Maximum Likelihood mode EASI>sigfile = EASI>dbs1 = 17, -24 ! eight signature segments EASI>dboc = 7 ! output MLC theme map to channel 7 EASI>probchan= ! default: no probability results EASI>mask = ! default: process entire image EASI>nullclas= ! default: allow for a NULL class EASI>report = "OFF" EASI>monitor = "ON" EASI>RUN mlc
Now, perform the classification using the back-propagation neural network.
EASI>file = "irvine.pix" EASI> ! dbnns set by nncreat EASI>dboc = 8 ! output the class most likely EASI>probchan= 9 ! probability of class most likely EASI>mask = ! default: process entire image EASI>nullclas= ! default: allow for a NULL class EASI>RUN nnclass
Compare the output from the maximum likelihood classification (MLC) with the neural-network classification. Use the pseudocolor table for the output classes to display the classification results.
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.