AI for farmingMiddleLesson 1235 min read

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.

Lesson in motion

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…

1/4
In simple words
Green leaves are like mirrors for a kind of light our eyes cannot see, called near-infrared. They bounce a lot of it back. They also soak up red light to make food. A sick or dry plant bounces back less near-infrared. A special camera can see this, and colour the field map so weak patches stand out.
Satellites and drones carry cameras that measure more than normal colours. They measure how much red light and how much near-infrared (NIR) light each small patch of ground reflects.

NDVI: a simple crop health number

NDVI (Normalised Difference Vegetation Index) combines the two:
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.
A map of NDVI across a field shows which patches have less green growth than the rest. It does not say why. Low NDVI can mean pests, disease, too little water, too much water, poor soil, late sowing, or just a path or a gap.

Satellites and drones

SatellitesDrones
Area coveredVery large areas, many villages at onceOne field or a few fields
DetailEach pixel is often many metres wideCan see small patches and even single plants
How oftenPasses over on a schedule; clouds can block the viewWhen you choose to fly, if rules and weather allow
Cost to the farmerSome satellite images are free to the publicNeeds a drone, a trained pilot and permissions, often as a paid service
Note
During the monsoon, clouds often hide fields from normal satellite cameras. Some satellites use radar, which can see through clouds, but radar images are harder to read.

Computing NDVI with numpy

Python: NDVI for a tiny made-up fieldpython
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

In India, flying drones is controlled by the government under India's drone rules. Before flying, check the current rules on the government's Digital Sky platform. Things to check include:
  • 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.
Danger
Never fly a drone near airports, military areas or crowds without the right permission. Never spray pesticides by drone without following the approved rules, the product label and advice from your agriculture officer.
Try this. Look at a field from a rooftop or a hill. Can you see patches that look different? Walk to one of them. What is really there: water, pests, a path, poor soil?

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.

~25 min

The problem

This runs in your browser. The red and near-infrared numbers are made up.

  1. Complete compute_ndvi(red, nir) so it returns a numpy array of (nir - red) / (nir + red), cell by cell. Where nir + red is 0 (no data), put 0 instead of dividing by zero.
  2. Set low_count to the number of cells in ndvi that are below LOW (0.3, a level chosen just for this exercise).
  3. Run it and look at the map. Which part of the field would you walk to first?
  4. 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.

Output

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.

Please sign in to continue.

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.

Sign in to take the test and save your progress