Thursday, June 9, 2016

Masking

Today I will talk about a new technique I have learned - masking.

Not all the surfaces present in a remotely sensed image are useful for our analysis. In the case of Axel Heiberg, there is lots of ice and water, which is of no particular interest to our research. On the contrary we want to extract as much information as possible from the rocks present on the island. Ice and water surfaces being very dark or very bright depending on the wavelength pull the spectrum, reducing amount of detail we are able to see within the rock surfaces. This way it would be very useful to get rid of all the ice and water.

Masking solves the problem. Ice and water have very distinct emissivity properties in the short wave infrared part of the spectrum (SWIR). They have very low emissivity values and appear very dark, almost black compared to the rest of the island surface.

First step is to create a Region of Interest (ROI), which would include all the ice and water. In order to do this I used a ROI Threshold tool.

ASTER (SWIR) data values histogram
Looking at the histogram of the emissivity values on the left I set the minimum and maximum in such a way that this range included all the dark pixels of the image, and thus all ice and water surfaces.

However, the result was not very satisfactory. The newly created ROI did not perfectly overlay with the regions of water and ice.
The reason was the mismatch of projections of the two layers I had open at the same time in the ENVI software.



Mismatching projections

Matching projection

It turns out that the ROI tool assigns the projection to the ROI based on the first layer added to the view.
This way I had to use a Reproject Raster tool to convert my SWIR layer to the same UTM zone as the other TIR (thermal infrared) layer I already had.
Once this was done the ROI and the image overlaid perfectly.
Now when the ROI is ready it can be saved as an xml. file.







Next step is using the Build Mask Tool.

The Mask Definition window asks you to choose the file which you want to use for creating the mask. Next I imported the ROI I have just created previously.

A very important step not to miss is to decide whether the area you are masking is the area you are interested in or the area you want to get rid of. The Mask Definition dialog Option tab allows to choose Selected Areas "Off'" or Selected Areas "On". I chose Selected Areas "Off" because I want all the ice and water areas to be assigned a value of 0, while all other areas on the island should receive a value of 1 in the final binary mask. You can see my final binary mask in the figure below.


Binary Mask for Water and Ice








1 comment:

  1. Cool! We should take a look to see if everything that was masked is really ice or water. Salt is also pretty bright, and I want to make sure it didn't accidentally end up in the mask.

    ReplyDelete