Supervised and unsupervised classification, Sentinel 2

No. It’s a bit disappointing that I cannot get it to work as I would like to use SNAP for my research. I’m now using QGIS to implement the Maximum Likelihood Classifier instead.

Hi,
How can I visualized the supervised classification?


Best regards,
Alzira

open the ‘labeled classes’ raster. In your case something went wrong. When no class distribution is calculated in the Frequency colum all raster cells are nodata (thus unclassified). I hat similar issues and didn’t find a solution for it so far. It changed when I selected different input data. But until now I couldn’t narrow it down to which one causes the faulty results.

Thanks for your reply.
Does the supervised classification work?
Best regards,
Alzira

In general it works fine.
For some data there are errors. But give it a try - in most of the cases it will perform great.

Good morning everyone,

I am also a student trying to work with the Supervised Classification.
I am trying to classify a raster formed by several bands, each of them containing the temporal profile of a VI o similar features; the bands were derived from landsat8 data.

I have tried to perform the Random Forest and I got the error “bound must be positive”, even if all the values of the used bands were >=0.
I have also tried with MLC and MD, but, just like the people above in this discussion, I got a blank raster, full with NaN.

Has anyone managed to understand what is the problem behind these errors?

Regards,
Laura

‘bound’ could refer to the coordinates of your data. Did you project your raster to a coordinate system? Which one?
What kind of data are you working on?

Generally in java this error means your item is empty, here your image (if a java expert can confirm ?) and when he tries to jump to the next item’s object (pixel) bound is negative (don’t know if it’s clear).

So there’s a problem with the image reading I guess (again if someone can confirm would be great :slight_smile: )

hi , Unfortunately I have the same problem

Hi!
After the reprojection, I got some output:


Thanks for your reply.

2 Likes

Hello

I want to make a supervised classification (RF or SVM), I chose the region of interest, when I do the classification RF I receive the following error “bound must be positive”, I made the reprojection and still I have a problem: the LabeledClasses layer is displayed in black, I can not see the different classes.

Please help me solve this problem

I need tutorials, documents or video on classification under SNAP

I am not sure about “bound must be positive”.
What I did for preprocessing the product:

  1. Atmospheric correction: Sen2Cor algorithm [S2A_OPER…]
  2. Resampling the new product [S2A_USER…]
  3. Subset the area of interest (AOI)
  4. Reproject the AOI
  5. Training vectors (masks) [cluster of pixels]: forest, crop, urban, soil …
  6. Apply the supervised classification algorithm (iterative)
4 Likes

Hello,

I read in the SNAP tutorial that it supports the SVM classification, but I do not find it in the supervised classification menu.

Is that someone you have already worked with SVM under SNAP ???

Thank you in advance!

I’m not sure but I think it was included once but was then removed again. It was available only a short time between two updates.

1 Like

OK ABraum

Thank you for your answer.

The SVM is implemented but not yet ready for all to use. I’m not sure when I’ll have time to get back to it - maybe by spring.

The SVM is implemented but not yet ready for all to use. I’m not sure when
I’ll have time to get back to it - maybe by spring.

2 Likes

Hi zgramos,
What is the spatial resolution of the result of the classification ??

Hi,
It is the same as the source image.

Hi,
Thanks for your quick reply, you used all ten bands for the classification ???