Recently our R&D team had to tackle quite an interesting challenge – detect colorado beetles in the images, taken with the mobile camera. In this post, we try to describe how we did an automated pest detection in natural scenes by applying image processing.

So, how do we detect those little beetles?

To address the complexity of detecting pests in the outdoor environment, we needed to come up with a set of some sort of descriptors that would allow us to separate beetles from the background. We decided to define the beetle coloring, form, structure, and create a unique descriptor. We applied in our algorithm and ran the application on the images we had. Our method showed 99% accuracy, but of course, it’s not the most representative, since we had limited dataset. Nonetheless, it’s a promising start. If you have a similar challenge, you can send us your photos, or a video.

Let’s work on the beetle detection step by step.

Here is the original image. Can you see this small pesky beetle?

sample4

Fig.1 Original image.

The first thing we need to do is to separate our beetle from the background. The easiest way would be to use color segmentation. As a result, we get a binary image. See the images below that demonstrate the whole process of the pest detection.

Image2.jpg-bw_Easy-Resize.com (1)

Fig.2 Binary image with “non-green” areas (because beetles have different coloring).

Image2.jpg-x_Easy-Resize.com

Fig.3 Gradient’s horizontal image: x-gradient

Image2.jpg-y_Easy-Resize.com

Fig.4 Gradient’s vertical image: y-gradient

Image2.jpg-mag_Easy-Resize.com

Fig.4. The magnitude of the gradients

Image2.jpg-med_Easy-Resize.com (3)

Fig.5. The result of filtering to the magnitude of the gradients.

As a result, we get a map of interest where the lightest pixels show with the highest probability where the beetles are.

Image2.jpg_Easy-Resize.com (1)

Fig. 6. Resulting image

Results

We have presented an algorithm for automatic pest detection. The presented system is simple and yet efficient. Our image processing engineers used image processing techniques to detect the presence of insect pests in the captured image. The results and main benefits of the proposed solution are listed below:

  • The algorithms described here allow the inexpensive and scalable detection of colorado beetles.
  • The accuracy achieved by the system is good enough to allow the development of commercial products and could be a useful tool in pest control.
  • Its low computing cost allows for real-time pest detection.
  • The system can be used to measure the efficiency of pest control and pesticide products.

Here are an original set of images. Just point at the picture to see results of the pest detection.

sample1
sample4
sample3
sample4

If you found this interesting, or have some questions to our experts, just send us a message.

Technologies:

image processing, Matlab, C++

Insert math as
Block
Inline
Additional settings
Formula color
Text color
#333333
Type math using LaTeX
Preview
\({}\)
Nothing to preview
Insert