Supervised Wishart Classification Problem (Training data set)


#1

Hi,

I´m trying to do Supervised Wishart Classification with an SLC Sentinel-1 product. The product I´m using is:

S1A_IW_SLC__1SDV_20150905T190457_20150905T190526_007584_00A7F6_7E7E

I have done this steps:

  1. Split of the area that I´m interested.

  2. Deburst processing.

  3. Subset of the area that I want.

  4. Radiometric calibration (with complex data output because of the polarimetric technique classification).

  5. Drawing with the polygons geometries the training cluster areas.

  6. Execute “Supervised Classification Training” to generate “training_cluster_centers.txt”.

    I have realised that for correct generate the training data set txt you must do the Supervised Classification Training at this step, before doing a Terrain Correction, by other way, error comes.

Thing is that, now I have done this, I try to execute “Supervised Wishart Classification” with the training data set. Notice that when you execute this step, it seems that is necessary a quad pol product. The error that I have is in the pictures.

I will thank you very much to someone that has tried succesfully this classification technique with SLC Sentinel-1 products.

Aridane




#2

hi aridane,
I have the same problem. What is your Source Produkt? I tried it with the Input of the coherency matrix C2 from the operator Polarimetric Matrix Generation.
But it didn’t work.

Someone else a solution?


#3

Hi Tim Patelscheck,

Some guys from Alicante University (Spain) have told me to use the PolSARpro software, so, Im just trying to use it, since yesterday. Try to install it, and perhaps together, we will find a solution, because I have seen that for them, it worked with a SLC_IW product but in PolSARpro. PolSARpro is a software from the ESA too, so install it. I think is not very easy to use, because of the old interface, but it has a lot of tools inside. Keep on contact. My source product is an SLC_IW also, so I hope to find success!

Aridane


#4

Hi,
I meant your source product (input) when you are using the supervised withart classification. I think you cannot use the product after a deburst. I think you also have to do the operator Polarimetric Matrix Generation.

I have already installed the PolSARpro software. The Problem is, that I can not use the Sentinel Data.
I explained the problem here : Data Conversion PolSar

Let me know when you have found a solution.

Cheers!


#5

Hi Tim,

I like this fast answers…on this way, we can find a solution working together. I coment the next:

The product I am now using and I recommend you to practise is this:

S1A_S3_SLC__1SDH_20150224T001803_20150224T001827_004758_005E60_19DD

It is located at the United States, the industrial coast of Houston. The boundaries of this product is that it is made on Strip Map mode SLC (amplitude and phase) and it has dual cross polarized HH+HV so, it has got a lot of resolution for classification purposes. Im using just as a practica, but Im interested about other zone. But this is not a problem since you can export this area on SNAP to Google Earth (kmz) to see optically and check what you are going to classify. (Im doing like that).

Once you have the product, for this there is no necessity of deburst (deburst is for IW). However I can tell you that for IW products, if you first split, then deburst, then subset your are (to save pc power), then calibrate with output complex data…you can obtain the C2 matrix without problem on SNAP. Also I recommend to do the Speckle Polarimetric Filtering which makes Speckle Filtering making first the C2 matrix. Note that with Sentinel -1 products we can only do C2 matrixes because we are working on dual pol. Never T2 or T3 or the others (I think, Im not sure, but I think). After that, you can do many things such as Unsupervised Wishart Classification or H-alpha decomposition. Note that this must be done always done before Terrain Correction.

The problem occurs when you try to do Supervised Wishart Classification…I dont understand why, but the SNAP gets an error with the training_cluster_centers.txt. I dont get why, but I notified on the topic “Creating new vector data containers” Creating "New vector data container" the error lines on the java code program.

For this reason Im trying with PolSARpro as a solution. Reading manuals, traning pdfs…

Once I have done a little of this, I have exported my Stripmap product to PolSARpro and yes, it generates a txt that makes a problem when you define your main work folder…it says “Wrong Polar Type”. As I was getting bored, I played the txt filed, and changed PolType to “full” (as a last hope). For my surprise it worked! I have opened it on PolSARpro and now, Im trying to understand some processes we can do here, and the tool! If you need help to open it, just tell me.

