Method and system for evaluating damage level of spodoptera frugiperda based on machine vision

The method and system leverage machine vision and support vector machines to accurately assess Spodoptera frugiperda damage in corn leaves, addressing inefficiencies and inaccuracies of manual methods by employing image preprocessing and segmentation techniques.

GB2702866APending Publication Date: 2026-07-01SOUTH CHINA AGRICULTURAL UNIVERSITY

Patent Information

Authority / Receiving Office
GB · GB
Patent Type
Applications
Current Assignee / Owner
SOUTH CHINA AGRICULTURAL UNIVERSITY
Filing Date
2025-09-22
Publication Date
2026-07-01

AI Technical Summary

Technical Problem

Current methods for evaluating Spodoptera frugiperda damage in corn leaves are labor-intensive, time-consuming, and prone to human error, leading to inaccurate resistance assessments due to the variability in hole shapes and sizes caused by the larvae.

Method used

A method and system utilizing machine vision to acquire, preprocess, segment, and feature-extract corn leaf images, employing a support vector machine to identify damage levels based on insect hole features such as diameter, area, and quantity, with preprocessing steps including grayscale processing, Gaussian filtering, binarization, and morphological operations, and segmentation using distance transformation and watershed algorithms.

Benefits of technology

Accurately and efficiently evaluates Spodoptera frugiperda damage levels, improving identification precision and reducing human error, thereby enhancing the reliability of pest resistance assessments.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

A method and a system for evaluating a damage level of Spodoptera frugiperda. The method includes the steps of: acquiring a corn leaf image and performing preprocessing; segmenting adhered insect hole
Need to check novelty before this filing date? Find Prior Art

Description

