Vegetation indices, variability and variable-rate prescriptions
UAT 465 UAS Technology for Smart Farming and Precision Agriculture
Lesson
By the end of this module you will be able to
- Compute NDVI and NDRE and explain NDVI saturation in dense canopies
- Create management zones from index values using quantiles
- Build a variable-rate prescription and compare fertiliser use with a single rate
- Check that management zones make sense against field observations
- Compute vegetation indices from RGB images and choose a sensor to match the question in the field
Why this matters
Calibrated reflectance is still five image bands that are hard to decide from. A vegetation index reduces them to one number per pixel describing crop vigour, which can then be zoned and turned into fertiliser rates. Each index has weaknesses, and choosing the wrong one makes a dense field look uniform when it still varies.
Common vegetation indices
NDVI (normalized difference vegetation index) uses the difference between NIR and red. It dates from satellite work by Rouse and colleagues (1974), and Tucker (1979) showed its relation to green biomass. It ranges from −1 to 1, with dense vegetation high.
When the canopy is very dense, almost all red light is already absorbed and red reflectance barely falls further, so NDVI saturates: it changes little even when the crop still differs. NDRE uses the red edge instead of red. Gitelson and Merzlyak (1994) showed that the red-edge region relates well to chlorophyll content even in dense leaves, so it suits cane at the stem-elongation stage once the canopy has closed.
Example 1 When does NDVI saturate?
Reflectance (red, red edge, NIR) of cane at three stages.
# reflectance (red, red edge, near-infrared) of three cane canopies
canopy = {"sparse": (0.08, 0.20, 0.30), "medium": (0.04, 0.25, 0.45), "dense": (0.03, 0.28, 0.55)}
prev = None
for name, (r, re, nir) in canopy.items():
ndvi = (nir - r) / (nir + r)
ndre = (nir - re) / (nir + re)
note = "" if prev is None else f" change NDVI {ndvi / prev[0] - 1:+.0%}, NDRE {ndre / prev[1] - 1:+.0%}"
print(f"{name:7s} NDVI {ndvi:.3f} NDRE {ndre:.3f}{note}")
prev = (ndvi, ndre)
sparse NDVI 0.579 NDRE 0.200
medium NDVI 0.837 NDRE 0.286 change NDVI +45%, NDRE +43%
dense NDVI 0.897 NDRE 0.325 change NDVI +7%, NDRE +14%
From sparse to medium, both indices rise similarly (+45% and +43%). From medium to dense, NDVI rises only 7% while NDRE rises 14%. For mature cane, NDRE separates zones more clearly.
Creating management zones
An index map has hundreds of thousands of pixels, and a sprayer cannot change rate every pixel, so pixels are grouped into management zones large enough for the machine to switch rates in time. A simple, common method:
- Split the field into equal cells, such as 12.5 rai, and take each cell’s mean index
- Split the cells into three groups by tertiles: low, mid and high, with equal counts
- The agronomist sets each zone’s fertiliser rate from causes found in the field
In QGIS this is zonal statistics followed by grouping. Other methods such as k-means clustering also work, but start with one farmers can easily understand.
Example 2 How much fertiliser does the prescription save?
Mean NDRE of 12 cells, 12.5 rai each. The base rate is 20 kg per rai; the agronomist’s (assumed) multipliers are low 1.2, mid 1.0 and high 0.7, because inspection found the low zones short of nutrients and the high zones over-fertilised for years.
import statistics as st
# mean NDRE of 12 cells, 12.5 rai each
ndre = [0.31, 0.27, 0.19, 0.30, 0.24, 0.17, 0.32, 0.26, 0.21, 0.33, 0.20, 0.28]
cell_rai, base = 12.5, 20.0 # base fertiliser rate (kg per rai, assumed)
factor = {"low": 1.2, "mid": 1.0, "high": 0.7} # multipliers set by the agronomist (assumed)
q1, q2 = st.quantiles(ndre, n=3)
def zone(x):
return "low" if x <= q1 else ("mid" if x <= q2 else "high")
total = sum(base * factor[zone(x)] * cell_rai for x in ndre)
uniform = base * cell_rai * len(ndre)
print(f"tertile cut points {q1:.3f}, {q2:.3f}")
print({z: sum(1 for x in ndre if zone(x) == z) for z in factor})
print(f"variable rate {total:.0f} kg vs uniform {uniform:.0f} kg ({total / uniform - 1:+.1%})")
tertile cut points 0.220, 0.293
{'low': 4, 'mid': 4, 'high': 4}
variable rate 2900 kg vs uniform 3000 kg (-3.3%)
The cut points are 0.220 and 0.293, giving 4 cells per zone. Total fertiliser is 2,900 kg, 3.3% less than 3,000 kg at a single rate. The main benefit is not the saving but moving fertiliser from zones with too much to zones with too little, which is expected to raise yield in the low zones (evaluated in module 5).
Checking zones in the field
A low-index zone is not always short of fertiliser: it may be waterlogged, compacted, diseased or damaged by insects. Before using a prescription, the team must walk several points in both low and high zones, take soil or leaf samples for analysis, and record the coordinates of each point. If the cause is not nutrients, extra fertiliser there is wasted.
RGB vegetation indices and choosing a sensor
With only an RGB camera you can still compute indices from red (R), green (G) and blue (B), such as VARI (Gitelson et al., 2002), GLI (formulas as in the Index DataBase), and ExG where are R, G, B divided by (Woebbecke et al., 1995; Giselsson et al., 2017). These indices separate green leaves from soil, so they suit green area, gaps and weeds, but RGB sees neither near infrared nor the red edge, so it measures vigour only to a limited extent (Tsouros et al., 2019).
Example 3 Can RGB indices separate leaves from soil?
The reflectances of four pixel types are assumed. Each threshold sits halfway between the lowest leaf value and the highest soil or dry trash value.
# reflectance (red, green, blue, near infrared) of four pixel types (assumed data)
px = {"sunlit soil": (0.20, 0.16, 0.11, 0.28), "dry trash": (0.30, 0.27, 0.18, 0.35),
"healthy leaf": (0.04, 0.10, 0.04, 0.50), "yellowing leaf": (0.09, 0.12, 0.04, 0.40)}
leaf = ("healthy leaf", "yellowing leaf")
f = {"VARI": lambda r, g, b, n: (g - r) / (g + r - b),
"GLI": lambda r, g, b, n: (2 * g - r - b) / (2 * g + r + b),
"ExG": lambda r, g, b, n: (2 * g - r - b) / (r + g + b),
"NDVI": lambda r, g, b, n: (n - r) / (n + r)}
print(" " * 5 + "".join(f"{n.split()[0]:>10s}" for n in px) + " threshold")
for k, fn in f.items():
v = {n: fn(*x) for n, x in px.items()}
lo = min(v[n] for n in leaf)
hi = max(x for n, x in v.items() if n not in leaf)
print(f"{k:5s}" + "".join(f"{x:10.3f}" for x in v.values()) + f" {(lo + hi) / 2:9.3f}")
sunlit dry healthy yellowing threshold
VARI -0.160 -0.077 0.600 0.176 0.050
GLI 0.016 0.059 0.429 0.297 0.178
ExG 0.021 0.080 0.667 0.440 0.260
NDVI 0.167 0.077 0.852 0.633 0.400
All four indices separate the leaves from soil and dry trash, but the thresholds differ a lot (0.05 to 0.40), and the yellowing leaf scores only 0.176 on VARI against 0.600 for the healthy leaf. Starý et al. (2020) found that canopy area from RGB indices differed with the camera, so set thresholds from pixels you label yourself with your own camera. This builds a plant mask well, but telling vigour apart in a dense canopy still needs NDRE (Example 1).
| Sensor | Use it when you need | Limits |
|---|---|---|
| RGB (can also be stitched into a 3D model) | Green area, gaps, weeds, canopy height | No near infrared; lowest cost |
| Multispectral (5 to 12 bands) or hyperspectral (hundreds of bands) | NDVI, NDRE, nutrients, crop phenotyping research | Costs more; needs more calibration and processing |
| Thermal | CWSI, drip line leaks | Needs warm-up and reference targets (module 2) |
| LiDAR | Canopy height and shape | High cost, so rare in the studies reviewed (Tsouros et al., 2019) |
Module lab
Lab: from multispectral images to a prescription map
- Load the reflectance images from module 2 into QGIS and compute NDVI and NDRE with the raster calculator
- Compare the two indices in dense areas using the code in Example 1 and the real values
- Split the field into cells, take means, zone by quantiles and compute fertiliser with the code in Example 2
- Walk at least three points in each low and high zone, record the causes, and adjust multipliers with the lecturer
- Compute VARI, GLI and ExG from RGB images of the same field and set thresholds from 20 leaf and soil pixels you label yourself, as in Example 3
Common mistakes
Watch out
- Using NDVI on dense crops, so every part looks the same
- Zones too small for the sprayer to change rate in time
- Adding fertiliser to every low-index zone without checking the cause
- Computing indices from uncalibrated images
- Not recording field-check coordinates, so results cannot be traced
Summary
- NDVI uses red and NIR and saturates in dense canopies; NDRE uses the red edge and separates mature crops better
- Management zones group pixels into areas a sprayer can follow; quantiles are a simple method
- Fertiliser from a prescription is ; the main gain is moving fertiliser to where it is short
- Zones must be checked in the field before use
- RGB indices (VARI, GLI, ExG) suit green area, gaps and weeds; thresholds depend on the camera, and they do not replace near infrared or the red edge for measuring vigour
Check your understanding
- Red reflectance 0.05, NIR 0.45. What is NDVI?
- Red edge 0.25, NIR 0.45. What is NDRE?
- Three 50-rai zones at 24, 20 and 14 kg per rai. What is the total fertiliser?
- Why does NDVI saturate in dense canopies?
- A low-index zone is caused by caterpillars. Should fertiliser be increased?
Answers
- kg
- Dense leaves already absorb almost all red light, so red barely falls further and the ratio changes little
- No; the cause is insects, which need pest management; fertiliser will not fix it
Key formulas
| NDVI | |
| NDRE | |
| Fertiliser from a prescription |
Key references
- Rouse, J. W., Haas, R. H., Schell, J. A., & Deering, D. W. (1974). Monitoring vegetation systems in the Great Plains with ERTS. Third ERTS-1 Symposium, NASA. link
- Tucker, C. J. (1979). Red and photographic infrared linear combinations for monitoring vegetation. Remote Sensing of Environment, 8(2), 127–150. link
- Gitelson, A., & Merzlyak, M. N. (1994). Spectral reflectance changes associated with autumn senescence of Aesculus hippocastanum L. and Acer platanoides L. leaves: Spectral features and relation to chlorophyll estimation. Journal of Plant Physiology, 143(3), 286–292. link
- QGIS Project. QGIS user guide. link
- International Society of Precision Agriculture. (2024). Precision agriculture definition. link
- Tsouros, D. C., Bibi, S., & Sarigiannidis, P. G. (2019). A review on UAV-based applications for precision agriculture. Information, 10(11), 349. link
- Gitelson, A. A., Kaufman, Y. J., Stark, R., & Rundquist, D. (2002). Novel algorithms for remote estimation of vegetation fraction. Remote Sensing of Environment, 80(1), 76–87. link
- Woebbecke, D. M., Meyer, G. E., Von Bargen, K., & Mortensen, D. A. (1995). Color indices for weed identification under various soil, residue, and lighting conditions. Transactions of the ASAE, 38(1), 259–269. link
- Index DataBase. (n.d.). Visible atmospherically resistant index green (VARIgreen) and green leaf index (GLI) [Database entries 356 and 375]. link
- Giselsson, T. M., Jørgensen, R. N., Jensen, P. K., Dyrmann, M., & Midtiby, H. S. (2017). A public image database for benchmark of plant seedling classification algorithms. arXiv:1711.05458. link
- Starý, K., Jelínek, Z., Kumhálová, J., Chyba, J., & Balážová, K. (2020). Comparing RGB-based vegetation indices from UAV imageries to estimate hops canopy area. Agronomy Research, 18(4), 2592–2601. link
Further reading
Study the assigned knowledge units in advance, review media and take the module quiz
Analysis and map layout with QGIS
QGIS
S7 Agriculture: from a crop map to the decision to inspect further
In class / field
Intensive lab and field practice recorded in a lab notebook
Learning evidence: Lab notebook signed by the instructor