Detecting plant disease early can save an entire crop. Using plant disease multispectral imaging with Raspberry Pi, Indian farmers and research stations can now build affordable early-warning systems that rival commercial drones costing several lakhs of rupees. This guide walks you through hardware selection, NIR camera setup, Python NDVI analysis, and field deployment across Indian agricultural conditions.
Table of Contents
- Why Multispectral Imaging for Plant Disease
- Hardware Components
- Camera and Filter Setup
- NDVI Calculation and Interpretation
- Python Processing Pipeline
- Field Deployment in India
- Frequently Asked Questions
Why Multispectral Imaging for Plant Disease
Healthy plants strongly reflect near-infrared (NIR) light while absorbing red light for photosynthesis. Diseased or stressed plants show a measurable drop in NIR reflectance – a signature invisible to human eyes but detectable by NIR-sensitive cameras. This spectral change appears 5-14 days before visible symptoms, allowing targeted intervention before losses escalate.
Commercial multispectral drones (Parrot Sequoia, MicaSense RedEdge) cost Rs 3-8 lakh. A Raspberry Pi-based system achieves 70-80% of that detection capability at under Rs 15,000 – ideal for small farmers, agricultural colleges, and KVKs (Krishi Vigyan Kendras).
Hardware Components
- Raspberry Pi 5 (4GB) – image processing unit
- Arducam IMX219 NoIR Camera – sensitivity to 700-900nm NIR range
- 850nm Bandpass Filter – Rs 800-2,500 from optics suppliers on IndiaMart
- Wide-angle lens adapter (M12 thread)
- 20,000 mAh USB power bank (5V/3A)
- Mounting pole 1.5-2m or camera gimbal
- 16GB Class-10 microSD
- Optional DHT22 – correlate disease spread with ambient humidity
Total cost: Rs 12,000-18,000. NIR bandpass filters are available from optics importers on IndiaMart or from Amazon India.
Camera and Filter Setup
The standard Raspberry Pi camera includes an IR-cut filter blocking wavelengths above 700nm. For multispectral work, you need the NoIR variant that ships without this filter. Mount an 850nm bandpass filter in front of the lens using a 3D-printed holder or M12 thread adapter ring. For dual-band capture, mount one RGB camera and one NoIR camera side by side on a small boom and capture simultaneously.
# Enable camera and install libraries
sudo apt update && sudo apt install python3-picamera2 python3-opencv python3-numpy -y
pip3 install matplotlib scikit-image
# Verify camera
libcamera-jpeg -o test.jpg --width 3280 --height 2464 --timeout 1000
NDVI Calculation and Interpretation
NDVI = (NIR – Red) / (NIR + Red). Values range from -1 to +1:
| NDVI Range | Crop Status | Action |
|---|---|---|
| 0.6 – 1.0 | Healthy, dense vegetation | Normal monitoring |
| 0.3 – 0.6 | Moderate stress | Scout field manually |
| 0.1 – 0.3 | Significant stress – likely disease | Apply treatment |
| Below 0.1 | Severe damage or bare soil | Emergency action |
Common Indian crop diseases detectable by NDVI anomalies: paddy blast, wheat yellow rust (Puccinia striiformis), cotton leaf curl virus, powdery mildew on tomato and chilli.
Python Processing Pipeline
import numpy as np
import cv2
from picamera2 import Picamera2
def calculate_ndvi(rgb_img, nir_img):
# NIR channel captured by NoIR camera (appears in red channel)
red = rgb_img[:, :, 2].astype(float)
nir = nir_img[:, :, 0].astype(float)
ndvi = (nir - red) / (nir + red + 1e-8)
return ndvi
def flag_diseased_zones(ndvi_map, threshold=0.3):
# Returns True where plant stress detected
return (ndvi_map -0.5)
def colorize_ndvi(ndvi):
ndvi_u8 = ((ndvi + 1) / 2 * 255).astype(np.uint8)
return cv2.applyColorMap(ndvi_u8, cv2.COLORMAP_RdYlGn)
# Capture and analyse
cam = Picamera2()
cam.configure(cam.create_still_configuration(
main={"size": (3280, 2464), "format": "BGR888"}
))
cam.start()
rgb = cam.capture_array()
cam.stop()
# Calculate NDVI (replace with actual NoIR camera capture for real use)
ndvi = calculate_ndvi(rgb, rgb)
mask = flag_diseased_zones(ndvi)
pct = (mask.sum() / mask.size) * 100
print(f"Potentially stressed area: {pct:.1f}%")
cv2.imwrite("/home/pi/ndvi_result.jpg", colorize_ndvi(ndvi))
Field Deployment in India
Key tips for Indian field conditions:
- Best imaging window: 10 AM – 2 PM for consistent solar angle
- Dust protection: IP55 ABS enclosure for the Pi; cable glands for sensor leads
- Power strategy: 20,000 mAh powerbank gives 4 hours; add 10W solar + TP4056 for continuous operation
- Alerts: SIM800L GSM module sends SMS disease alerts to farmer mobile when NDVI drops below threshold
- GPS tagging: NEO-6M module geotags each image for QGIS overlay
- Calibration: Always photograph a white reference panel (Teflon or grey card) before each session
Frequently Asked Questions
Can I use the standard Raspberry Pi Camera Module 3?
Only the NoIR variant will work. The standard Camera Module 3 has a built-in IR-cut filter that blocks wavelengths above 700nm – exactly the NIR range you need. Order specifically the Camera Module 3 NoIR or an Arducam NoIR version.
Which Indian crops benefit most from this monitoring?
Paddy (blast, brown plant hopper damage), wheat (yellow and brown rust), cotton (leaf curl, Alternaria blight), tomato (early blight, late blight), mango (anthracnose). All cause measurable chlorophyll loss detectable by NDVI 5-14 days before visible symptoms – giving the farmer time for targeted preventive spraying.
How does the cost compare to hiring a commercial drone service?
Commercial multispectral drone surveys cost Rs 500-2,000 per acre per visit in India. For a 10-acre holding visited 8 times per season, that is Rs 40,000-1,60,000 per season. A one-time Rs 15,000 DIY setup provides unlimited monitoring for years.
What is the ideal mounting height?
1.5-2 metres above the canopy for row crops. For tree orchards, use 3-5 metre extendable poles. Higher altitude increases coverage area per image but reduces spatial resolution (ability to identify disease on individual plants).
Is there funding available for precision agriculture projects?
ICAR, RKVY, and the Digital Agriculture Mission all offer grants for precision farming demonstrations. Agricultural colleges can apply under NAHEP. State KVKs actively seek affordable demonstration technologies suitable for small-holder farmers.
Add comment