The present disclosure belongs to the technical field of damage level judgment, and particularly relates to a method and a system for evaluating a damage level of Spodoptera frugiperda based on machine vision. In the early stage of damage caused by Spodoptera frugiperda to com, larvae mainly feed on seedling leaves, causing needle-like holes or transparent window holes. As the larvae grow, the leaves are eaten to form elongated or larger irregular holes. The evaluation of resistance to Spodoptera frugiperda usually involves investigating the damage situation of single leaves and overall com leaves, mainly focusing on hole aperture size, length, and quantity. Based on the damage situation, the average damage level of the leaves of the variety is calculated to determine its resistance level during the heart leaf stage. Through measurement, statistics, and calculation, the levels are divided into different levels such as highly resistant, resistant, moderately resistant, susceptible, and highly susceptible according to a certain level. This is cmcial for evaluating the characteristic values of the varieties. Currently, the method for detecting the damage degree of Spodoptera frugiperda in the field mainly relies on inspectors using calipers to measure the number and size of insect holes on each com leaf damaged by pests. Because the leaves are eaten by larvae to form holes of different shapes, this method places extremely high demands on inspectors, is time-consuming and laborious, and has low efficiency and accuracy. Moreover, this method also requires the use of software Excel for data statistics and calculation of the average damage level, and the statistical results are easily affected by subjective factors, leading to large errors that may deviate from the tme resistance situation. To solve the above technical problems, the present disclosure proposes a method and a system for evaluating a damage level of Spodoptera frugiperda based on machine vision, to address the shortcomings of the prior art. To achieve the above objective, the present disclosure provides a method for evaluating a damage level of Spodoptera frugiperda based on machine vision, including the following steps: acquiring a com leaf image and performing preprocessing to obtain a preprocessed image; segmenting adhered insect holes in the preprocessed image and removing small-area noise to obtain an insect hole image; extracting insect hole features from the insect hole image, where the insect hole features include diameter, area, and quantity features of the insect holes; labeling a pest level of the preprocessed image according to the insect hole features to obtain a labeled image, and training a support vector machine with the labeled image to obtain an identification model; and identifying a com leaf to be identified using the identification model to obtain the damage level of Spodoptera frugiperda. Preferably, preprocessing the com leaf image includes: performing grayscale processing on the com leaf image, using Gaussian filtering to remove image noise, performing binarization processing on the image after removing the noise to obtain a binary image, and performing morphological opening operation on the binary image to obtain the preprocessed image. Preferably, obtaining the insect hole image includes: performing distance transformation on the binary image to obtain a distance map of insect hole regions, and using a watershed algorithm on the distance map to segment adhered insect holes into individual insect holes; and if a segmented insect hole area is less than a judgment threshold, judging the area as a small-area noise, and removing the small-area noise to obtain the insect hole image. Preferably, extracting the insect hole features from the insect hole image includes: extracting an edge contour of a single insect hole, calculating a length and a width of a minimum bounding rectangle of the insect hole based on the edge contour, and using an average value of the length and the width of the minimum bounding rectangle as a diameter of the insect hole; and calculating the area and the quantity of the insect holes based on the edge contour. Preferably, labeling the pest level includes: calculating the damage level of the preprocessed image according to an average leaf damage level algorithm and a pest level classification standard, and performing labeling. The present disclosure further proposes a system for evaluating a damage level of Spodoptera frugiperda based on machine vision, including: a preprocessing module, configured to acquire a com leaf image and perform preprocessing to obtain a preprocessed image; an insect hole segmentation module, configured to segment adhered insect holes in the preprocessed image and remove small-area noise to obtain an insect hole image; a feature extraction module, configured to extract insect hole features from the insect hole image, where the insect hole features include diameter, area, and quantity features of the insect holes; a model building module, configured to label a pest level of the preprocessed image according to the insect hole features to obtain a labeled image, and train a support vector machine with the labeled image to obtain an identification model; and an identification module, configured to identify a com leaf to be identified using the identification model to obtain the damage level of Spodoptera frugiperda. Preferably, the preprocessing module includes: an acquisition unit, configured to acquire the com leaf image; a preprocessing unit, configured to perform grayscale processing on the com leaf image, use Gaussian filtering to remove image noise, perform binarization processing on the image after removing the noise to obtain a binary image, and perform morphological opening operation on the binary image to obtain the preprocessed image. Preferably, the insect hole segmentation module includes: a distance transformation unit, configured to perform distance transformation on a binary image to obtain a distance map of insect hole regions; a segmentation unit, configured to use a watershed algorithm on the distance map to segment adhered insect holes into individual insect holes; and a noise reduction unit, configured to judge whether a segmented insect hole area is small-area noise, and remove the area if the area is the small-area noise, to obtain the insect hole image. Preferably, the feature extraction module includes: a contour extraction unit, configured to extract an edge contour of a single insect hole; a calculation unit, configured to calculate the diameter, the area, and the quantity of the insect holes based on the edge contour, where a diameter calculation involves obtaining a length and a width of a minimum bounding rectangle of the insect hole based on the edge contour, and using an average value of the length and the width of the minimum bounding rectangle as a diameter of the insect hole. The present disclosure further proposes a computer device, including a memory, a processor, and a computer program stored on the memory, where the processor executes the computer program to implement the steps of the method. Compared with the prior art, the present disclosure has the following advantages and technical effects. The present disclosure discloses a method and a system for evaluating a damage level of Spodoptera frugiperda based on machine vision, including the following steps: acquiring a com leaf image and performing preprocessing to obtain a preprocessed image; segmenting adhered insect holes in the preprocessed image and removing small-area noise to obtain an insect hole image; extracting insect hole features from the insect hole image, where the insect hole features include the diameter, area, and quantity features of the insect holes; labeling the pest level on the preprocessed image according to the insect hole features to obtain a labeled image, and training a support vector machine with the labeled image to obtain an identification model; and identifying the com leaf to be identified using the identification model to obtain the damage level of Spodoptera frugiperda. The present invention uses machine vision methods to accurately extract various features of insect holes, judges the damage level through these features, and finally obtains an accurate damage level of Spodoptera frugiperda. The present disclosure, through standardized image acquisition and image processing methods, realizes the identification of the damage level of Spodoptera frugiperda, improving the efficiency and accuracy of pest identification. The drawings forming a part of the present disclosure are used to provide a further understanding of the present disclosure. The schematic embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation of the present disclosure. In the drawings: FIG. 1 is a flowchart of the method according to an embodiment of the present disclosure. It should be noted that, in the case of no conflict, the embodiments in the present disclosure and the features in the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings and in combination with the embodiments. It should be noted that the steps shown in the flowchart of the drawings may be executed in a computer system such as a set of computer-executable instructions. Although the flowchart shows a logical order, in some cases, the steps shown or described may be executed in an order different from here. Embodiment 1 As shown in FIG. 1, this embodiment provides a method for evaluating a damage level of Spodoptera frugiperda based on machine vision, including the following steps: acquiring a com leaf image and performing preprocessing to obtain a preprocessed image; segmenting adhered insect holes in the preprocessed image and removing small-area noise to obtain an insect hole image; extracting insect hole features from the insect hole image, where the insect hole features include the diameter, area, and quantity features of the insect holes; labeling the pest level on the preprocessed image according to the insect hole features to obtain a labeled image, and training a support vector machine with the labeled image to obtain an identification model; and identifying the com leaf to be identified using the identification model to obtain the damage level of Spodoptera frugiperda. Further, acquiring the com leaf image includes: building a device with a uniform light source and a fixed shooting angle to stabilize lighting conditions and shooting angle, and eliminating the influence of field environmental light and com leaf posture on image acquisition quality, where the inside of the device uses black light-absorbing material as the background to reduce background clutter interference; and placing the collected com leaf in a standardized image acquisition device to obtain a com leaf image with stable lighting, fixed angle, and no background interference. By fixing the angle and position of the com leaf in a standardized system and using preset lighting conditions, the stability of lighting during the image acquisition process is ensured, thereby obtaining preliminary image data without background interference. In this embodiment, a box coated with black light-absorbing material inside is built. The box is equipped with a leaf holder with adjustable height and angle, and an LED light source array. The leaf holder ensures consistent leaf position and angle for each shot. The black light-absorbing material may reduce background stray light interference. The LED light source array may provide stable and uniform lighting, for example, with a color temperature of 6500 K and an illuminance of 10,000 lux. This allows obtaining com leaf images with a simple background and uniform lighting, for example, RGB images with a shooting resolution of 4096*3072 pixels. Further, preprocessing the com leaf image includes: performing grayscale processing on the com leaf image, using Gaussian filtering to remove image noise, performing binarization processing on the image after removing the noise to obtain a binary image, and performing morphological opening operation on the binary image to obtain the preprocessed image. Specifically: grayscale processing is performed on the original color image. The weighted average method is used to calculate the grayscale value of each pixel. The formula is as follows: Gray=0.299R+0.587G+0.114B, where R, G, B respectively represent the values of the red, green, and blue channels of each pixel in the original color image, and Gray represents the calculated grayscale value. A grayscale image is obtained. Gaussian filtering is performed on the grayscale image. A Gaussian filter is used to denoise the grayscale image. The formula of the Gaussian filter is as follows: G(x,y)=(l / (2pisigmaA2))exp(-(xA2+yA2) / (2sigmaA2)), where x, y represent pixel coordinates, and sigma represents the standard deviation of the Gaussian distribution. The Gaussian filter is applied to the grayscale image through convolution operation to obtain a smoothed grayscale image. Image enhancement processing is performed. According to the histogram distribution of the smoothed grayscale image, the histogram equalization method is used to enhance image contrast and highlight leaf features, obtaining an enhanced grayscale image. Binarization processing is performed on the enhanced grayscale image. The Otsu algorithm is used to automatically calculate the binarization threshold. If the pixel grayscale value is greater than the threshold, the pixel value is set to 255; otherwise, the pixel value is set to 0. A binary image is obtained. Morphological processing is performed on the binary image. Morphological opening operation is used to remove small noise points and burrs in the binary image. The opening operation is a combined operation of erosion followed by dilation, which may eliminate small objects and smooth object contours without changing their overall size. The processed binary image is obtained. Further, obtaining the insect hole image includes: performing distance transformation on the binary image to obtain a distance map of the insect hole regions, using the watershed algorithm on the distance map to segment adhered insect holes into individual insect holes, and if a segmented insect hole area is less than a judgment threshold, judging the area as a small-area noise, and removing the small-area noise to obtain the insect hole image. Specifically, the step includes: the role of distance transformation is to calculate the distance from each pixel in the image to the nearest background pixel. Through distance transformation, a binary image may be converted into a grayscale image, where the grayscale value represents the distance from the pixel to the background. For example, assuming coordinates of a pixel are (x,y), with a value of 1 (representing an insect hole), and the coordinates of the nearest background pixel are (x-2,y-l), then the value of this pixel in the distance map is ~ 2.24. The distance map may help find the central regions of insect holes and distinguish boundaries between different insect holes. The watershed algorithm is an image segmentation method based on topographic concepts, treating the image as a topographic map, where the grayscale value represents the height of the terrain. In the distance map, each local maximum point is considered the center of a catchment basin. The watershed algorithm simulates the process of water flowing from high to low, eventually segmenting the image into multiple catchment basins, where each catchment basin represents a potential insect hole region. For example, if two insect holes are close together, they may form a connected region in the distance map containing two local maximum points. The watershed algorithm may separate these two insect holes, preventing them from being misidentified as one large insect hole. After segmentation by the watershed algorithm, the area of each segmented region needs to be calculated to distinguish real insect holes from noise. For example, one segmented region is assumed to contain 10 pixels, while another segmented region contains 1000 pixels. If the preset area threshold is 50 pixels, the first segmented region will be considered noise, and the second segmented region will be considered a real insect hole. The size of the preset area threshold needs to be determined based on the actual size of the insect holes. For example, if studying insect holes caused by a small insect, the area threshold should be set smaller. If studying insect holes caused by a large insect, the area threshold should be set larger. An area threshold that is too small will cause some small insect holes to be misidentified as noise, while an area threshold that is too large will cause some noise to be misidentified as insect holes. Judging whether the area of each segmented region is less than the preset area threshold is to remove noise regions. For example, if the area of a segmented region is 30 pixels and the preset area threshold is 50 pixels, then this segmented region will be considered noise. This is because the area that is too small is likely caused by noise rather than real insect holes. After removing noise regions, the final segmented result image may be obtained, where each connected region represents a single insect hole. For example, assuming that the initial segmented result image contains 5 segmented regions, where the areas of 2 regions are less than the preset area threshold, after removing these two noise regions, the final segmented result image will contain 3 connected regions, where the 3 connected regions represent 3 different insect holes respectively. Through screening with the area threshold, noise may be effectively removed, improving the accuracy of insect hole identification. Further, extracting the insect hole features from the insect hole image includes: extracting the edge contour of a single insect hole, calculating the length and width of the minimum bounding rectangle of the insect hole based on the edge contour, and using the average value of the length and width of the minimum bounding rectangle as the diameter of the insect hole; and calculating the area and quantity of the insect holes based on the edge contour. Specifically, the Canny edge detection algorithm may effectively identify edge information in an image. This algorithm achieves edge detection through multiple steps. Firstly, Gaussian filtering is performed on the image to reduce the impact of noise on edge detection. For example, using a 5x5 Gaussian kernel to smooth the image may effectively remove high-frequency noise in the image, making edges clearer. Next, the gradient magnitude and direction of the image are calculated to determine the position and strength of edges. For example, the Sobel operator may be used to calculate the horizontal and vertical gradients, then the gradient magnitude may be calculated based on the square root of the sum of the squares of these two gradients. Then nonmaximum suppression is performed to refine the edges, retaining only the local maximum pixel points in the gradient direction. Finally, double threshold processing is used to mark pixel points with gradient magnitudes greater than the high threshold as strong edge pixels, mark pixel points with gradient magnitudes between the high threshold and low threshold as weak edge pixels, and form complete edges by connecting strong edge pixels and weak edge pixels. The Canny algorithm adopts these steps to detect edges more accurately and reduce interference from noise and false edges. The image segmentation method based on distance transformation and the watershed algorithm is an effective method for segmenting adhered objects. For the calculation of the diameter of insect holes, the original image first needs to be preprocessed and segmented to obtain a binary image of a single insect hole. Then the Canny edge detection algorithm is used to extract the edge contour of the insect hole. Assuming there is a missing part in the edge of an insect hole, morphological closing operation may be used for repair. The closing operation is an operation of dilation followed by erosion, which may fill small gaps in the edges and smooth the edge contour. For example, using a 3x3 structural element to perform closing operation on the edge image may effectively repair missing parts of the edge, making the edge contour more complete. Next, the minimum bounding rectangle of the repaired edge contour is calculated. For example, the length ofthe minimum bounding rectangle of an insecthole is 10 pixels, and the width is 8 pixels. Finally, the diameter of the insect hole is calculated based on the length L and width W of the minimum bounding rectangle, using the formula diameter=(L+W) / 2. In this example, the diameter of the insect hole is (10+8) / 2 = 9 pixels. The method of using the minimum bounding rectangle to calculate the diameter is simple and easy to implement, and may better reflect the size of the insect hole. If the area of the insect hole region is directly calculated and then converted into an equivalent diameter, it might be affected by the irregular shape of the insect hole. The minimum bounding rectangle, however, may better fit the overall shape of the insect hole, thus obtaining a more accurate diameter estimation. Further, combining the calculated diameter and area of each insect hole, as well as the total number of insect holes, a pest image feature vector may be constructed, for example, [average diameter, average area, number of insect holes], for subsequent pest level judgment. Using a support vector machine model for pest level judgment may effectively classify the pest degree based on image features. A support vector machine is a machine learning algorithm that may establish a mapping relationship between pest levels and image features based on training data. For example, a large number of pest images may be collected in advance and their pest levels (mild, moderate, severe) may be manually labeled. Then the feature vectors of these images are extracted and a support vector machine model is trained using these data. The trained model may predict a corresponding pest level of a new pest image based on the feature vector of the new pest image. The acquired pest image feature vector is input into the trained support vector machine model, and the model will output the corresponding pest level based on the learned mapping relationship. For example, a new pest image feature vector is [3 mm, 8 mm2, 20], and the vector is input into the support vector machine model, and the model may output a "moderate" pest. Through the output of the support vector machine model, the pest level may be judged, thereby guiding agricultural production. For example, if the model judges the pest level as "severe", it is recommended to take corresponding control measures, such as spraying pesticides. If the model judges the pest level as "mild", observation may continue and no intervention measures will be taken temporarily. This may effectively control pests and improve crop yield. Further, labeling the pest level includes: calculating the damage level of the preprocessed image according to the average leaf damage level algorithm and the pest level classification standard, and performing labeling. Embodiment 2 This embodiment further provides a system for evaluating a damage level of Spodoptera frugiperda based on machine vision, including: a preprocessing module, configured to acquire a com leaf image and perform preprocessing to obtain a preprocessed image; an insect hole segmentation module, configured to segment adhered insect holes in the preprocessed image and remove small-area noise to obtain an insect hole image; a feature extraction module, configured to extract insect hole features from the insect hole image, where the insect hole features include diameter, area, and quantity features of the insect holes; a model building module, configured to label the pest level of the preprocessed image according to the insect hole features to obtain a labeled image, and train a support vector machine with the labeled image to obtain an identification model; and an identification module, configured to identify the com leaf to be identified using the identification model to obtain the damage level of Spodoptera frugiperda. Further, the preprocessing module includes: an acquisition unit, configured to acquire a com leaf image; a preprocessing unit, configured to perform grayscale processing on the com leaf image, use Gaussian filtering to remove image noise, perform binarization processing on the image after removing the noise to obtain a binary image, and perform morphological opening operation on the binary image to obtain the preprocessed image. Further, the insect hole segmentation module includes: a distance transformation unit, configured to perform distance transformation on the binary image to obtain a distance map of insect hole regions; a segmentation unit, configured to use the watershed algorithm on the distance map to segment adhered insect holes into individual insect holes; and a noise reduction unit, configured to judge whether a segmented insect hole area is small-area noise, and remove the area if the area is the small-area noise, to obtain the insect hole image. Further, the feature extraction module includes: a contour extraction unit, configured to extract the edge contour of a single insect hole; a calculation unit, configured to calculate the diameter, area, and quantity of the insect holes based on the edge contour, where the diameter calculation involves obtaining the length and width of the minimum bounding rectangle of the insect hole based on the edge contour, and using the average value of the length and width of the minimum bounding rectangle as the diameter of the insect hole. Embodiment 3 This embodiment further provides a computer device, including a memory, a processor, and a computer program stored on the memory, where the processor executes the computer program to implement the steps of the method. The above are only the preferred specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art may easily think of changes or substitutions within the technical scope disclosed in the present disclosure, which should be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims

