Working with Multispectral Data in Pix4D and Third-Party Software

Part 1: Introduction to Vegetation Indices and Pix4D

By Jacob Nederend

MSc Candidate, Department of Plant Agriculture, University of Guelph, Guelph, ON, Canada

What is a vegetation index and why can’t I just use NDVI?

In the previous post, I provided a general overview of how to obtain high quality orthomosaics from your eBee’s raw imagery. For agricultural UAV mapping, the last step in that workflow is obtaining reflectance maps from which vegetation indices (VIs) can be calculated. There are numerous resources available online that explain how VIs exploit patterns in the reflectance of visible and near-infrared light, however, a brief definition is the mathematical transformation of at least two spectral bands to enhance the definition of vegetative cover. All of the multispectral sensors currently used for UAV mapping are broadband, with the exception of very expensive and specialized hyperspectral sensors that measure hundreds of narrow bands (<5nm). Since most VIs were developed from broadband satellite data, they can be easily adapted for the analysis of UAV imagery. Be aware, however, that a specific sensor’s definition of a band (e.g. red-edge) may be significantly different from the bandwidth used to develop a VI. Sensefly and Micasense provide lab-tested definitions of the spectral sensitivity of their sensors, so be sure to cross-reference these with the bands used in a VI’s mathematical formula.

Figure 1. The reflectance patterns of corn (left) and canola (right) as measured by an 8-band handheld spectroradiometer during the growing season (Hatfield and Prueger 2010).

The diversity of VIs developed for agricultural monitoring is overwhelming, and offers a lot of redundancy in terms of the analyses that can be conducted. Still, there is one VI that is pervasive in the mapping of agricultural fields and that is the Normalized Difference Vegetative Index (NDVI). First developed in 1978, this index is an robust estimator of green vegetation cover which has led to its use in estimating and predicting leaf area index (LAI), plant health and fertility, and yield. Unfortunately, the

NDVI is not a cure-all solution for monitoring crops. The presence of soil interferes with the spectral signature of the plants themselves, which can lead to underestimating the NDVI. Though it logically follows that NDVI works better when the LAI is greater (i.e. the leaf canopy covers the inter-row space), there may be accuracy issues when the LAI begins to saturate during the crop’s development. Considering that the reflectance patterns across a field are not constant during the growing season [see Fig. 1 for examples], it does not make sense to rely exclusively on the NDVI as a measure of crop health when other VIs are available. An excellent summary of the seasonal differences in crop reflectance and its effect on VIs can be found in the following article, which is available through Google Scholar:

Hatfield, J. and Prueger, J. 2010. The value of different vegetation indices to quantify agricultural crop characteristics at different growth stages under varying management practices. Remote Sensing, 2: 562-578.

Included in the article is a list of VIs and their associated formulas and purposes which I adapted under Table 1. Browsing this list, it becomes apparent that many VIs follow the same general formula, and those with the most similarity are related to the same parameters. These VIs can be easily calculated in Pix4D’s Index Calculator during, or after, Step. 3 processing.

Table 1. Vegetation indices used in the study by Hatfield and Prueger (2010). The letter “R” denotes broadband reflectance for the given subscript, while numbers in subscript indicate narrow bands.

Generating Vegetation Indices in Pix4D

If this is your first time generating a VI in Pix4D, there are specific options in Step 3 that should be selected prior to running the processing step. Ensure that any radiometric corrections are applied if available [Fig. 2]. This step converts the pixel values from arbitrary digital numbers (DNs) to actual reflectance ranging from 0 to 1. Ensure that you adjust the output resolution if desired, and leave the Downsampling Method as “Gaussian Average”. This will smooth away salt-and-pepper speckles or other noise in the reflectance maps. Also select to output GeoTiff reflectance maps with the tiles merged if you plan to run analyses in third-party software. You can opt to generate a pre-loaded VI such as the NDVI, or wait until after processing to add an additional VI like one of those listed in Table 1.

Figure 2. The radiometric calibration tool featured under the Index Calculator tab of Step 3 processing.

