Coherence Masking

Hi guys, i’ve succeed to mask out the low coherence in SNAP. but when i tried to export to .TIFF and i opened it in QGIS it shown the original displacement band with no masking. Do you guys know how to mask it out in QGIS?

Check what the NoData value is in your image then input the NoData value in the QGIS layer property.

In my sample image below my NoData value is zero.

1 Like

you can create a masked Band in the Raster Calculator which returns 0 when you are below the coherence threshold. For example, if you want to set all values lower 0.3 to 0, you can use

("Band 2" < 0.3) * Band 1

1 Like

Thanks for this link but as it is obvious they first produced displacement map which is the product after unwrapping and them did masking…so, then why its title is:

Masking low coherence areas before unwrapping?

Another point, if we plan to make our unwrapped result better, so we need to ignore low coherence…is not it?
if this is the plan, so we should do it before unwrapping NOT after unwrapping…is not it?

Hi,

I read this topic.

I know to have better unwrapped result, we should have high coherence values and mask low coherence values but which step (when) we should do it?

1)in my idea, we should do it before unwrapping step and when we have phase results. Then after masking low value coherence results, then we can do unwrapping…is not it?

Or

  1. actually I found here:
    http://step.esa.int/docs/tutorials/S1TBX%20TOPSAR%20Interferometry%20with%20Sentinel-1%20Tutorial_v2.pdf
    and
    Masking low coherence areas before unwrapping - RUS tools & computing environment offer - RUS user forum

That explanation said that do it over displacement result….but this is strange…because we have already unwrapped and displacement result, so can deleting low coherence area for ready displacement map help to increase quality of displacement or unwrapped maps…?

I do not think so…

In overall, I think we should do coherence masking before unwrapping NOT after unwrapping and over displacement map…

?

Let’s not mix things up.
Masking before unwrapping helps to prevent unwrapping erros in areas of phase noise.
Masking after unwrapping (e.g. of the final results) can help to prevent false interpretations of mathematically derived results (e.g. unrealistic displacement)

They serve different purpose and depending on when you apply it, you might get different results. In the end it depends on the spatial distribution and proportion of low coherence areas.

YES. Thanks Mr@ABraun…you are correct…but if we have low coherence around high coherence area and if we did not mask low coherence area, then can low coherence area affects on results of high coherence area too?

Please share screenshots of your interferogram and coherence.

is it possible to find the number of masked pixels out of the total number of pixels of the coherence map?

yes, first you define them with the mask manager and then have the number of mask pixels and area calculated with menu / Raster / Masks / Mask Area.


The mask manager is empty. I cannot include any of the layers into it

Please click on the f(x) icon to define a mask first.

Yes. I wasn’t entering a boolean expression for the mask manager, that’s the issue. Thank you, sir.

  • Does range doppler terrain correction matter if done before or after calculating the mask area and number of masked pixels?

  • Is there a way to only view the mask without the background of the original layer?

as bilinear resampling is involved, the masked area might slightly change. But shouldn’t be too much. You can calculate the mask before and after to see if the values change. If your data are in slant geometry, the mask area is more correct after terrain correction.

yes, with the layer manager.

I appreciate it. I managed to also export the masked image as a KMZ file but how may I show the masks as a legend on Google Earth ? Because this is what I have got

You disable all layers in SNAP with the mask manager, then start the kml export.

I have done that but the mask itself wasn’t exported. Only the filtered coherence map on the viewer was exported, the bottom-most layer on google Earth’s places

When I display a mask in SNAP and export it to KMZ it works.

All data

Only mask displayed (0% Transparency)

Export this to Google Earth

Could you explain the difference between low-coherence pixel filtering before the unwrapping stage and low-coherence pixel filtering after the unwrapping process?
What is the most effective option in such an area with vegetation?

Thanks in advance

Before: Decreases the chance for potential unwrapping errors which are introduced in noisy areas
After: No effect on the result, but transparent communication of invalid areas.

1 Like