1. A method for evaluating a damage level of Spodoptera frugiperda based on machine vision, comprising the following steps:acquiring a com leaf image and performing preprocessing to obtain a preprocessed image; segmenting adhered insect holes in the preprocessed image and removing small-area noise to obtain an insect hole image;extracting insect hole features from the insect hole image, wherein the insect hole features comprise diameter, area, and quantity features of the insect holes;labeling a pest level of the preprocessed image according to the insect hole features to obtain a labeled image, and training a support vector machine with the labeled image to obtain an identification model; andidentifying a com leaf to be identified using the identification model to obtain the damage level of Spodoptera frugiperda.

2. The method according to claim 1, wherein preprocessing the com leaf image comprises: performing grayscale processing on the com leaf image, using Gaussian filtering to remove image noise, performing binarization processing on the image after removing the noise to obtain a binary image, and performing morphological opening operation on the binary image to obtain the preprocessed image.

3. The method according to claim 1, wherein obtaining the insect hole image comprises: performing distance transformation on the binary image to obtain a distance map of insect hole regions, and using a watershed algorithm on the distance map to segment adhered insect holes into individual insect holes; and if a segmented insect hole area is less than a judgment threshold, judging the area as a small-area noise, and removing the small-area noise to obtain the insect hole image.

4. The method according to claim 1, wherein extracting the insect hole features from the insect hole image comprises:extracting an edge contour of a single insect hole, calculating a length and a width of a minimum bounding rectangle of the insect hole based on the edge contour, and using an average value of the length and the width of the minimum bounding rectangle as a diameter of the insect hole; and calculating the area and the quantity of the insect holes based on the edge contour.

