Save and reopen ROI over SAR images

In order to get the statistics out of a series of temporal-spatial SAR dataset for water bodies, I need to create ROI (Region of Interest), and perform it over each SAR image one by one.

I dont know whether there is any option to save my ROI (like what we do in ENVI ), and use it multiple times for the rest of my dataset?

Any comments?

Take a look at this topic

1 Like

you can

  1. right-click on your ROI containter > Save geometry as shape file
  2. import it into another product with File > Import > Vector data > ESRI Shapefile
1 Like

Thanks for your reply. I don’t know why, but for some reason, Export Mask Pixels is not active.

This one does work. Thanks a lot!

Regarding the ROI, I have received the following plot. I am wondering the x-axis represent the "Frequency" (if so it should be sth like the number of pixels I assume)?
And for y-axis which represents the value of pixels (on SAR texture image in a range of (0,3) as "Intensity". Intensity and frequency are correct?

In literature, statistically the texture values <1, but SNAP produces higher value above 1 for most of texture features such as contrast, entropy, dissimilarity,… (where GLCM: filtering window size 7, Quantization lever:32; displacement:4 )How it can be justified?
Any comments?


did you plot a profile along a polygon? On which texture?

I would guess, some textures can be >1 when using larger window sizes .

1 Like

A couple of polygons as an single ROI saved. I used Dissimilarity with window size of 7, and Quant. Level of 32.

Are Frequency and Intensity the correct titles for the plot?

Thanks again

if you want to have a look at the frequency of the pixel values, you need to use the histogram tool instead. It can be calculated for given ROIs and shows you the distribution of intensities over your image.

Creating profiles with polygons doesn’t make much sense to me.

1 Like

My objective is to produce a statistical report from the polygons selected as ROIs. Intensity and frequency. So histogram is recommended? What profile plots are for?

profile plots can be used to investigate values along a line. They are in order of occurence while in a histogram their location doesn’t matter.

For your case I would suggest either histogram or statistics:

Both can be applied to ROIs to exclude the rest of the image.

1 Like

I will switch to histogram! Thanks a lot!

For my histogram, I get also kindda shadow! What does it represent?

Thanks agian

the deeper blue is your image the spikes are the enhanced structures due to the calculation of texture. You can compare it the ROI’s histogram before the texture generation, it will presumably only be the lower part.

1 Like

But, I want to get the histogram for ROIs collected from the texture image. Is there any other way I can only get the deeper blue histogram? For some other texture images the histogram for ROIs is normal. Only few act this way!

This is what a histogram does. If you set the ROI on your texture and select histogram you get the raster’s values.

They are correct at least. You can, again, filter the texture image with a small 3x3 mean filter and these spikes will vanish. But they represent some outliers which arise from the texture algorithm, for example along edges.

I don’t quite get what is confusing to you :slight_smile:

1 Like

I have multiple texture images which I only need to get the histogram obtained from ROIs collected from. The ROI was not selected from the edge though.
Since the texture intensity values for the entire image are not a part of our study interest, I just need to focus on the ROIs histograms. However, the justification of histograms like this is kindda challenging while our focus should be only on ROIs range.

I’m sorry, I still don’t understand where the problem is. To me it seems totally fine. :innocent:
Is it of technical nature (so the question would be ‘what do you want to do?’) or is it the understanding of the data (‘how can the information be used"’)?
Maybe you can describe it a bit more detailled, what your study tries to achieve.

In the upper image (entire raster) I see two peaks. The ROI-based one is lacking of the second peak.

1 Like

The objective is to compare the intensity ranges obtained from the water body ROIs over a series of temporal texture images in order to find an optimised threshold for water masking.

The **spikes are kindda confusing to be technically explained. Does that demonstrate that how widely the speckles have been scattered over the texture image where ROIs selected?
Does this have sth to do with the images acquired in a windy day or selected iced- water pixels?

Thanks again

If water bodies are of interest, the ROI approach seems suitable to me. So you can see the values ranges in the histograms which cover water bodies at different times. You could also draw a straight profile line over a water area (and parts of its surroundings) and directly see the transition between water and land.

Working with textures can give you additional information on how the image looks like but it no longer focuses the values of the original image, but more the spatial distribution of different and alike values. So this makes it more difficult: Two images which are totally different from each other (e.g. one with a lake, one within a city) can theoretically generate the same texture histogram because many texture measures are not based on the absolute values but on their relative proportions within the ROI.
In other words: Texture does not always reveal the abundance (or size) of water bodies but more their contrast to the land pixels, the sharpness of their edges (harsh or continually), their interior homogeneity (waves as you said have high impact on texture).

But keep in mind that mostly the window size of your textures determine the spatial scale at which these textures occur. A 3x3 texture strongly addresses speckle-related information while 11x11 pixel windows show patterns at higher levels (for Sentinel-1 11 pixels are at least around 100 meters, within the statistics are calculated.

This is a nice step-by-step tutorial on how the texture images are generated. It will help you understand to what extent texture information can be used for your study.

Also, the SAR Edu tutorial on texture has nice material: