ComputeImagesStatistics¶
计算一组图像中每个带区的全局平均值和标准差,并选择将结果保存在XML文件中。
描述¶
此应用程序计算一组图像的每个波段的全局平均值和标准差,并可选择将结果保存在一个XML文件中。输出的XML旨在用作 TrainImagesClassifier 在学习前对样本进行归一化的应用。您还可以使用 ImageClassifier 申请。
参数¶
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.xml filename [dtype]
XML filename where the statistics are saved for future reuse.
Mean pixel Value -out.mean string
Mean pixel value.
Min pixel Value -out.min string
Minimum pixel value.
Max pixel Value -out.max string
Maximum pixel value.
Standard deviation of pixel Value -out.std string
Standard deviation of pixel value.
Available RAM (MB) -ram int
Default value: 256
Available memory for processing (in MB).
实例¶
从命令行执行以下操作:
otbcli_ComputeImagesStatistics -il QB_1_ortho.tif -out.xml EstimateImageStatisticsQB1.xml
来自Python的评论:
import otbApplication
app = otbApplication.Registry.CreateApplication("ComputeImagesStatistics")
app.SetParameterStringList("il", ['QB_1_ortho.tif'])
app.SetParameterString("out.xml", "EstimateImageStatisticsQB1.xml")
app.ExecuteAndWriteOutput()
局限性¶
该组图像的每个图像必须包含与其他图像相同的波段(即,以相同的顺序包含相同的类型)。