PIX4Dfields supports green-on-green detection through high-resolution imagery and the Magic Tool. Follow this article to learn how to detect Sorghum alepense in Peanuts.
IN THIS ARTICLE
Introduction
Peanuts infested with Sorghum alepense
Detecting weeds with the Magic Tool
Introduction
Green-on-green detection in agriculture allows for identifying weeds among crops, which allows spot-spraying and minimizes blanket herbicide applications. By targeting only the affected areas, this method not only reduces herbicide costs but also minimizes environmental impact.
GSD Requirements
The provided data has 1.8 cm GSD. Orthomosaics with a GSD between 0.5 and 3 cm are ideal for detailed, plant-level weed detection. This ensures high-resolution detection of individual weeds within crop canopies.
If weeds occur in larger patches or zones, a lower resolution of GSD between 4 and 8 cm is generally acceptable.
Peanuts infested with Sorghum alepense
![]() |
|
Orthomosaic size
|
3.2 GB |
Average Ground Sampling Distance (GSD) | 1.8 cm / 0.78 in. |
Area covered | 35 ha / 86 acres. |
Image acquisition plan | 1 flight, grid flight plan. |
Drone and camera | DJI Mavic 3 Enterprise RGB camera |
Reflectance panel/target | Not applicable |
Fill out the form to receive the example orthomosaic |
Download and import Orthomosaic to PIX4Dfields
Download the example layer "Sorghum&Peanuts.tif" and import it into PIX4Dfields:
- On the dashboard, click + New Project or the + symbol at the bottom right corner of the window.
- A new window with a background satellite image appears.
- Click the pen symbol beside the default name of the project to rename the project.
- Under Other map, click GeoTIFF.
- Select the example file "Sorghum&Peanuts.tif" and click Open.
- The Orthomosaic is imported successfully.
Create a boundary
- Click the Boundaries layer on the left board above the layer list to enter the boundaries mode.
- To draw a field boundary, click the Draw boundary icon in the left corner of the map.
- Select Boundary. Note that obstacles can be created as well.
- Left-click to start drawing.
Detecting weeds with the Magic Tool
Access the tool by clicking the

- Select the Sorghum&Peanuts layer and the Boundary.
- Click Continue.
- Set the Cell Size to 2 meters.
The GSD influences the minimum cell size. A very small cell can degrade selection performance.
Set the Rotation to 10º to align with the planting lines. - Click Continue.
- Add Sorghum and click next.
- Labeling:
Manually identify areas of weeds and crops by clicking on them within the boundary:- Weeds: Click Wanted and click on at least 6 cells representing weed areas. (blue)
- Crops: Click Not wanted and click on at least 6 cells representing crop areas. (yellow)
- Purpose: These sample points help the Magic Tool distinguish weeds from crops based on visual patterns and color differences
- Clean up:
In Step 5, clean up the selection manually and add or delete cells. Incorporate a buffer by selecting the + icon; this will help ensure that the surrounding areas of the weed nests are effectively treated during the spraying process. - Convert the results into an operation layer. This step completes the weed detection process, resulting in an operational layer that provides valuable insights for targeted herbicide applications or additional analysis.
For more information: Magic Tool - PIX4Dfields