Split image into multiple small parts (water detection)


#1

Hi everyone,

I would like to ask if it is possible to split image - Sentinel 1 - to multiple small parts by vector grid. My task is water detection.

I detect water by aplying tresholding. The problem is I would like to do this automated water detection for larger area and problem is with histogram. If area is too big It is hard to apply tresholding because there is not enough water pixels to “affect” histogram. Histogram from big area do not look like histogram below so I do not know how to find local minimum.

I want to split image to small parts for better results by grid or use some other process to do that. Mainly I want to get image, split it to equal small parts and process each part alone than put it together again.

Can I do that in SNAP ? If not, could you tell me what should I do ? Do you have better solution for my problem ? Thanks.


#2

I’m not sure if it makes sense thematically, cause I’m not familiar with the radar matter, but technically you can do several subset of your product. This can be easily done if they always have the same size. in this case you can always use the same pixel coordinates.
The you can do your analysis. Merge the results is also doable by using the Mosaic operator.

Another option could be to implement your own operator.
Our Graph Processing Frameworks processes the data tile-by-tile. So you already have smaller parts. On these tiles you could compute the histogram.
For an introduction of implementing an operator you can have a look here: https://senbox.atlassian.net/wiki/spaces/SNAP/pages/24051787/How+to+integrate+a+new+processor


#3

Thank you for answer, very informative as always marpet :slight_smile: I will look at operator and I also have thought about applying subsets. Thanks


#4

Dear zubro,
I too work on the same research problem. I wonder if you were able to successfully done your analysis, please let me the know the procedure. How did you implement an operator?


#5

Hi marpet,
I am new to Graph Processing Frameworks processes. Can you guide me the step by step process for split the image?


#6

If you are new to the GPF you should have a look at these two tutorials:
https://senbox.atlassian.net/wiki/spaces/SNAP/pages/70503590/Creating+a+GPF+Graph
https://senbox.atlassian.net/wiki/spaces/SNAP/pages/70503475/Bulk+Processing+with+GPT

For an specific example to split a product into several tiles, please have a look here:


#7

Thanks marpet. I will try for my data.


#8

Hi Saiplanner,

I have used TileWriter modul in SNAP. It can split your imagery in multiple parts. You can split by defining number of tiles - 8,16,32…or by defining height and weight of the parts you want to get.

Have a nice day.
Lukas


#9

Oh, that’s a nice one. Didn’t knew this operator.
As it is only available in S1TBX, this Toolbox needs to be installed if not already done.


#10

Hi zubro,
can u share your xml files.
Thanks.


#11

Sure, here is the XML file and screen of tool in graph builder.

TileWriter.xml (862 Bytes)