In today’s agriculture industry the area of weed management is one of the under-mechanized, least-precise and costliest area of operations.
When we speak today of precise and automatic agriculture this area achieves a growing volume of the research and following is a coverage of a modern technique that allows speedy detection of weeds in an image. Note that this technique is specifically aimed at the hard problem of differentiating green weed from green plants.
The first step in the algorithm is separating the green vegetation from the background and any object that might intrude in the image. To do so we use a segmentation algorithm which labels each pixel as vegetation if its green value is greater than its red or blue values on the RGB color map.
Next we enhance the image as to allow the next steps to work with a more robust and precise input. To do so we first change the image from a colorful RGB mapping to a grayscale mapping where every pixel is given a number from 0 to 1 which represents its intensity in the image. The transformation is simply a weighted average of the pixel color such that the final value will be 0.3 x R + 0.59 x G + 0.11 x B where R, G and B are the red, green and blue values of the pixel in the original image.
To enhance the image further we want to remove additive noise such as “salt and pepper” noise, but we don’t want to affect the details of the vegetation, specifically we want to preserve the contours of different plants. This we achieve by using a median filter which filters pixels based on their immediate surroundings and is able to preserve edges in the image (such as the plant’s contour).
Next we try to find individual plants by grouping neighboring pixels with similar intensities into individual connected components – each representing a single plant. These components are next used to measure the area and perimeter of each plant as well as finding the length of the longest chord (the longest line that travels entirely inside the component are connects two pixels within it) and longest perpendicular chord (the longest chord which in perpendicular to the previously found longest chord).
These properties will allow us in most cases to group and separate the crop plants from the weeds in the image, properly achieving crop detection by computer vision for weed management.