Lumipad ← Back to homepage
Library · Sensors

NDVI camera build — Raspberry Pi guide.

A low-cost vegetation-imaging rig that mounts to any Lumipad airframe. Pi NoIR camera plus a Rosco blue filter, controlled by a Raspberry Pi running open-source Python. Built from the same parts trainees use in Week 4. Adapted from the Raspberry Pi Foundation's Astro Pi NDVI tutorial.

Version 1.1 · Updated 04·2026 Author: Lumipad Engineering License: CC-BY-SA-4.0 Languages: EN · TL · CEB
~$72
Total component cost
95g
Mounted payload weight
3–4h
Build & calibration time
0.3–0.7
Healthy NDVI range
What and why

Photosynthesis, made visible.

Healthy plants reflect a great deal of near-infrared (NIR) light and absorb most visible light for photosynthesis. Stressed or dead plants reflect less NIR and more red. The Normalised Difference Vegetation Index — NDVI — turns this contrast into a single number per pixel: (NIR − VIS) / (NIR + VIS). Healthy crops fall in the 0.3–0.7 range. Below 0.2 means stress, disease, water issue, or bare ground.

Commercial multispectral cameras for this work cost ₱150,000 and up. The Lumipad rig — a Raspberry Pi, a Pi NoIR camera, a square of Rosco theatre filter, and ~50 lines of Python — does the same essential job for under ₱4,200 in parts. It's not as good as a MicaSense RedEdge for research-grade work. It's good enough for the field-scale crop-health surveys our cohort alumni actually do, and it's repairable from any Filipino electronics market.

By build step

Pick a step. Get the procedure.

The build sequence below mirrors how trainees do it in Week 4 of the curriculum. If you're following along on your own, do the steps in order — each builds on the previous, and the camera modification in Step 2 is irreversible. Don't proceed past Step 2 until your camera passes the smoke test.

The default tab below is Step 1 — Components. Most parts are readily available online within 5–7 days; the Rosco filter is the only item that often needs a separate order from a theatre-supply house.

Step 01 ~$72 USD · ~₱4,200 PHP · 5–7 day shipping

Components.

Eight parts. Most are readily available online; the Rosco filter is the one item that usually requires a separate order. Total cost is well under one-tenth what a comparable commercial multispectral camera costs, and every part is replaceable if it breaks in the field.

Why these specific parts:

  • Pi Zero 2 W over Pi 4 — lighter (10g vs 45g), runs the capture script fine, lower power draw extends flight time.
  • Pi NoIR camera v2 (IMX219 sensor) — already has the IR-cut filter removed at the factory. Saves the modification step required for the HQ camera.
  • Rosco #2007 Storaro Blue filter — the same filter the Astro Pi rig uses on the ISS. Passes blue + NIR, blocks red and most green.
  • 32 GB microSD (A1 rated) — A1 is the random I/O class needed for smooth capture; SanDisk Ultra works reliably, no need for higher class cards.
ID Component Make / model Cost (USD / PHP)
N1
Microcomputer The brains. Runs Raspberry Pi OS Lite, the picamera capture script, and writes images to the microSD card. Pi Zero 2 W has built-in WiFi for post-flight image transfer.
Raspberry Pi Zero 2 W
$15 / ₱870
N2
Camera module Pi NoIR camera v2 (Sony IMX219 sensor, 8MP). The "NoIR" version comes with the IR-cut filter already removed — critical for our application. Don't buy the regular Pi Camera v2 by accident.
Raspberry Pi NoIR Camera v2
$25 / ₱1,450
N3
Camera ribbon cable The Pi Zero uses a smaller mini-CSI connector than the standard Pi 4. Need the Zero-specific ribbon cable, NOT the standard Pi camera cable.
Pi Zero camera ribbon cable (15cm)
$3 / ₱175
N4
Vegetation filter Rosco #2007 Storaro Blue theatre lighting gel. Cuts a 12mm × 12mm square and place it directly over the camera lens. Blue filter is what the Astro Pi guide specifies. A red filter alternative (described in Step 2) gives better long-distance results due to reduced atmospheric scattering.
Rosco #2007 ("Storaro Blue") gel sheet
$8 / ₱465
N5
Storage 32 GB is enough for ~1,800 high-res images at the 12MP capture setting we use, more than enough for any single-flight survey. A1-rated cards have the random-I/O performance the picamera library needs.
SanDisk Ultra 32GB microSD A1 (or equivalent)
$8 / ₱465 · Any electronics store
N6
Power The Pi Zero 2 W runs on 5V from a small UBEC. We tap power from the Lumipad's flight controller 5V rail (which has clean filtered output), not directly from the battery.
Matek Mini 5V/3A UBEC (input 6–32V)
$6 / ₱350
N7
Mount & case Custom 3D-printed mount that bolts onto the Lumipad camera plate. STL files are in the build kit zip. PLA prints fine; PETG is more heat-tolerant if you fly midday in Davao sun.
Lumipad NDVI mount v2 (3D-printed)
$5 / ₱290 · Print locally or order from PrintIt PH
N8
Cables & standoffs JST connector for the UBEC, M2.5 standoffs and screws (8mm), small zip ties, and 28 AWG silicone wire for the power tap.
Standard hardware kit
$2 / ₱115 · Any RC or electronics shop