I think together, or with more people, we can do a lot more, than everyone on his own…

Thank you very much…

Aridane


#6

Hi again,

One thing that I think its very important to understand for using PolSARpro, is precisely the C2 matrix. I mean, how it is made by the Sentinel with the information i and q from HH+HV. Cause with this information, we will run the polarimetric processes on int.

For example, on PolSARpro you can do (practising ok) a Sinclair decomposition that it is blue (mod HH), green mod((mod (HV) + mod (VH))2), red mod VV… This is for example when you have a T3 matrix, that you get from a quad pol product. This is not our case, but knowing our matrix, will provide what can we do with them. For the moment I assure, that Wishart Classification Supervised it is possible since some guys have told me it.

Thank you very much for reading, if anyone it´s on the same, follow and keep on.

Aridane


#7

Hi Aridane,

Thank you for your fast answer! I’ll try it out with “full” :grinning:

I will always write here when I found something interesting.


#8

Hi, I tried it but it didn’t work. When I change the config.txt in full I get an error.

My input is an SLC-IW which i split and deburst before. Is this right?


#9

Yes,

It is right, you can also subset if you want. This is not an error, is a warning! You have configured your folder work only…now you have to extract the data. Say no and its alright. I pass you this screenshots…

Note that I used the data of the results of the polarimetric speckle filtering that makes C11,C22 C12real, C12imag… Then exported to PolSARpro format ok! I think is also possible without C11,C22 the thing is that when you open on PolSARpro, you have to define these files to open them… (this part i dont understood very well).

I mean first, get the work folder as your folder of PolSARpro converted product (that you have made from SNAP), say no. Then press the yellow square button at the top left and press single Single data set. Them go to Import. Then Raw Binary Data, and here is where you have to define the product…the columns and rows, the format, the files…

Try and tell me,

Aridane




#10

No I don’t works.


What do I have to type in into the Rows and Cols? I tried it with your numbers but…


#11

If you see the config txt says to you the thing that you have to put into the raw binary input data, also the rows and columns…!

Aridane


#12

Thanks, but there is still a problem:

Do you have any idea what this means?
Thank you so much for helping me!!!


#13

Yes, it means that is correct! This is an advice, it means that now you have to extract the data. Go to Import, Extract, Full Resolution…and start testing and investigating, im at the same point.

This is for a work (final project) at the university for me, what are you doing?

You´re welcome, toghether we are more,

Aridane


#14

You have check the IEEE square box, I didnt put it…this is for Big Endian /Little Indian data format type…I dindt put ok…!

Aridane


#16

As you said, you use C2 matrix output by the snap, but here the input is S2 matrix, So the software thought it is S2, no C2, how to extract ,the out put choose what? S2?
and why the output for quicklook is two images?


#17

You probably don’t have the correct width and height of the image. It’s
probably half of what it should be.


#18

no, the row and the col is right, I copy it from the config.txt. I think it is the problem we can not put C2 matrix as s2 matrix to import. But I find a work around method that we could put C2matrix as C3 matrix to import . And then, you could convert c3 to c2-pp2. It could deal with the output of snap. And the result also could be use to snap again.


because I think the sentinel 1 model of PolSARpro is not good at dealing the IW mode data of sentinel 2 for the bursts.


#19

I had the same problem at the start…the twice images and those strange lines haha…

The error is at input raw binary data, see my screenshots. It is for stripmap (pp1 because HH and HV) but its exactly the same for IW (if it is VV VH change to pp2).

Do like this, and I assure it wont occur. But trust me, results in IW are not very good, because of resolution.

Try!

Aridane


#20

Also, I forgot, if it is VV, VH, change to partial (S22, S12) ok!?

Aridane


#21

hi, aridane:
I input the original PolSARpro format from the Snap, as you shows ,It is very strange, as I said to you ,I can not get good images, But the method I mentioned above is ok. I think it is a good way to deal with the sentinel 1A IW data. we could out put C2 matrix from the snap, and input it as C3 in PolSARpro. then convert it to C2-pp2. It works well ,see my image output, it is good.

Li