Detection of wilt on vines
- 303
One of the mite pests of grapes is the grapevine caterpillar. Infected leaves develop small bumps, which are also slightly different in color from healthy leaves.
Here are some pictures of it:
The trained eye can easily spot this disease on a single vine. Unfortunately, if we are talking about a large area, it is not enough to look at just one or two parts, because there may be no infection there but it can cause serious damage in other parts of the plantation. To walk through the whole vineyard every few days is a very time consuming and expensive task.
This is where machine vision comes in. Let a small automated vehicle or a cheap drone do the regular mapping, and machine vision will automatically show you what part of the vineyard is infested, what variety, and how much.
The following small program uses Python and OpenCV. The images were taken in my own backyard.
- We take the RGB images and first convert them to HSV color space. This will look like false colors, but it will be easier to work on.
- Then we highlight the leaves – i.e. the green color.
- Then we convert this to a single layer grayscale image.
- Then we smooth the histogram of the image. This will give a more contrasty image.
- Then at a given color, we cut the image and get a binary leaf/background image. This still contains a lot of noise.
- This is removed with an Erode-Dilate iteration and we end up with a mask of the leaves. Anything else to look for is only needed here.
- Now we highlight the discoloration of the dumbbell from the HSV image we generated at the beginning. Unfortunately this is just the range as the background and branches. That means it doesn’t do much good on its own.
- And this is where we use the mask. With the mask, we completely shade out the background.
- The resulting images are little circles indicating the tubeworm infestations.
- Inside, by counting the tubeworm infested areas and the proportion of green areas, we now have a general idea of how infested the area is.
And I’ll show you all this in a few pictures.
When many hectares of land are photographed every few days and the above process determines the infestation rate per image, and then this is put on a map, you can see where the disease has hit. Based on this, if you catch the initial infestations early enough and spray specifically only there, you may only need to spray 10-15% of the total area.
Add to this weather data and forecasting, and you can determine even more optimally which areas to spray and how to spray them, to make the most cost-effective use of the vine.