A method for identifying pests and diseases based on image processing

Through an image-based processing method, the blade images are iteratively processed and smoothed, and pest and disease areas are automatically identified and marked, solving the problem of high cost of traditional manual labeling and improving the efficiency and accuracy of agricultural pest and disease detection.

CN118942046BActive Publication Date: 2024-12-20SICHUAN WEINONG MODERN AGRI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411426263.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2024-12-20
Estimated Expiration
2044-10-14

AI Technical Summary

Technical Problem

Traditional agricultural pest and disease image detection relies on manual annotation, resulting in high labor and time costs and inefficient efficiency.

Method used

Using an image-based processing method, by collecting blade images, iteratively processing each pixel point, generating severely damaged parameters, thereby filtering out damaged areas and smoothing them, and automatically labeling pest and diseases.

Benefits of technology

Automatic identification and labeling of pest and disease areas in leaf images is realized, which improves the efficiency and accuracy of crop pest and disease detection and reduces labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118942046B_ABST
    Figure CN118942046B_ABST
Patent Text Reader

Abstract

The present invention discloses a pest and disease identification method based on image processing, which belongs to the field of pest and disease identification technology, and comprises the following steps: S1, collecting leaf images, iteratively processing each pixel point of the leaf image, and obtaining the severe damage parameter of the leaf image; S2, screening the damaged area from the leaf image using the severe damage parameter; S3, smoothing the edge of the damaged area, and obtaining the final pest and disease damaged area. The present invention can screen and mark the significant pest and disease areas in the leaf image, and can enhance the pest and disease identification effect of crops, thereby effectively realizing the treatment and prevention of pests and diseases.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of pest identification, and in particular relates to a pest identification method based on image processing. Background Art

[0002] With the rapid development of artificial intelligence technology and the rapid growth of population, agriculture as a key industry has also developed rapidly, and artificial intelligence technologies such as image processing have gradually been applied to the agricultural field, especially agricultural pest detection. By using advanced image detection technology, timely and accurate detection and detection of pests and diseases on crops can help farmers formulate scientific prevention and control measures in a timely manner and minimize crop losses. Traditional agricultural pest and disease image detection mainly relies on manual labeling by experienced technical experts, which has huge labor and time costs. Summary of the invention

[0003] In order to solve the above problems, the present invention proposes a pest identification method based on image processing.

[0004] The technical solution of the present invention is: a method for identifying pests and diseases based on image processing comprises the following steps:

[0005] S1, collecting leaf images, iteratively processing each pixel point of the leaf image, and obtaining serious damage parameters of the leaf image;

[0006] S2, screening damaged areas from leaf images using severe damage parameters;

[0007] S3. Smoothing the edge of the damaged area to obtain the final pest and disease damaged area.

[0008] Furthermore, S1 includes the following sub-steps:

[0009] S11, collecting leaf images, and constructing pixel correlation coefficients for each pixel in the leaf images;

[0010] S12, using the maximum pixel correlation coefficient as the learning rate of the damaged iterative model;

[0011] S13, inputting each pixel point in the leaf image into the damaged iteration model in sequence for calculation to obtain a number of damaged iteration values;

[0012] S14, obtaining a first damaged pixel point and a second damaged pixel point according to a plurality of damaged iteration values;

[0013] S15, generating an abnormal area according to the first damaged pixel and the second damaged pixel;

[0014] S16. Generate severely damaged parameters based on the abnormal area.

[0015] The beneficial effect of the above further scheme is: in the present invention, the pixel values ​​of the pixels in each row and column of the leaf image are analyzed and calculated to obtain the pixel correlation coefficient of each pixel. Each pixel is brought into the damaged iteration model, and the previous damaged iteration value is used to calculate the next damaged iteration value to obtain the value of each pixel. The damaged iteration value of each pixel is used to obtain two damaged pixels, and the two damaged pixels and the pixel with the maximum pixel correlation coefficient are used to construct a triangular area. The triangular area can contain the range of abnormal pixels, and the abnormal area is used to generate severe damage parameters, so the severe damage parameters analyze the abnormal pixels.

[0016] Furthermore, in S11, the calculation formula of the pixel correlation coefficient σ of the pixel point is:

[0017] ; In the formula, u m Indicates the pixel value of the mth pixel in the row where the pixel is located, u n represents the pixel value of the nth pixel in the column where the pixel is located, U represents the pixel value of the pixel, M represents the number of pixels in the row where the pixel is located, and N represents the number of pixels in the column where the pixel is located.

[0018] Furthermore, in S13, the damaged iterative model Z corresponding to the i-th pixel point i The expression is:

[0019] ; In the formula, γ represents the learning rate of the damaged iterative model, c represents a constant, and Z i-1 represents the damaged iterative model value corresponding to the i-1th pixel, u i represents the pixel value of the i-th pixel, and e represents the exponent.

[0020] Furthermore, in S14, the ratio between the next damaged iteration value and the previous damaged iteration value is calculated, and the pixel point corresponding to the next damaged iteration value with the maximum ratio and the pixel point corresponding to the previous damaged iteration value are respectively used as the first damaged pixel point and the second damaged pixel point.

