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.

Image Processing

Step 3: Contour Detection

Once green locations are identified and a binary (black/white) mask is generated:

  1. A contouring process outlines each detection

  2. If detection pixel area > minArea (default: 10), coordinates are recorded

  3. Central pixel coordinates relate to an activation zone

  4. Zone connects to a specific GPIO pin on the Raspberry Pi

  5. GPIO pin drives high → Relay switches → Solenoid activates

OWL Workflow


Detection Algorithms

Algorithm

Sensitivity

Best For

exg

Most sensitive

Maximum weed detection, accepts more false positives

exgr

Medium

Balanced detection

exhsv

Balanced (default)

Good precision with reasonable recall

hsv

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:

Results Boxplot

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

Detection Results

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

actuation_duration

0.15s

How long relay stays activated

delay

0

Delay between detection and actuation

min_detection_area

10

Minimum pixel area for valid detection

relay_num

4

Number of relay channels

See Configuration Guide for full parameter reference.


Next Steps