ComputeImagesStatistics - Compute Images second order statistics ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Computes global mean and standard deviation for each band from a set of images and optionally saves the results in an XML file. Detailed 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 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 ---------- This section describes in details the parameters available for this application. Table [#]_ presents a summary of these parameters and the parameters keys to be used in command-line and programming languages. Application key is *ComputeImagesStatistics* . .. [#] Table: Parameters table for Compute Images second order statistics. +-------------+----------------------------------+--------------------------+ |Parameter Key|Parameter Name |Parameter Type | +=============+==================================+==========================+ |il |Input images |Input image list | +-------------+----------------------------------+--------------------------+ |bv |Background Value |Float | +-------------+----------------------------------+--------------------------+ |out |Output XML file |Output File name | +-------------+----------------------------------+--------------------------+ |ram |Available RAM (Mb) |Int | +-------------+----------------------------------+--------------------------+ |inxml |Load otb application from xml file|XML input parameters file | +-------------+----------------------------------+--------------------------+ |outxml |Save otb application to xml file |XML output parameters file| +-------------+----------------------------------+--------------------------+ - **Input images**: List of input images filenames. - **Background Value**: Background value to ignore in statistics computation. - **Output XML file**: XML filename where the statistics are saved for future reuse. - **Available RAM (Mb)**: Available memory for processing (in MB). - **Load otb application from xml file**: Load otb application from xml file. - **Save otb application to xml file**: Save otb application to xml file. Example ------- To run this example in command-line, use the following: :: otbcli_ComputeImagesStatistics -il QB_1_ortho.tif -out EstimateImageStatisticsQB1.xml To run this example from Python, use the following code snippet: :: #!/usr/bin/python # Import the otb applications package import otbApplication # The following line creates an instance of the ComputeImagesStatistics application ComputeImagesStatistics = otbApplication.Registry.CreateApplication("ComputeImagesStatistics") # The following lines set all the application parameters: ComputeImagesStatistics.SetParameterStringList("il", ['QB_1_ortho.tif']) ComputeImagesStatistics.SetParameterString("out", "EstimateImageStatisticsQB1.xml") # The following line execute the application ComputeImagesStatistics.ExecuteAndWriteOutput() Limitations ~~~~~~~~~~~ Each image of the set must contain the same bands as the others (i.e. same types, in the same order). Authors ~~~~~~~ This application has been written by OTB-Team. See Also ~~~~~~~~ These additional resources can be useful for further information: | Documentation of the TrainImagesClassifier and ImageClassifier application.