Last updated: 29 November 2024

How to use machine vision for weeds inspection

When it comes to weeds inspection and targeted pesticide spray, it’s important to implement a high-quality vision system which is critical in detecting harmful plants/weeds which can affect production of crops. We understand that it can be difficult to determine the correct machine vision set-up and software needed to promote the standard best to achieve optimal production of crops and more. Our machine vision products and pricing are available and easily accessible to provide direct access to information about this weed inspection / pesticide spray vision system.

How to use machine vision for weeds inspection

In this application, the customer who reached out about their pesticide application needed to capture his crops and the surrounding area with a camera that had enough frames per second (FPS) and megapixels (MP). The cameras were attached to a long beam (arm) which was then attached to the tractor that would drive through the fields. With a higher FPS, this customer will be able to detect small, or big, weeds growing in the different types of crops. With this information, the customer will be able to then trigger his system to spray a pesticide onto the weeds in which are affecting the growth of their crops.

Camera selection for pesticide spray / inspection

For this tractor-mounted machine vision system, we first want to choose which camera will be the best fit for the customer. We must keep in mind that a high frame rate is needed for weed inspection and identification for pesticide spray and that we comply with our customers’ recommendations as well. Our advice was to use the 3MP GigE camera 'MER2-302-37GC-P' as there is the ability to have a larger cable that will power and transmit data through one cable. Because the tractor’s arm is more than 4.6 meters long, a USB3.0 camera was not as suitable vs the GigE Camera.

The customer needed a color camera to inspect the weeds clearly as well as a camera with global shutter as the tractor will be moving constantly throughout the testing period. This will ensure the images will not be distorted. You can read more about global shutter and rolling shutter cameras in our Knowledge Center Rolling Shutter vs. Global Shutter.

Frame grabber for weed inspection

As the tractor arms will each contain 10 cameras each, the customer will also need frame grabbers to ensure that the data transmission between cameras will be smooth. You can see our different frame grabbers available. Our 4 GigE quad bus can connect 4 different cameras at once independently at full speed. Thanks to the PoE feature of this card, the PoE camera can be supplied with power, using the same ethernet cable that is used for data transmission.

To determine the required resolution, the minimum resolution was given by the customer. Based on 3 pixels per smallest detail, at least 2000x1000 pixels were required for this application. The 3MP GigE camera 'MER2-302-37GC-P' which has a resolution of 2048X1536, fits the needs of this application.

Protection for your machine vision setupMachine vision housing

The customer also needed a machine vision camera housing to make sure that there was no dust or moisture which moved into the camera and lens. These machine vision camera housings are IP67 rated to ensure that your machine vision camera stays protected.

Multiple machine vision cameras on tractor

In this specific application, the customer wanted a 20-camera set up. 10 of the cameras were to be placed on 1 arm of the tractor and vice versa. All cameras are the same as the one mentioned in this article as well as the same lens in the previous section. This will give the customer the ability to use their pesticide spray to promote the growth of their plants and stop the harmful weeds that grow around them. Each camera was in need of a 10-meter GigE cable but if your vision system is in need of various tweaks, we can easily make adjustments to fit your vision application need.

Lens selection for weeds inspection

After knowing the required resolution, we still need to find out the correct lens that is required for this application which we base on our Online Lens Calculator. As you can see in the figure, the sensor size of the MER2-302-37GC-P is 1/1.8”. Following our previous calculations and the requirements set by the customer, with a FOV of 1050 x 880mm, a 6mm focal length lens is required. The final FOV will be approximately 1029 x 772mm, which when discussed with the customer was more than enough for their application. With this the customer can set region of interest (ROI) to make sure that they have the exact FOV they were looking for at 1000mm HFOV. Our 5MP 06mm C-mount lens 'LCM-5MP-06MM-F1.4-1.5-ND1', is a great solution for the 3MP camera.

Machine vision lighting for weed inspection

For this particular application, there was lighting already available on the arms of the tractor as well as the tractor itself, which led to there being enough lighting for their solution. If your application is in a low light scenario there may be a need for other machine vision lighting in which you can get in touch with us at the bottom of the page using our customer support form.

Image processing software to detect weeds

In some cases, our cameras, lenses, and lighting solutions are not enough for a for a vision system. Our cameras are GenIcam compatible, which means that they can be used with a variety of 3rd party software including MvTec Halcon, NI Labview, Cognex Vision Pro, Matlab, OpenCV and Arm Boards software. For first programming, our free SDK can be used to acquire images and set the camera parameters. The software development kit is compatible with regular and industrial PCs and ARM platforms, including NVIDIA TX series and Raspberry Pi. Supported operating systems include Windows, Linux, and Android.

For the example application above, the customers had designed their own software package that worked with our SDK. For your unique application you may need to use one of our computer vision software packages.

Support for weed detection vision system

Machine vision offers a powerful and precise solution for weed inspection and targeted pesticide application. By implementing a camera system with high frame rates and appropriate resolution, farmers can achieve significant improvements in crop yield and resource management. By combining the mentioned machine vision components in this article, farmers can gain a valuable tool for optimizing weed control and maximizing crop health.

Would you like assistance from one of our machine vision specialists in building your own weed detection/pesticide spray vision system? Feel free to reach out using the form below and we will get back to you as soon as possible.