Operation Guide¶
This guide explains how the OWL detects weeds and the image processing workflow.
Image Processing Workflow¶
How does OWL detect weeds and trigger the relay control board?
Step 1: Image Capture¶
The OWL captures a colour image from the camera using OpenCV and splits it into component channels:
RGB: Red ®, Green (G), Blue (B)
HSV: Hue, Saturation, Value (converted from RGB)
Step 2: Green Detection¶
Computer vision algorithms differentiate green vegetation from the background:
Excess Green (ExG):
ExG = 2 * G - R - B
HSV Thresholding: Filters based on hue, saturation, and brightness ranges.

Step 3: Contour Detection¶
Once green locations are identified and a binary (black/white) mask is generated:
A contouring process outlines each detection
If detection pixel area >
minArea(default: 10), coordinates are recordedCentral pixel coordinates relate to an activation zone
Zone connects to a specific GPIO pin on the Raspberry Pi
GPIO pin drives high → Relay switches → Solenoid activates

Detection Algorithms¶
Algorithm |
Sensitivity |
Best For |
|---|---|---|
|
Most sensitive |
Maximum weed detection, accepts more false positives |
|
Medium |
Balanced detection |
|
Balanced (default) |
Good precision with reasonable recall |
|
Least sensitive |
Minimum false positives, may miss smaller weeds |
Algorithm Selection¶
Configure in config.ini:
[System]
algorithm = exhsv
Field Results¶
Performance of each algorithm was tested on 7 different day/night fields:

Key findings:
No significant differences (P > 0.05) for recall and precision between algorithms
ExHSV was less sensitive (fewer false detections) and more precise
ExHSV missed more smaller/discoloured weeds compared to ExG
Detection Performance¶

What gets detected:
Large, green weeds - consistently found
Small, discoloured weeds - often missed
Grasses with thin leaves - tend to blur into background
Improving performance:
Faster shutter speed helps reduce motion blur
Adjust sensitivity parameters for your conditions
Mount OWL closer to target height
Operating Parameters¶
Key parameters affecting field operation:
Parameter |
Default |
Description |
|---|---|---|
|
0.15s |
How long relay stays activated |
|
0 |
Delay between detection and actuation |
|
10 |
Minimum pixel area for valid detection |
|
4 |
Number of relay channels |
See Configuration Guide for full parameter reference.
Next Steps¶
Wiring & Connections - Connect solenoids, lights, and other 12V devices
Use Cases - Example applications and setups
Configuration - Adjust detection parameters
Troubleshooting - Common issues and solutions