Blog | Descartes Labs

Get to Know Marigold (Part 3): Vegetation and Water Masking

Written by Descartes Labs | Sep 4, 2024

Welcome to Marigold! This is part 3 of our Get to Know Marigold blog series with helpful videos. Previous blog series can be found here. Part 1: Functionality and Processing Tools | Part 2: Introduction to the Bare Earth Composites

In the following video snippets, we will walk through how to create and deploy vegetation and water masks using the Descartes Labs’ Marigold software built-in capabilities. 

Masking

Masking is a crucial stage of your remote sensing processing workflow. Identifying and removing surface cover types that are not relevant to you from your data will help to improve lithological discrimination, identify areas of outcrop, and most importantly: remove potential false positives from the data. 

Data you may want to mask includes areas with:

  • No data
  • Vegetation
  • Water
  • Snow or Ice
  • Shadow
  • Cloud or cloud shadows
  • Non-bedrock surficial materials (i.e. dunes)

Creating a False Color Composite


For masking vegetation, you’ll first need to identify vegetated areas by using a False Color Composite. To create this in Marigold:

  • Go to the Raster Management dropdown in your Processing Toolbox and select the Create RGB tool. 
  • Select the product you want to use, in this case our Sentinel-2 Bare Earth Composite, and then select the bands you need. 
  • For a False Color Composite: select the near infrared (or NIR) band for the red channel, the red band for the green channel, and the green band for the blue channel and then provide your layer with a name. 
  • Once loaded, use the Magic Wand tool to perform a contrast stretch over your area of interest. 
  • Any vegetation in your imagery appears in red for you to target with our masking tools. 

Creating a Vegetation Mask


To begin masking this vegetation, open the Masking section of your Processing Toolbox and select the Vegetation mask option. Here you can generate your mask using pre-computed indices: MTCI, NDVI and VH radar response. Please read the description for each index before applying masks.

Tip: The VH Radar Response option is primarily used in areas with dry vegetation.

Use the slider tools to adjust the extent of your vegetation mask based on the False Color Composite’s red pixels. Once you are happy with your mask, provide a name for your layer and click Calculate Vegetation Mask. 

Creating a Water Mask


To create a water mask, select the Water mask tool from the Masking drop down in the Processing Toolbox. This will open a similar dialog to the vegetation masking tool using a water occurrence threshold. Adjust the slider to match the extent of water seen in your imagery. Finally, provide a name and select Calculate water mask. 

Applying a Mask


To apply a mask you create to a dataset of your choice, select the Apply Mask tool in your Processing Toolbox, and then choose the dataset you wish to mask, in this case the Sentinel-2 Bare Earth Composite. 

Tip: You can also draw or upload Vector data to use as your mask.

Next, select the mask you wish to apply to that data, provide the output with a name, and then select Mask Layer. By turning off other layers and changing our basemap, you will now see where your data has been masked, in this example removing the vegetation from the imagery. 

Batch Masking


If you want to apply more than one mask at the same time, select the Batch Masking tool in the Processing toolbox. Choose the desired masks and then select the dataset for mask application. At the bottom, type the suffix that you want appended to the existing layer name. Then, click Mask Layers. In this example, both vegetated and water areas are masked from the imagery. 

 

In the next Get to Know Marigold blog series, you will learn how to mask more complex surface cover types, like shadow, to help prepare your data further. Once you have masked your data, you can use Marigold’s processing tools to identify lithologies, alteration and mineralization with even greater confidence.