Supervised Classification with Sentinel-2

Hello everyone,

I’ve already read the topic Supervised and unsupervised classification, Sentinel 2, but I still haven’t found a solution. I try a supervised classification with the maximum likelihood classifier, but every time I want to run it I get an empty image. As it has been described in the topic above, I’ve created some geometry container (one for every class) und drawn some polygons in the image.

than I’ve saved this product with file --> save as as an dim-file (because there’s no other option) next I’ve tried the supervised classification with maximum likelihood and added for the ProductSet-Reader the saved dim-file with the geometry. For the training vectors I’ve only selected the classes I’ve created and selected all bands for feature bands. Than the process doesn’t take long, and the created product opened in SNAP automatically. Next I want to see the result and open in the bands file the ‘labeledclass’ but the result is an emtpy image. Have anybody a solution for that?

Recently I came across a similar behavior of the random forest classification. Maybe because of the same reason. The RF classification seems to ignore small values.
Create new bands with the Band Maths and multiply each band with 10000 (the quantification value). Use the new band for the classification. Now, the values should be high enough.

1 Like

But how can I use the new bands? I’ve create them but in the supervised classification tool I can only select the ‘normal’ bands

Did you try reprojection as described here: Rndom forest classification steps

1 Like

Wow, it really worked with the reprojection to Geographic Lat/Lon…but the image looks distorted. And now my question: why I have to do that? It’s doesn’t make sense, because the image is already projected.

The distortion comes from the different projection, which is based on degree (instead of meters like in UTM).

I am not sure why this is the case in SNAP. Probably because the coordinates of the samples and the rasters do not match somehow (UTM coordinates vs decimal degrees). Probably not intended like this.

Sorry, that this lead to a dead end.
I thought you could choose the bands for the classification.
But it seems that the solution of @ABraun seems to work for you.
As Andreas already pointed out. I think too that the classification does not work in the intended way. A reprojection should not be necessary. Actually an issue already exists for this (

Thank you very much!

Hi @marpet @ABraun, I would like to ask, i have done with supervised classification of sentinel 2 image in Snap software and i try to open it in Arcmap for “extract by mask” process, because i would like to crop according to my area of interest, my question is there are only two bands in the image, and I cannot process extract by mask, Do you have any suggestion for me to do the crop process?

My suggestion is to go into the data folder of the classified produc and directly load LabeledClasses.img into ArcMap. Please check page 30 of this tutorial: Landcover classification with Sentinel-1 GRD