ComputeImagesStatistics

Computes global mean and standard deviation for each band from a set of images and optionally saves the results in an XML file.

Description

This application computes a global mean and standard deviation for each band of a set of images and optionally saves the results in an XML file. The output XML is intended to be used as an input for the TrainImagesClassifier application to normalize samples before learning. You can also normalize the image with the XML file in the ImageClassifier application.

Parameters

Input images -il image1 image2... Mandatory
List of input image filenames.

Background Value -bv float
Background value to ignore in computation of statistics.

Output XML file -out filename [dtype]
XML filename where the statistics are saved for future reuse.

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

Examples

From the command-line:

otbcli_ComputeImagesStatistics -il QB_1_ortho.tif -out EstimateImageStatisticsQB1.xml

From Python:

import otbApplication

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

app.SetParameterStringList("il", ['QB_1_ortho.tif'])
app.SetParameterString("out", "EstimateImageStatisticsQB1.xml")

app.ExecuteAndWriteOutput()

Limitations

Each image of the set must contain the same bands as the others (i.e. same types, in the same order).

See also

Documentation of the TrainImagesClassifier and ImageClassifier application.