Drones and satellites over fields
Healthy plants reflect light in a special way. Satellites and drones use this to make crop health maps, such as NDVI. Learn the idea, compute it yourself, and know the rules before flying a drone.
In 60 seconds
Drones and satellites over fields
Healthy plants reflect light in a special way. Satellites and drones use this to make crop health maps, such as NDVI. Learn the idea, compute it yourself, and know the rules…
NDVI: a simple crop health number
NDVI = (NIR - Red) / (NIR + Red)- It is always between -1 and +1.
- Dense, green, healthy plants usually give high values.
- Bare soil gives values near zero or a little above.
- Water often gives values below zero.
Satellites and drones
| Satellites | Drones | |
|---|---|---|
| Area covered | Very large areas, many villages at once | One field or a few fields |
| Detail | Each pixel is often many metres wide | Can see small patches and even single plants |
| How often | Passes over on a schedule; clouds can block the view | When you choose to fly, if rules and weather allow |
| Cost to the farmer | Some satellite images are free to the public | Needs a drone, a trained pilot and permissions, often as a paid service |
Computing NDVI with numpy
import numpy as np
# Made-up reflectance values (0 to 1) for a 2 x 3 field
red = np.array([[0.08, 0.10, 0.25],
[0.07, 0.09, 0.30]])
nir = np.array([[0.50, 0.45, 0.30],
[0.55, 0.48, 0.32]])
ndvi = (nir - red) / (nir + red)
print(np.round(ndvi, 2))
print("Lowest patch:", np.unravel_index(ndvi.argmin(), ndvi.shape))Drones need permission
- Whether your drone must be registered, and whether the pilot needs a remote pilot certificate.
- The airspace map: some areas, such as near airports and borders, need special permission or are not allowed.
- Extra rules if the drone sprays anything. Spraying chemicals by drone has its own guidelines. Ask your agriculture department.
Watch and read more
Lab
An NDVI map of a made-up field, computed with numpy, and a count of patches worth a closer look.
The problem
This runs in your browser. The red and near-infrared numbers are made up.
- Complete
compute_ndvi(red, nir)so it returns a numpy array of(nir - red) / (nir + red), cell by cell. Wherenir + redis 0 (no data), put 0 instead of dividing by zero. - Set
low_countto the number of cells inndvithat are belowLOW(0.3, a level chosen just for this exercise). - Run it and look at the map. Which part of the field would you walk to first?
- Write two lines: list three different reasons a patch might have low NDVI.
Practice lab
Edit the code and run it. Python runs in your browser — nothing is sent to our server.
No output. Add print(...) to see values.
You are done when
Hard questions
Try to answer before you reveal. If you can answer these, you understood the lesson.
Q1The no-data cells now show NDVI 0, which looks like bare soil on the map. Why is that a problem, and what would be better?Reveal
A reader may think those cells are bare ground, when really nothing was measured there. That could lead to a wasted trip or a wrong decision. It is better to mark missing data clearly, for example with nan and a separate colour, and to count it separately from low NDVI.
Q2Why is the threshold 0.3 not a rule you can use for every crop and every week?Reveal
Normal NDVI depends on the crop, its growth stage, the variety, planting density and the sensor. Young plants early in the season naturally give low values. A useful way is to compare a patch with the rest of the same field on the same date, or with the same field in past seasons, and then confirm on the ground with an expert.
Questions people ask
Can I see NDVI of my own field for free?
Some public satellite images are free, and some websites and apps show NDVI from them. The detail may be too rough for a very small field. Check the pixel size before trusting a map of a small plot.
Does high NDVI mean a good harvest?
Not by itself. NDVI shows green growth at the time of the image. Weather, pests or problems later in the season can still affect the harvest. It is one piece of information.
Why does the map look different on two dates?
Crops grow, the sun's angle changes, the soil may be wet or dry, and thin clouds or haze can change the readings. Compare maps from similar times, and always check in the field.
Do I need to own a drone?
Usually no. Many farmers hire a drone service. If you do, ask whether the operator and drone meet the current rules, and who will get the images of your field.
Lesson test
5 questions. Get 3 right (60%) to pass and complete this lesson.