Image SVM Classification

Brief Description

Performs a SVM classification of the input image according to a SVM model file.

Tags

Learning

Long Description

This application performs a SVM image classification based on a SVM model file (*.svm extension) produced by the TrainSVMImagesClassifier application. Pixels of the output image will contain the class label decided by the SVM classifier. The input pixels can be optionnaly centered and reduced according to the statistics file produced by the ComputeImagesStatistics application. An optional input mask can be provided, in which case only input image pixels whose corresponding mask value is greater than 0 will be classified. The remaining of pixels will be given the label 0 in the output image.

Parameters

- [param] Input Image (-in): The input Image to classify.

- [param] Input Mask (-mask): The mask allows to restrict classification of the input image to the area where mask pixel values are greater than 0.

- [param] SVM Model file (-svm): A SVM model file.

- [param] Statistics file (-imstat): A XML file containing mean and standard deviation to center and reduce samples before classification.

- [param] Output Image (-out): Output image labeled with class labels

- [param] Available RAM (-ram): Available RAM

Limitations

The input image must have the same type, order and number of bands than the images used to produce the statistics file and the SVM model file. If a statistics file was used during training by the TrainSVMImagesClassifier, it is mandatory to use the same statistics file for classification. If an input mask is used, its size must match the input image size.

Authors

OTB-Team

See also

TrainSVMImagesClassifier, ValidateSVMImagesClassifier, ComputeImagesStatistics

Example of use

- Parameters to set value:

- Input Image: QB_1_ortho.tif

- SVM Model file: clsvmModelQB1.svm

- Statistics file: clImageStatisticsQB1.xml

- Output Image: otbConcatenateImages.png uchar

- Command line to execute:

otbcli_ImageSVMClassifier -in QB_1_ortho.tif -svm clsvmModelQB1.svm -imstat clImageStatisticsQB1.xml -out otbConcatenateImages.png uchar