Since release 5.4, new functionalities related to the handling of the vectors from the training data set (see also 3.4.1) were added to OTB.
The first improvement was provided by the application PolygonClassStatistics. This application processes a set of training geometries, and outputs statistics about the sample distribution in the input geometries (in the form of a xml file) :
Supported geometries are polygons, lines and points; depending on the geometry type, this application behaves differently :
The application also takes as input a support image, but the values of its pixels are not used. The purpose is rather to define the image grid that will later provide the samples. The user can also provide a raster mask, that will be used to discard pixel positions.
A simple use of the application PolygonClassStatistics could be as follows :