[0021] Further, in S15, it is determined whether the pixel point corresponding to the maximum pixel correlation coefficient is located on the straight line connecting the first damaged pixel point and the second damaged pixel point. If so, the pixel point with the maximum pixel correlation coefficient except the straight line connecting the first damaged pixel point and the second damaged pixel point is used as the endpoint, and the endpoint, the first damaged pixel point and the second damaged pixel point constitute the abnormal area; otherwise, the pixel point corresponding to the maximum pixel correlation coefficient, the first damaged pixel point and the second damaged pixel point constitute the abnormal area.

[0022] Furthermore, in S16, the calculation formula of the severe damage parameter s is:

[0023] ; In the formula, u1 represents the pixel value of the first pixel point contained in the abnormal area, u2 represents the pixel value of the second pixel point contained in the abnormal area, and u j Indicates the pixel value of the jth pixel in the abnormal area, u j+1 Indicates the pixel value of the j+1th pixel point contained in the abnormal area, u J-1 Indicates the pixel value of the J-1th pixel point contained in the abnormal area, u J represents the pixel value of the Jth pixel in the abnormal area, log2(·) represents the logarithmic function with base 2, c represents a constant, and J represents the number of pixels in the abnormal area.

[0024] Furthermore, in S2, the abnormal area satisfies The pixel point is taken as the damaged area, where u j Indicates the pixel value of the jth pixel point contained in the abnormal area, U max represents the maximum pixel value of the leaf image, and s represents the severe damage parameter.

[0025] The beneficial effects of the present invention are as follows: the pest and disease identification method based on image processing first generates two damaged pixel points based on the iterative processing results of the pixel points of the leaf image, determines a triangular abnormal area using the positions of the two damaged pixel points, and uses the severe damage parameters of the abnormal area to filter out the damaged area from the abnormal area; the present invention can filter and mark significant pest and disease areas in the leaf image, thereby enhancing the pest and disease identification effect of crops, thereby effectively realizing pest and disease treatment and prevention. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 The figure is a flow chart of the pest and disease identification method based on image processing. DETAILED DESCRIPTION

[0027] The embodiments of the present invention will be further described below in conjunction with the accompanying drawings.

[0028] like Figure 1 As shown, the present invention provides a method for identifying pests and diseases based on image processing, comprising the following steps:

[0029] S1, collecting leaf images, iteratively processing each pixel point of the leaf image, and obtaining serious damage parameters of the leaf image;

[0030] S2, screening damaged areas from leaf images using severe damage parameters;

[0031] S3. Smoothing the edge of the damaged area to obtain the final pest and disease damaged area.

[0032] In this embodiment of the present invention, S1 includes the following sub-steps:

[0033] S11, collecting leaf images, and constructing pixel correlation coefficients for each pixel in the leaf images;

[0034] S12, using the maximum pixel correlation coefficient as the learning rate of the damaged iterative model;

[0035] S13, inputting each pixel point in the leaf image into the damaged iteration model in sequence for calculation to obtain a number of damaged iteration values;

[0036] S14, obtaining a first damaged pixel point and a second damaged pixel point according to a plurality of damaged iteration values;

[0037] S15, generating an abnormal area according to the first damaged pixel and the second damaged pixel;

[0038] S16. Generate severely damaged parameters based on the abnormal area.

[0039] The beneficial effect of the above further scheme is: in the present invention, the pixel values ​​of the pixels in each row and column of the leaf image are analyzed and calculated to obtain the pixel correlation coefficient of each pixel. Each pixel is brought into the damaged iteration model, and the previous damaged iteration value is used to calculate the next damaged iteration value to obtain the value of each pixel. The damaged iteration value of each pixel is used to obtain two damaged pixels, and the two damaged pixels and the pixel with the maximum pixel correlation coefficient are used to construct a triangular area. The triangular area can contain the range of abnormal pixels, and the abnormal area is used to generate severe damage parameters, so the severe damage parameters analyze the abnormal pixels.

[0040] In the embodiment of the present invention, in S11, the calculation formula of the pixel correlation coefficient σ of the pixel point is:

[0041] ; In the formula, u m Indicates the pixel value of the mth pixel in the row where the pixel is located, u n represents the pixel value of the nth pixel in the column where the pixel is located, U represents the pixel value of the pixel, M represents the number of pixels in the row where the pixel is located, and N represents the number of pixels in the column where the pixel is located.

[0042] In the embodiment of the present invention, in S13, the damaged iterative model Z corresponding to the i-th pixel point i The expression is:

[0043] ; In the formula, γ represents the learning rate of the damaged iterative model, c represents a constant, and Z i-1 represents the damaged iterative model value corresponding to the i-1th pixel, ui represents the pixel value of the i-th pixel, and e represents the exponent.

[0044] In the embodiment of the present invention, in S14, the ratio between the next damaged iteration value and the previous damaged iteration value is calculated, and the pixel point corresponding to the next damaged iteration value with the maximum ratio and the pixel point corresponding to the previous damaged iteration value are respectively used as the first damaged pixel point and the second damaged pixel point.

