LocalStatisticExtraction

Computes local statistical moments on every pixel in the selected channel of the input image

Description

This application computes the 4 local statistical moments on every pixel in the selected channel of the input image, over a specified neighborhood. The output image is multi band with one statistical moment (feature) per band. Thus, the 4 output features are the Mean, the Variance, the Skewness and the Kurtosis. They are provided in this exact order in the output image.

Parameters

Input Image -in image Mandatory
The input image to compute the features on.

Feature Output Image -out image [dtype] Mandatory
Output image containing the local statistical moments.

Selected Channel -channel int Default value: 1
The selected channel index (1 based)

Neighborhood radius -radius int Default value: 3
The computational window radius.

Available RAM (MB) -ram int Default value: 256
Available memory for processing (in MB).

Examples

From the command-line:

otbcli_LocalStatisticExtraction -in qb_RoadExtract.tif -channel 1 -radius 3 -out Statistics.tif

From Python:

import otbApplication

app = otbApplication.Registry.CreateApplication("LocalStatisticExtraction")

app.SetParameterString("in", "qb_RoadExtract.tif")
app.SetParameterInt("channel", 1)
app.SetParameterInt("radius", 3)
app.SetParameterString("out", "Statistics.tif")

app.ExecuteAndWriteOutput()

See also

otbRadiometricMomentsImageFunction class