Feature Generation and Extraction: This section will cover how to generate canopy features, such as Canopy Cover (CC), Excess Green Index (ExG), and Normalized Difference Vegetation Index (NDVI). Additionally, it will cover how to extract these features using previously created grids or plot boundaries.

Most common vegetation indices used in agriculture:

Normalized Difference Vegetation Index (NDVI)

NDVI = (NIR − Red)/(NIR + Red)

Enhanced Vegetation Index (EVI)

EVI = 2.5 × ((NIR − Red)/(NIR + 6 × Red − 7.5 × Blue + 1))

Soil-adjusted Vegetation Index (SAVI)

SAVI = ((NIR − Red)/(NIR + Red + L)) × (1 + L)*
*L Varies from -1 to +1 depending on the green vegetation density in the questioned area.

Normalized Difference Red Edge (NDRE)

NDRE = (NIR − Red − Edge)/(NIR + Red − Edge)

Modified Soil-adjusted Vegetation Index (MSAVI)

MSAVI = 0.5 × ((2 × NIR + 1) − sqrt((2 × NIR + 1)2 − 8 × (NIR − Red)))

More vegetative indexes can be found here:

Feature Generation

  1. Open QGIS.
  2. Drag and drop mosaic layer, previously generated using structure from motion, into QGIS.
    Make sure mosaic includes desired bands needed for the feature to be generated.
  3. Cick on “Raster” in the top menu > Open Raster Calculator..
  4. In the “Raster Calculator Expression” box, using the bands from the “Raster Bands” box, write the necesary equation for the desired feature to be generated.
    Make sure you are using parenthesis if needed and they are closed accordingly.
  5. Click on “…” from “Output layer” > Go to the desired folder to save the feature > Specify the name > Click on “Save.”
  6. If the formula was correctly written, click “OK.”
  7. Wait for the process to be completed.
    Once the new layer with the desired feature has been generated, you can proceed to Read/Extract values from it.
  8. After the process has finished, you can now close QGIS.
  9. If prompted, click “YES” > On the second prompt, click “Discard.”

Read/Extract Layer Values

  1. Open QGIS.
  2. Drag and drop layer to read values from and plots or grids boundary file (.shp) into QGIS.
  3. Open Processing Toolbox.
    Make sure you have imported into QGIS the grid or plot boundary shapefile created previously.
  4. Search for “Zonal statistics” > Double-click on the tool.
  5. On the Parameters tab:
  6. Raster layer: Select layer to read values from
  7. Statistics to calculate “(…)” > Select desired statistics. For example, mean or standard deviation. > “OK.”
  8. Click “Run.”
  9. After the process has finished, click “Close.”
  10. You can see calculated values in the attribute table of the Zonal Statistics layer.
  11. After the process has finished, you can now close QGIS.
  12. If prompted, click “YES” > On the second prompt, click “Discard.”