[0045] In the embodiment of the present invention, in S15, it is determined whether the pixel point corresponding to the maximum pixel correlation coefficient is located on the straight line connecting the first damaged pixel point and the second damaged pixel point. If so, the pixel point with the maximum pixel correlation coefficient except the straight line connecting the first damaged pixel point and the second damaged pixel point is used as the endpoint, and the endpoint, the first damaged pixel point and the second damaged pixel point constitute the abnormal area. Otherwise, the pixel point corresponding to the maximum pixel correlation coefficient, the first damaged pixel point and the second damaged pixel point constitute the abnormal area.

[0046] In the embodiment of the present invention, in S16, the calculation formula of the severe damage parameter s is:

[0047] ; In the formula, u1 represents the pixel value of the first pixel point contained in the abnormal area, u2 represents the pixel value of the second pixel point contained in the abnormal area, and u j Indicates the pixel value of the jth pixel point contained in the abnormal area, u j+1 Indicates the pixel value of the j+1th pixel point contained in the abnormal area, u J-1 Indicates the pixel value of the J-1th pixel point contained in the abnormal area, u J represents the pixel value of the Jth pixel in the abnormal area, log2(·) represents the logarithmic function with base 2, c represents a constant, and J represents the number of pixels in the abnormal area.

[0048] In the embodiment of the present invention, in S2, the abnormal area satisfies The pixel point is taken as the damaged area, where u j Indicates the pixel value of the jth pixel point contained in the abnormal area, U max represents the maximum pixel value of the leaf image, and s represents the severe damage parameter.

[0049] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.

Claims

1. A method for identifying pests and diseases based on image processing, characterized in that: The following steps are involved: S1, collecting leaf images, iteratively processing each pixel point of the leaf image, and obtaining serious damage parameters of the leaf image; S2, screening damaged areas from leaf images using severe damage parameters; S3, smoothing the edge of the damaged area to obtain the final pest and disease damaged area; The S1 comprises the following sub-steps: S11, collecting leaf images, and constructing pixel correlation coefficients for each pixel in the leaf images; S12, using the maximum pixel correlation coefficient as the learning rate of the damaged iterative model; S13, inputting each pixel point in the leaf image into the damaged iteration model in sequence for calculation to obtain a number of damaged iteration values; S14, obtaining a first damaged pixel point and a second damaged pixel point according to a plurality of damaged iteration values; S15, generating an abnormal area according to the first damaged pixel and the second damaged pixel; S16. generating a severely damaged parameter according to the abnormal area; In S11, the calculation formula of the pixel correlation coefficient σ of the pixel point is: ; In the formula, u m Indicates the pixel value of the mth pixel in the row where the pixel is located, u n represents the pixel value of the nth pixel in the column where the pixel is located, U represents the pixel value of the pixel, M represents the number of pixels in the row where the pixel is located, and N represents the number of pixels in the column where the pixel is located; In S13, the damaged iterative model Z corresponding to the i-th pixel point i The expression is: ; In the formula, γ represents the learning rate of the damaged iterative model, c represents a constant, and Z i-1 represents the damaged iterative model value corresponding to the i-1th pixel, u i represents the pixel value of the i-th pixel, and e represents the exponent; In the step S14, the ratio between the i-th damaged iteration value and the i-1-th damaged iteration value is calculated, and the pixel point corresponding to the i-th damaged iteration value having the maximum ratio and the pixel point corresponding to the i-1-th damaged iteration value are respectively used as the first damaged pixel point and the second damaged pixel point; In the step S15, it is determined whether the pixel point corresponding to the maximum pixel correlation coefficient is located on the straight line connecting the first damaged pixel point and the second damaged pixel point. If so, the pixel point with the maximum pixel correlation coefficient except the straight line connecting the first damaged pixel point and the second damaged pixel point is used as an endpoint, and the endpoint, the first damaged pixel point and the second damaged pixel point are used to form an abnormal area. Otherwise, the pixel point corresponding to the maximum pixel correlation coefficient, the first damaged pixel point and the second damaged pixel point are used to form an abnormal area. In S16, the calculation formula of the severe damage parameter s is: ; In the formula, u1 represents the pixel value of the first pixel point contained in the abnormal area, u2 represents the pixel value of the second pixel point contained in the abnormal area, and u j Indicates the pixel value of the jth pixel point contained in the abnormal area, u j+1 Indicates the pixel value of the j+1th pixel point contained in the abnormal area, u J-1 Indicates the pixel value of the J-1th pixel point contained in the abnormal area, u J represents the pixel value of the Jth pixel point contained in the abnormal area, log2(·) represents the logarithmic function with base 2, c represents a constant, and J represents the number of pixels in the abnormal area; In S2, the abnormal area satisfies The pixel point is taken as the damaged area, where u j Indicates the pixel value of the jth pixel point contained in the abnormal area, U max represents the maximum pixel value of the leaf image, and s represents the severe damage parameter.