Vegetation indices are calculated just like any other mathematical expression, only the calculation is repeated for every pixel in the scene. As long as you supply accurate reflectance data where pixels are in the range of 0 to 1, there is no limit to the number of indices you can generate and more importantly, there is no need to pay extra fees to cloud-based processors for so-called “algorithms” or “apps”. Pix4D includes an “Index Calculator” to carry out this math, but any GIS software will include a similar tool under the name “Raster Calculator”. The Index Calculator in Pix4D can be accessed after running Step 3 processing, and will display your reflectance and/or index maps if you chose to generate them [Fig. 3]. If you did not, you can generate the reflectance maps now, but beware that this step can take many hours to run.

Figure 3. The Index Calculator view of Pix4D In this example, a region was previously selected to generate the index for only the chosen area. Note that the list of reflectance maps on the righthand side includes 9 bands because surveys from three cameras were combined in this project.

Once the reflectance maps are generated, you can select indices to calculate by clicking the “Indices” button on the righthand side [Fig. 4, left]. Recall from the previous blog that I suggested combining all your surveys into the same project for a site so that the bands are accessible in the calculator (some VIs require more bands than a single sensor can provide; e.g. the EVI), and so that you can rename the groups. In this case, I created a group for each camera which is the prefix for a given band. In the Indices box, there are several preloaded indices as well as several that I created. The last box indicates an error because my formula is not consistent with the “Group_band” naming convention of this project. To add a new index, simply click “Add” and enter the formula into the calculator [Fig. 4, right]. Note that when you generate an index you should minimize the number of flights used. For example, if you flew all three of the Canon S110 cameras it would be poor practice to calculate NDVI using the Red channel from the RGB camera and the NIR channel from the NIR camera. In other cases, using multiple flights is unavoidable if you need to use RGB plus NIR wavebands.After generating the index maps you have several options for export. Pix4D will automatically save GeoTiffs of the reflectance and index maps at the resolution you opted to downsample to. Alternatively, you can output a shapefile which can be imported to most GPS devices. You can also append a prescription to this shapefile after examining the index map to delineate management zones.

Figure 4. The “Indices” dialog for the Index Calculator map view (left), and the index calculator itself (right). The custom index in this example is the EVI from Table 1.

Exporting Multispectral Datasets to Third-Party Software

While Pix4D offers an easy way to generate orthomosaics and basic multispectral data, you may find it lacks more specialized features like pixel classification, data extraction, or the ability to use complex VIs. Fortunately, the GeoTIFF files generated in Pix4D can be read by virtually any remote sensing program to take advantage of these advanced functions. Remote sensing analytics is abundant, with both paid and Free and Open Source Software (FOSS) options. Some of these include:

  • Paid Software:
    • Esri ArcGIS Desktop and ArcGIS Pro
      • The standard for commercial and academic GIS processing
    • ENVI + IDL
      • An advanced remote sensing software specializing in multispectral and hyperspectral analysis
    • Trimble eCognition
      • Features the multiresolution image segmentation algorithm for identifying objects
      • The most advanced Object-Based Image Analysis software available
  • FOSS Software:
    • QGIS
      • The most prolific FOSS alternative to ArcGIS
      • Features many plug-ins for advanced analytics
    • Orfeo Toolbox (OTB) + Monteverdi
      • OTB is the underlying software while Monteverdi is a simple-to-use GUI
      • Features segmentation algorithms similar to eCognition
      • Self-contained: no need to install, just download and run
    • Whitebox
      • GIS and remote sensing tool with a focus on LiDAR and point-cloud data
      • Multiplatform (Windows, OSX, Linux) for any PC with Java installed
      • Self-contained

These tools can expand the usefulness of a UAV map beyond the visual interpretation we can do in Pix4D, and can also improve the accuracy of crop health estimates. In Part 2 of “Working with Multispectral Data”, I will outline a new RGB vegetation index, the Excess Green Index, that can’t be calculated in Pix4D. By the end, you will be able to calculate this index in ArcGIS, and have a basic understanding of automating repetitive tasks. In the meantime, please check out the resources and software listed in this post as you explore the ways different VIs can be implemented in agricultural mapping.

References

Hatfield, J. and Prueger, J. 2010. The value of different vegetation indices to quantify agricultural crop characteristics at different growth stages under varying management practices. Remote Sensing, 2: 562-578.

 

Back to top