TrainImagesClassifier with no data or mask

#1

Is there any way to manage masks during training phase with TrainImagesClassifier application? How are they managed internally, for example, in case some polygon is coincident with 0 value (being 0 defined as no data)?

Cheers

Gus

#2

Hello,

Unfortunately I don’t think there is a way to manage no data directly from the TrainImagesClassifier application.

However TrainImagesClassifier is a composite application, i.e. an application chaining several smaller applications, it implements the chains described in this recipe. In particular the SampleSelection application is used (this applications convert the polygons to points corresponding to pixel in the input image). A mask can be provided as input to this application, masked pixels will not be considered for the selection (mask parameter).

A binary mask can be constructed from the no-data values of an image using the ManageNoData application.

Hope that helps,
Cédric

#3

I suspected that. No big deal, but I wanted to keep the hack simple and scripted for another operator to work with. Just a little more work. Thanks.

Gus