.. _ComputeImagesStatistics: 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 :ref:`TrainImagesClassifier` application to normalize samples before learning. You can also normalize the image with the XML file in the :ref:`ImageClassifier` application. Parameters ---------- .. contents:: :local: .. |br| raw:: html
.. |em| raw:: html   **Input images** :code:`-il image1 image2...` *Mandatory* |br| List of input image filenames. **Background Value** :code:`-bv float` |br| Background value to ignore in computation of statistics. Optional outputs ^^^^^^^^^^^^^^^^ **Output XML file** :code:`-out.xml filename [dtype]` |br| XML filename where the statistics are saved for future reuse. **Mean pixel Value** :code:`-out.mean string` |br| Mean pixel value. **Min pixel Value** :code:`-out.min string` |br| Minimum pixel value. **Max pixel Value** :code:`-out.max string` |br| Maximum pixel value. **Standard deviation of pixel Value** :code:`-out.std string` |br| Standard deviation of pixel value. ------------ **Available RAM (MB)** :code:`-ram int` *Default value: 256* |br| Available memory for processing (in MB). Examples -------- From the command-line: .. code-block:: bash otbcli_ComputeImagesStatistics -il QB_1_ortho.tif -out.xml EstimateImageStatisticsQB1.xml From Python: .. code-block:: python import otbApplication app = otbApplication.Registry.CreateApplication("ComputeImagesStatistics") app.SetParameterStringList("il", ['QB_1_ortho.tif']) app.SetParameterString("out.xml", "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 :ref:`TrainImagesClassifier` and :ref:`ImageClassifier` application.