AVG

Unsupervised texture segmentation


EnvironmentsPYTHON :: EASI :: MODELER
Batch ModeYes
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: References

Back to top

Description


Performs multi-level image aggregation of a multispectral image. This algorithm is an implementation of an anisotropic diffusion neural network. Multispectral imagery can be more accurately classified by analyzing its multispectral image data and multi-scale context maps. This function does not perform image classification. Visual interpretation or a statistical classifier must be used if classification theme maps are desired.
Back to top

Parameters


Name Type Length Value range
Input: Input raster channel(s) * Raster port 1 - 48  
Output1: Level 1 output image channels Raster port 0 - 48  
Output2: Level 2 output image channels Raster port 0 - 48  
Output3: Level 3 output image channels Raster port 0 - 48  
Output4: Level 4 output image channels Raster port 0 - 48  
Output5: Level 5 output image channels Raster port 0 - 48  
Number of Texture Layers per level * Integer 1 - 1  
InputTexture: Input texture channels * Raster port 5 - 5  
Spectral Update Rate * Float 1 - 1  
Texture Update Rate * Float 1 - 1  
Maximum Aggregation Iterations Integer 0 - 1 1 -
Default: 20
Movement Threshold * Float 1 - 1 0.00001 -
Threshold Value Float 0 - 2  
Report String 0 - 192 See parameter description

* Required parameter
Back to top

Parameter descriptions

Input: Input raster channel(s)

Specifies the input aggregated input channels.

Output1: Level 1 output image channels

Specifies the list of output channels to receive the level-1 aggregated images.

Output2: Level 2 output image channels

Specifies the list of output channels to receive the level-2 aggregated images.

Output3: Level 3 output image channels

Specifies the list of output channels to receive the level-3 aggregated images.

Output4: Level 4 output image channels

Specifies the list of output channels to receive the level-4 aggregated images.

Output5: Level 5 output image channels

Specifies the list of output channels to receive the level-5 aggregated images.

Number of Texture Layers per level

Specifies the number of texture context map channels read for each level of the network. This parameter must be used for all network levels.

InputTexture: Input texture channels

Specifies the input raster channels that contain the texture context maps for all levels of the aggregation network.

Spectral Update Rate

Specifies the update rate for the spectral aggregation component of the network.

This parameter should be set by examining the report during a trial aggregation run. It adjusts the influence of spectral-over-texture context information and the speed of aggregation.

Texture Update Rate

Specifies the update rate for the texture aggregation component of the network. This parameter should be set by examining the report a trial aggregation run. It adjusts the influence of texture context information over spectral information and the speed of aggregation.

Maximum Aggregation Iterations

Specifies the maximum number of aggregation iterations that the network performs before it halts, regardless of the specified movement threshold (MOVETHRS).

Movement Threshold

Specifies the minimum relative update size of any node in the aggregation network below which the aggregation stops. This parameter should be expressed as a decimal value greater than 0. For example, a value of 0.05 halts the network if no node is updated by more than 5 percent of its previous value.

Threshold Value

Specifies the minimum spectral and texture feature value below which the similarity between adjacent pixels is defaulted to a small value. This parameter lets you skip aggregation in regions where there is little texture or spectral information.

The threshold value is specified using two entries. The first entry defines the smallest spectral value in a given channel that is considered valid for computing a non-zero spectral similarity. The second entry defines the smallest texture feature value in a given texture context map that is considered valid for computing a non-zero texture similarity.

This parameter can be set to prevent noise from affecting the inter-pixel similarities where there is little spectral energy in a given band or little texture information in a texture feature map.

Report

Specifies where to direct the generated report.

Available options are:

Back to top

Details

AVG is a neural network that aggregates multispectral images. In the context of this function, aggregation is the modification of pixel values from the input image by consecutive, weighted averaging with neighboring pixels. In this sense, aggregation is considered a space- and time-varying, low-pass filter.

There are a number of significant differences between AVG and existing methods for image smoothing using filters:

AVG is also different from supervised classification algorithms in that no training data is required and no theme maps are generated. AVG is closer to clustering schemes because it transforms data rather than labeling it. AVG is considered a hybrid of spatial smoothing and spectral clustering.

Multi-level design

AVG makes use of a five-level network. Each network level is a two-dimensional array of nodes that contain the current aggregated image at a given scale and location. The bottom network level consists of one node for each pixel in the full-scale input window and is initialized by using the input multispectral image. Successive levels are 2:1 subsampled. For example, a 256 x 256 input window gives the following:

LEVEL 1 : 256 x 256 nodes
LEVEL 2 : 128 x 128 nodes
LEVEL 3 :  64 x 64  nodes
LEVEL 4 :  32 x 32  nodes
LEVEL 5 :  16 x 16  nodes

If the algorithm is executed in RAM on a 16 MB computer, the smallest level (5) must be at least 8 x 8 nodes for MAL to generate texture maps and the largest level should be no more than 1024 x 1024 nodes. The input window must have Xsize and Ysize values of an even power of 2 for 2:1 downsampling.

The multi-level design recognizes that spectral and texture phenomena exist at different image scales and resolutions. In addition, these phenomena often coincide with distinct land-cover classes. Multi-level aggregation can cope with land-cover classes of varying degrees of complexity and spatial scale. The following example demonstrates the use of different levels of output images:

LEVEL 1:	URBAN vs RURAL
LEVEL 2:	SCRUB vs FOREST
LEVEL 3:	MAPLE vs PINE  
LEVEL 4:	RED PINE vs SCOTCH PINE
LEVEL 5:	Tree trunks vs tree leaves

Multi-level aggregation can be performed without user supervision. The algorithm generates inter-level and intra-level texture and spectral similarity maps that govern the aggregation within levels. To ensure stability, there is no aggregation between levels; however, the network levels are initialized by using a weighted average of node values at the next lower level.

Spectral information

Image aggregation can be performed by using only the spectral information that is present in the input multispectral image. You must supply a texture-context map, which can be a blank image. Alternatively, you can set the texture update rate to zero. With spectral-only information, aggregation is proportional to the spectral similarity of neighboring nodes, as well as the spectral content at adjacent levels. Because aggregation performs averaging, the network requires some method for preventing a uniform gray-level output. There are three strategies for ensuring an appropriate aggregation:

Texture context maps

Texture context maps are a set of feature maps that correspond to each of the five network levels. A given feature must have one map at each network. To simplify the input parameters, the maps for a level must lie in continuous image channels and the maps for a given feature must lie in the same position in the order of maps for each level.

For example:

The number of texture maps per level is unlimited, if memory is available; however, the maps should be informative.

Adjacent nodes in a given level have high-texture similarity if the texture map features are similar. Regions with low-texture similarity are aggregated at a slower rate than regions with high-texture similarity.

The texture maps can be generated from any algorithm; however, the algorithm will read consecutive maps for each specified number of texture channels (TCHANS). In addition, the dimensions of each map should correspond exactly to its assigned image level. Each map should have its top-left corner at pixel 0, line 0, in its input channel.

Controlling aggregation

Image aggregation is a globally stable process where the values of the output images must lie between the maximum and minimum value of the entire input image. Unfortunately, this result is not always useful, because it does not prevent blurring between cover classes.

The benefit of image aggregation is that, ideally, distinct cover classes have a uniform output transformed spectral vector that is different from adjacent cover classes. This result is achieved using differential rates of smoothing at different spatial locations and levels. The rate of smoothing is a function of the sum of the local spectral and textural similarity. The similarity values are scaled by the spectral update rate and the texture update rate, respectively. In this manner, the spectral or texture information can be forced to have a lesser or greater effect on the aggregation outcome.

You should perform a trial aggregation run by using the default spectra and texture update rates. The report records the magnitude of the average spectral and texture similarity values in the network. You can then adjust either rate to ensure that the similarities reflect the importance of each information source. You should also ensure that the rates are small enough that the current average node movement is a small percentage.

In some cases, appropriate rates and the built-in network shut-down feature provide undesirable aggregation when the movement threshold is reached. In such cases, aggregation should be halted earlier by increasing the movement threshold or by decreasing the maximum number of iterations (MAXITER).

Aggregation results

All or some of the network layers can be written to the output channel when the network is updated. Each spectral-layer level of the network is written to separate image channels listed in DBO1, DBO2, DBO3, DBO4, and DBO5. The network layers are placed in the top-left corner of the output image. The output image must be large enough to hold a network layer generated from the lowest-requested network level.

For example, if the input image size is:

0,0,512,512
then:

You must use an output file with an image size of 512 x 512 if any channels are listed under DBO1.

Back to top

References

Wright, G. "Feature Selection For Texture Discrimination" (M.A.Sc. thesis, Department of Systems Design, University of Waterloo, Canada, 1988).

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.