Add a new application for zonal statistics.
There is currently no such application in the Orfeo ToolBox. This application enables to compute statistics (min, max, mean, standard deviation) of objects in a vector image.
Input objects can be described from a vector data, or from a label image:
- mode vector: the
VectorDatais rasterized at the same origin/spacing/size as the input image. Polygons are numbered starting from 0. The statistics are computed using a
- mode label image: the statistics are directly computed using a
StreamingStatisticsMapFromLabelImageFilter, from the input image and the label image.
The application enables to produce output stats in multiple forms:
- as XML (Using a XMLFileWriter as the ComputeImagesStatistics application do),
- VectorData (stats are written in features of each polygons),
- or Raster (stats are stored in bands of the output image)
Classes and files
- A new application in
- 5 tests were added in
ZonalStatistics application (otbZonalStatistics.cxx)
- Input vector / Output vector
- Input raster / Output XML (without nodata-value for the label image)
- Input raster / Output XML (with nodata-value for the label image)
- Input vector / Output raster
- Input raster / Output raster
I've pushed a new branch in otb-data called "zonalstatistics" which contains new files in baseline and input:
Please feel free to discuss this feature.
The copyright owner is IRSTEA and has signed the ORFEO ToolBox Contributor License Agreement.
***Check before merging:*** - All discussions are resolved - At least 2