Total cost summary

Buying all parts together brings the total close to:

  • USD total: ~$72 (₱4,176 at ₱58/USD)
  • + shipping: Varies by source — domestic orders are often free; international adds ~$15
  • + Rosco filter: Often bought separately — ₱400–800 plus delivery
  • Total realistic spend: ₱4,200–₱5,200

A common temptation: substituting the Pi NoIR for a "no-name IR camera" at half the price. Don't. The non-NoIR alternatives have unknown spectral response curves, the IR-cut filter may or may not be removed, and the picamera Python library doesn't always work with them. Stick to the Raspberry Pi Foundation parts.

From plant to PDF

Six stages of an NDVI image's life.

What actually happens between the photons hitting a leaf and the client opening a PDF report. Each stage adds something; understanding the chain helps with debugging when something goes wrong.

D1
Light hits leaf
Sunlight · NIR + visible
D2
Camera captures
Pi NoIR + Rosco filter
D3
Pi processes BGR
picamera array · per frame
D4
NDVI calculation
(R−B) / (R+B)
D5
Calibration applied
Reference target · per-flight
D6
Platform stitches AOI
Orthomosaic · client report
What it can & can't do

The Lumipad NDVI rig in real surveys.

Examples drawn from Cohort 02 surveys flown over the past 12 months. The rig handles standard agricultural use cases reliably; for some advanced applications, it's a starting point that a more expensive multispectral camera would do better.

Cacao canopy stress mapping

Works well · Most common use

Identifying patches of stressed cacao trees within a larger plot. Stress shows clearly as 0.20–0.35 zones surrounded by 0.45–0.65 healthy canopy. Cohort 02 alumni use this routinely; cooperatives consistently confirm Lumipad-flagged hotspots match their on-ground observations.

Sample report — cacao stress survey ↗

Coffee canopy density

Works well · Seasonal monitoring

Tracking canopy density changes through coffee's flowering and harvest cycle. The rig captures the seasonal NDVI curve clearly enough to identify plots that aren't following expected patterns. Used by 4 Cohort 02 alumni for repeat seasonal surveys.

Coffee seasonal monitoring case ↗

Tree count & replant zones

Limited · Use platform tools instead

The rig captures imagery suitable for tree counting via the Lumipad platform's CV models, but the NDVI itself isn't ideal for counting — high-resolution RGB is better. Use the rig as one camera in a two-camera setup if the survey requires both NDVI and tree counts in the same flight.

Two-camera survey configuration ↗

Pest & disease detection

Works · With on-ground confirmation

Many pest and disease patterns produce NDVI signatures. The rig can flag candidate zones; ground confirmation is necessary because NDVI tells you "something is wrong here" but not what. Pairs well with farmer knowledge of which pests are seasonal in their region.

Pest hotspot survey workflow ↗
Frequently asked

Questions worth answering carefully.

Why blue filter and not red? +

The Astro Pi tutorial we adapted from uses the Rosco #2007 Storaro Blue filter, which is what the Astro Pi computers on the ISS use. Blue passes through, NIR passes through, red and most green are blocked. The red channel of the resulting image captures NIR, the blue channel captures visible blue.

However, at typical drone survey altitude (60–120m AGL), there's a real tradeoff: Rayleigh scattering of blue light by the atmosphere reduces NDVI accuracy for distant subjects. The Astro Pi works fine because the ISS is hundreds of kilometres up — the scattering averages out. Our drone is closer to the ground, so the scattering biases the blue channel.

The red filter alternative — using a Roscolux #19 fire red filter — is documented in the Step 2 appendix. Some Cohort 02 alumni have switched. We document blue here because (a) it matches the original Astro Pi tutorial, (b) Rosco #2007 is more widely stocked in PH theatre supply houses, and (c) for a starter rig, both produce usable data. If you flying mostly above 100m AGL, the red variant is worth the experiment.

Why not just buy a MicaSense or DJI multispectral? +

Cost. MicaSense RedEdge-MX or DJI P4 Multispectral cameras start around ₱180,000 and go up rapidly. A Lumipad alumnus running a microenterprise can't recoup that capital cost in Year 1 unless they're working at scale we don't see in the network.

Quality differences are real but smaller than the price suggests:

  • Commercial multispectral has 4–5 distinct narrow-band sensors (red, green, red-edge, NIR, sometimes blue). The Lumipad rig has effectively 2 (NIR ≈ red channel, VIS ≈ blue channel).
  • Commercial sensors are more accurately calibrated and less affected by atmospheric variation.
  • Commercial systems include factory-calibrated reference targets and certified processing pipelines.

