Train classifier

#1

Hello,

I have a train and test samples in tif format, how can convert this raster data to vector data to using it in a train classifier ?

Thank you.

0 Likes

#2

You have two tif files containing label values for the different classes, one for training and one for testing ?

In this case, I don’t think we have an application in OTB that would convert them to vector data. However, you can use the gdal script gdal_polygonize.py (this script is in the binary package of OTB) that will convert each 4 connected component (areas with the same label) into a polygon. The resulting shapefile can then be used in the TrainImageClassifier.

Cédric

0 Likes

#3

I will try this thank you so much.

0 Likes