5. The method according to claim 1, wherein labeling the pest level comprises:calculating the damage level of the preprocessed image according to an average leaf damage level algorithm and a pest level classification standard, and performing labeling.

6. A system for evaluating a damage level of Spodoptera frugiperda based on machine vision, comprising:a preprocessing module, configured to acquire a com leaf image and perform preprocessing to obtain a preprocessed image;an insect hole segmentation module, configured to segment adhered insect holes in the preprocessed image and remove small-area noise to obtain an insect hole image;a feature extraction module, configured to extract insect hole features from the insect hole image, wherein the insect hole features comprise diameter, area, and quantity features of the insect holes; a model building module, configured to label a pest level of the preprocessed image according to the insect hole features to obtain a labeled image, and train a support vector machine with the labeled image to obtain an identification model; andan identification module, configured to identify a com leaf to be identified using the identification model to obtain the damage level of Spodoptera frugiperda.

7. The system according to claim 6, wherein the preprocessing module comprises:an acquisition unit, configured to acquire the com leaf image;a preprocessing unit, configured to perform grayscale processing on the com leaf image, use Gaussian filtering to remove image noise, perform binarization processing on the image after removing the noise to obtain a binary image, and perform morphological opening operation on the binary image to obtain the preprocessed image.

8. The system according to claim 6, wherein the insect hole segmentation module comprises:a distance transformation unit, configured to perform distance transformation on a binary image to obtain a distance map of insect hole regions;a segmentation unit, configured to use a watershed algorithm on the distance map to segment adhered insect holes into individual insect holes; anda noise reduction unit, configured to judge whether a segmented insect hole area is small-area noise, and remove the area if the area is the small-area noise, to obtain the insect hole image.

9. The system according to claim 6, wherein the feature extraction module comprises:a contour extraction unit, configured to extract an edge contour of a single insect hole;a calculation unit, configured to calculate the diameter, the area, and the quantity of the insect holes based on the edge contour, wherein a diameter calculation involves obtaining a length and a width of a minimum bounding rectangle of the insect hole based on the edge contour, and using an average value of the length and the width of the minimum bounding rectangle as a diameter of the insect hole.

10. A computer device, comprising a memory, a processor, and a computer program stored on the memory, wherein the processor executes the computer program to implement the steps of the method according to any one of claims 1-5.T +44(0)30 0300 2000