Sentinel-2 Classification Problem

I’m going to classify the sentinel-2 image using SNAP 7.0 software however when I run a classifier like Random Forest, it doesn’t work properly. In fact, RF command executed without any error but when I click on the output in the product explorer tab, it shows nothing or a black image on the screen.

In order to classification, I’m following up these steps:

  1. Subset raster
  2. Resampling
  3. Collecting training data
  4. Classification

Classification output in my project has shown in the below picture:

How were you able to subset the product before resampling? Normally, SNAP prevents subsets performed on multi-size products (10, 20 and 60 m)

It is true but in SNAP 7.0 you can subset first and then execute resampling. I tried and it works. However in SNAP 6.0 it is impossible.

Thanks for your replay and helps.
Do you have any suggestion for classification problem?
Did you execute classification command (like Random Forest) in SNAP 7.0?

Sincerely,

Not really, sorry. What input bands did you select?

I’ve tried a variety of input bands like 2348 or all bands together but non of them work properly. Now I’m going to install SNAP 6.0 and try classification procedure again. Previously, I’ve executed supervised classification in SNAP 6.0 without any problem and I think this problem caused by a built in bug in SNAP 7.0. If I reach to a meaningful result on this case I will share with you.

Sincerely,

maybe something went wrong during the update to version 7. Please let us know if it works when you go back to SNAP 6.0

I don’t know but I have same problem in SNAP 6.0. Do you have any tutorial or user guide for sentinel-2 classification procedure in SNAP software?

I saw many video tutorials in youtube but they didn’t use sentinel-2 images.

Sincerely,

how did you resample the subset?
When I run the S2 Resampling operator on the subset product (it does work, you’re right), I get this message:
grafik

Maybe you first run the S2 Resampling operator and create a subset afterwards. This takes longer, but worked for me in the past.

I don’t have any problem in resampling operator and it works well. I’m following these steps:

  1. download S2 L2A
  2. open in snap 7
  3. spatial subset using subset operator
  4. resampling suing resampling operator: make all bands same pixel size.
  5. collecting training data from resampled data
  6. open Random Forest Classification
  7. insert data
  8. select training data
  9. select bands
  10. defining output address
  11. run
  12. processing completed
  13. shows bad result!

It was reported here that Sentinel-2 data has to be reprojected to WGS84 before collecting the training data and applying the classification:

a few minute ago I’ve tried random forest classification for landsat data and it works well without any problem. I think coordinate system cause this problem, according to this now I’m gonna to check sentinel-2 coordinate system and I will share you final result.

Sincerely,

Dear Braun

When I changed sentinel-2 coordinate system to wgs84, classification problem has solved completely.

Thanks for your excellent support.

Sincerely,

good to hear, thank you!