For research-grade work or precision-agriculture applications where decisions involve significant capital (variable-rate fertilising on a 500-hectare plantation), commercial cameras are worth their cost. For the small-coop survey work most Lumipad alumni do, the Pi NoIR rig is the right tool.

Can I use this for crops other than cacao or coffee? +

Yes. NDVI is a generic measure of vegetation health — chlorophyll behaviour is similar across plant species. Cohort 02 alumni have used the rig successfully on:

  • Coconut — works well, large canopy makes for stable NDVI signatures.
  • Rice — works during the vegetative and reproductive stages; not useful at maturity (canopy senesces).
  • Banana — works well; large leaves are easy to map.
  • Mango — works for canopy-level health; not useful for fruit detection.
  • Vegetables (small-scale) — possible but less reliable; small individual plants don't generate strong canopy signatures from a drone.

For partner-org deployments with very different crops (oil palm in Malaysia, rubber in Vietnam, vineyards anywhere), the rig works in principle but reference benchmarks need adapting. Email engineering@lumipaddrones.com if you're calibrating for a new crop type — we'll add it to the public reference set.

What if the Pi reboots mid-flight? +

It can happen — vibration, power glitch, or low battery. The capture script writes images directly to the microSD as they're captured (no large in-memory buffer), so a reboot loses at most the current frame.

If it reboots, the auto-start service brings the script back up within ~30 seconds. The lost capture window depends on flight altitude and speed — typically a 10×10m square that the FC's grid will overlap on the next pass. Stitching algorithms generally cope with this well; no client has ever rejected a survey because of a single missing frame.

The bigger concern: a Pi that reboots repeatedly indicates a power problem (UBEC failing, bad solder joint on the 5V tap). Run the bench tests in Step 3 between flights if you suspect intermittent power.

How long does the filter last? +

Rosco #2007 is theatre lighting gel — designed for indoor stage lights, not direct tropical sun. Cohort 02 data: filters last 12–24 months of regular use before noticeable degradation. Symptoms: reference target shots come back warmer (more reds in the blue channel), NDVI maps drift towards lower values overall.

Replace prophylactically every 18 months or when you see calibration drift. New filter squares cost ~₱50 each (a single A4 sheet provides 100+ squares); the limiting factor is the ordering trip, not the cost.

Can I run two NDVI rigs on one drone — blue and red filtered? +

Yes, and Cohort 02 has one alumnus doing this experimentally. Two Pi Zero 2 W modules, two Pi NoIR cameras, one with blue filter and one with red. The dual-camera setup is what the Public Lab community calls a "split-camera" rig — produces better NDVI than either filter alone because it captures pure NIR (red filter) and pure VIS (blue filter) on separate channels.

Trade-offs: doubles the weight (~190g instead of 95g — still within the v1's payload margin), doubles the build complexity, and requires camera-to-camera frame alignment in post-processing. We don't recommend this for first builds; come back to it after you've run 10+ surveys with a single-camera rig.

Documentation for the dual-camera variant is in the build kit's experimental/ folder.

Is the Astro Pi tutorial enough by itself, or do I need this Lumipad guide? +

The Astro Pi tutorial is excellent for the camera modification, library installation, and capture code. It assumes a stationary indoor camera looking at a dataset of pre-captured Earth-from-space images.

What this Lumipad guide adds:

  • Mounting on a flying drone (Step 4) — the Astro Pi guide doesn't cover this at all.
  • Field calibration with reference targets (Step 5) — important for survey work where each flight has different lighting.
  • FC integration and trigger via PWM (Step 4) — for flight-controlled capture timing.
  • PH-specific component sourcing and pricing.
  • Real-world use cases and accuracy expectations from Cohort alumni.

Both are useful. Read the Astro Pi tutorial first to understand the underlying technique; use this guide for the practical drone implementation.

Why use the Fastie colormap and not Matplotlib's "RdYlGn" or similar? +

Two reasons. First, the Fastie colormap was specifically designed for vegetation imagery — its breakpoints align with the NDVI ranges that matter (0.0, 0.2, 0.5, 0.7) so that the visual distinctions match the analytically meaningful thresholds. Matplotlib's "RdYlGn" is a generic diverging colormap; it produces visually similar maps but the colour transitions don't align with NDVI's biological meaning.

Second, the Fastie colormap is the de-facto standard in the open-source vegetation-imaging community (Public Lab, Infragram, the Astro Pi project). Using it makes Lumipad surveys directly comparable with imagery from those communities.

The 256-row LUT is included in the build kit as fastiecm.py. If you want to experiment with alternative colormaps for client-facing reports, swapping is one line — but keep the Fastie version archived as your scientific baseline.