A disease and pest protection system and method for forestry seedling raising

By combining frequency domain transformation and gradient amplitude analysis, an image segmentation model is used to segment forestry seedling pest and disease monitoring images, which solves the segmentation difficulty caused by pests and diseases adhering to each other or mixing with plant tissues, and improves the efficiency of pest and disease protection.

CN119478668BActive Publication Date: 2025-10-14TAIAN SHENGYUAN GARDEN MUNICIPAL ENGINEERING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411461959.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-10-14
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

Existing forestry seedling pest and disease monitoring technologies have difficulty in accurately distinguishing foreground and background areas when pests and diseases are adhered to each other or mixed with plant tissues, resulting in low protection efficiency.

Method used

Frequency domain transformation and gradient amplitude analysis are combined with image segmentation model to determine the suspicion of pests and diseases through frequency domain coefficients and grayscale information entropy. The segmentation threshold is extracted for dynamic segmentation to identify the degree of pest damage.

Benefits of technology

Under the influence of the adhesion and similarity of pests and diseases, accurate segmentation of pest and disease monitoring images is achieved, which improves the protection efficiency of pests and diseases in forestry seedling cultivation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119478668B_ABST
    Figure CN119478668B_ABST
Patent Text Reader

Abstract

The application provides a disease and pest protection system and method for forestry seedling raising, which comprises the following steps: collecting a disease and pest monitoring image of a target forest tree; determining a plurality of frequency domain coefficients of the disease and pest monitoring image; determining a disease and pest suspicious degree of the target forest tree through all the frequency domain coefficients and a gray information entropy of the disease and pest monitoring image; extracting a first segmentation threshold of the disease and pest monitoring image when the disease and pest suspicious degree is greater than a preset suspicious degree; obtaining a second segmentation threshold through a two-dimensional amplitude matrix constructed by gradient amplitudes of each pixel point in the disease and pest monitoring image; segmenting the disease and pest monitoring image through a confidence segmentation threshold obtained by dynamically segmenting and verifying the disease and pest monitoring image through the first segmentation threshold and the second segmentation threshold, and analyzing a disease and pest damage degree of the target forest tree according to a segmentation result. The above scheme segments the disease and pest monitoring image based on the confidence segmentation threshold, can determine the disease and pest damage degree, and thus improves the protection efficiency of the disease and pest in the forestry seedling raising.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of forestry pest and disease image recognition, and more specifically, to a pest and disease protection system and method for forestry seedling cultivation. Background Art

[0002] For the protection of pests and diseases in forestry seedlings, the target trees can be monitored, pest and disease monitoring images can be collected, and the degree of pest damage can be analyzed based on the pest and disease monitoring images. However, the pest and disease monitoring images will be affected by the adhesion of pests and diseases to each other or mixed with plant tissues, as well as the similarity between the color and texture characteristics of pests and diseases and the color and texture characteristics of plant leaves in the background. This makes it difficult for existing segmentation algorithms to accurately distinguish between foreground and background areas, and it is impossible to accurately determine the degree of pest and disease damage, thereby reducing the efficiency of pest and disease protection in forestry seedlings. Therefore, how to achieve the segmentation of the foreground and background areas of the pest and disease monitoring images under the influence of the adhesion and similarity of pests and diseases to determine the degree of pest and disease damage, thereby improving the efficiency of pest and disease protection in forestry seedlings has become a difficult problem faced by the industry. Summary of the Invention

[0003] The present application provides a pest and disease protection system and method for forestry seedling cultivation, which can segment the foreground area and background area of ​​the pest and disease monitoring image under the influence of the adhesion and similarity of the pests and diseases, so as to determine the degree of damage caused by the pests and diseases, thereby improving the protection efficiency of pests and diseases in forestry seedling cultivation.

[0004] In a first aspect, the present application provides a pest monitoring image recognition method for use in a forestry seedling pest protection system to identify forestry pests and diseases. The method comprises the following steps:

[0005] Collect pest and disease monitoring images of target trees;

[0006] Performing a frequency domain transform on the pest monitoring image to obtain a plurality of frequency domain coefficients corresponding to the pest monitoring image, determining the pest suspicion degree of the target tree based on all the frequency domain coefficients and the grayscale information entropy of the pest monitoring image, and extracting a first segmentation threshold of the pest monitoring image when the pest suspicion degree is greater than a preset suspicion degree;

[0007] Determine the gradient amplitude of each pixel in the pest monitoring image, construct a two-dimensional amplitude matrix through all the gradient amplitudes, and extract a second segmentation threshold of the two-dimensional amplitude matrix according to a preset image segmentation model;

[0008] Performing dynamic segmentation verification on the pest monitoring image using the first segmentation threshold and the second segmentation threshold to obtain a confidence segmentation threshold for the pest monitoring image;

[0009] The pest and disease monitoring image is segmented based on the confidence segmentation threshold, and the degree of pest and disease damage of the target trees in the pest and disease monitoring image is determined according to the segmentation result.

[0010] In some embodiments, performing frequency domain transformation on the pest monitoring image to obtain a plurality of frequency domain coefficients corresponding to the pest monitoring image specifically includes:

[0011] Obtaining the horizontal scale and vertical scale of the pest monitoring image;

[0012] Determining the horizontal frequency range and the vertical frequency range of the pest monitoring image by the horizontal scale and the vertical scale respectively;

[0013] determining all frequency positions according to the horizontal frequency range and the vertical frequency range;

[0014] Selecting a frequency position as a selected frequency position, and determining a frequency domain coefficient corresponding to the selected frequency position according to position information corresponding to the selected frequency position, the horizontal scale, the vertical scale, and the pixel value of each pixel in the pest and disease monitoring image;

[0015] Continue to determine the frequency domain coefficients corresponding to the remaining frequency positions, and then obtain multiple frequency domain coefficients corresponding to the pest monitoring image.

[0016] In some embodiments, determining the frequency domain coefficient corresponding to the selected frequency position according to the position information corresponding to the selected frequency position, the horizontal scale, the vertical scale, and the pixel value of each pixel in the pest monitoring image specifically includes:

[0017] extracting a horizontal normalization factor and a vertical normalization factor corresponding to a selected frequency position according to the horizontal scale and the vertical scale respectively;

[0018] Obtaining a preset frequency domain transformation model;

[0019] The horizontal normalization factor, the vertical normalization factor, the position information corresponding to the selected frequency position, and the pixel value of each pixel point in the pest and disease monitoring image are input into the frequency domain transformation model, and the frequency domain transformation model outputs the frequency domain coefficient corresponding to the selected frequency position.

[0020] In some embodiments, determining the suspiciousness of pests and diseases of target trees using all frequency domain coefficients and the grayscale information entropy of the pest and disease monitoring image specifically includes:

[0021] Extract the total number of high-frequency coefficients and the total number of low-frequency coefficients from all frequency domain coefficients;

[0022] Determining a spectrum energy ratio of the pest monitoring image according to the total number of high-frequency coefficients and the total number of low-frequency coefficients;

[0023] Determining the grayscale information entropy of the pest monitoring image;

[0024] The suspicious degree of pests and diseases of target trees is determined by the spectral energy ratio and the grayscale information entropy.

[0025] In some embodiments, determining the grayscale information entropy of the pest monitoring image specifically includes:

[0026] Obtaining the grayscale value corresponding to each pixel in the pest monitoring image;

[0027] Extract all different grayscale values ​​and determine the grayscale proportion of each different grayscale value;

[0028] The grayscale information entropy of the pest monitoring image is determined according to the grayscale proportions of different grayscale values.

[0029] In some embodiments, extracting the first segmentation threshold of the pest monitoring image specifically includes:

[0030] Obtaining the horizontal scale and vertical scale of the pest monitoring image;

[0031] Determine a sample template for dividing the pest monitoring image based on the horizontal scale and the vertical scale;

[0032] Dividing the pest monitoring image into a plurality of pest monitoring sub-images using the partitioning sample template;

[0033] The segmentation threshold of each pest monitoring sub-image is extracted, and then the first segmentation threshold of the pest monitoring image is determined by all the segmentation thresholds.

[0034] In some embodiments, pest and disease monitoring images of target trees are collected by surveillance cameras.

[0035] In a second aspect, the present application provides a pest and disease protection system for forestry seedling cultivation, which includes a pest and disease image recognition unit, and the pest and disease image recognition unit includes:

[0036] The acquisition module is used to collect pest and disease monitoring images of target trees;

[0037] a processing module for performing a frequency domain transform on the pest monitoring image to obtain a plurality of frequency domain coefficients corresponding to the pest monitoring image, determining a pest suspicion degree of the target tree based on all the frequency domain coefficients and the grayscale information entropy of the pest monitoring image, and extracting a first segmentation threshold of the pest monitoring image when the pest suspicion degree is greater than a preset suspicion degree;

[0038] The processing module is further configured to determine the gradient amplitude of each pixel in the pest monitoring image, construct a two-dimensional amplitude matrix using all the gradient amplitudes, and extract a second segmentation threshold of the two-dimensional amplitude matrix according to a preset image segmentation model;

[0039] The processing module is further configured to perform dynamic segmentation verification on the pest monitoring image using the first segmentation threshold and the second segmentation threshold to obtain a confidence segmentation threshold of the pest monitoring image;

[0040] An execution module is used to segment the pest monitoring image based on the confidence segmentation threshold, and determine the degree of pest damage of the target trees in the pest monitoring image according to the segmentation result.

[0041] In a third aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a code, and the processor is configured to obtain the code and execute the above-mentioned pest and disease monitoring image recognition method.

[0042] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned pest and disease monitoring image recognition method is implemented.

[0043] The technical solutions provided by the embodiments disclosed in this application have the following beneficial effects:

[0044] In the pest and disease protection system and method for forestry seedling cultivation provided in the present application, first, a pest and disease monitoring image of the target tree is collected; secondly, the pest and disease monitoring image is transformed in the frequency domain to obtain multiple frequency domain coefficients corresponding to the pest and disease monitoring image, and the pest and disease suspicion of the target tree is determined by all the frequency domain coefficients and the grayscale information entropy of the pest and disease monitoring image. When the pest and disease suspicion is greater than the preset suspicion, the first segmentation threshold of the pest and disease monitoring image is extracted; further, the gradient amplitude of each pixel point in the pest and disease monitoring image is determined, a two-dimensional amplitude matrix is ​​constructed by all the gradient amplitudes, and a second segmentation threshold of the two-dimensional amplitude matrix is ​​extracted according to a preset image segmentation model; then, the pest and disease monitoring image is dynamically segmented and verified by the first segmentation threshold and the second segmentation threshold to obtain a confidence segmentation threshold of the pest and disease monitoring image; finally, the pest and disease monitoring image is segmented based on the confidence segmentation threshold, and the degree of pest infestation of the target tree in the pest and disease monitoring image is determined according to the segmentation result.

[0045] It can be seen that the present application can realize the segmentation of the foreground area and the background area of ​​the pest monitoring image under the influence of the adhesion and similarity of pests and diseases, so as to determine the degree of damage caused by pests and diseases, thereby improving the protection efficiency of pests and diseases in forestry seedling cultivation; first, multiple frequency domain coefficients of the pest monitoring image of the target forest are determined to reflect the characteristic information of the pest monitoring image on different frequency components, and the suspicious degree of pests and diseases of the target forest is obtained through the characteristic information on different frequency components and the grayscale information entropy of the pest monitoring image, so as to identify the target trees in the pest monitoring image. The target trees are suspected of being infested by pests and diseases; secondly, when the target trees are identified to be more likely to be infested by pests and diseases according to the degree of suspicion of pests and diseases, the first segmentation threshold of the pest and disease monitoring image is extracted to quickly divide the pest and disease monitoring image into different areas for the first time, thereby roughly analyzing the occurrence range and severity of pests and diseases in the target trees; further, a two-dimensional amplitude matrix constructed by the gradient amplitude of each pixel point in the pest and disease monitoring image is once again extracted to extract a segmentation threshold (second segmentation threshold) to further separate the areas affected by pests and diseases in the image from the areas affected by pests and diseases. Normal and healthy areas are distinguished to avoid confusing pest and disease areas with healthy areas; then, the pest and disease monitoring image is dynamically segmented and verified by the first segmentation threshold and the second segmentation threshold, so as to obtain the optimal segmentation threshold (i.e., confidence segmentation threshold) for segmenting the pest and disease monitoring image, so as to more realistically and effectively distinguish the pest and disease area from the normal background area, reduce misjudgment and missed judgment, and thus avoid the adhesion effect caused by the pests and diseases sticking to each other or mixing with plant tissues, as well as the effect of the similarity between the color and texture characteristics of the pests and diseases and the color and texture characteristics of the plant leaves in the background, thereby improving the accuracy of identifying pest and disease infestation; finally, the foreground area and background area of ​​the pest and disease monitoring image are segmented based on the confidence segmentation threshold, and the degree of pest and disease infestation of the target trees in the pest and disease monitoring image is analyzed according to the segmentation results; in summary, the technical solution provided by the present application can realize the segmentation of the foreground area and background area of ​​the pest and disease monitoring image under the influence of the adhesion and similarity of the pests and diseases, so as to determine the degree of pest and disease infestation, thereby improving the protection efficiency of pests and diseases in forestry seedling cultivation. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 is an exemplary flow chart of a pest monitoring image recognition method according to some embodiments of the present application;

[0047] Figure 2 is an exemplary flow chart for determining the suspicious degree of pests and diseases according to some embodiments of the present application;

[0048] Figure 3 is an exemplary flow chart for determining a gradient magnitude according to some embodiments of the present application;

[0049] Figure 4 is a schematic structural diagram of a pest and disease image recognition unit according to some embodiments of the present application;

[0050] Figure 5 It is a structural diagram of a computer device for implementing a pest monitoring image recognition method according to some embodiments of the present application. DETAILED DESCRIPTION

[0051] In order to better understand the above technical solution, the above technical solution will be described in detail below with reference to the accompanying drawings and specific implementation methods.

[0052] refer to Figure 1 , which is an exemplary flow chart of a pest monitoring image recognition method according to some embodiments of the present application. The pest monitoring image recognition method 100 mainly includes the following steps:

[0053] In step 101, pest and disease monitoring images of target trees are collected.

[0054] In specific implementation, target trees in forestry seedling cultivation are monitored, and pest monitoring images of the target trees are collected through monitoring cameras. The pest monitoring images are images collected by monitoring the target trees during pest and disease protection.

[0055] It should be noted that the pest and disease protection system used for forestry seedling cultivation in this application is a system implemented by combining software and hardware, which mainly achieves protection against forestry pests and diseases through technical means such as sensors, image recognition, data analysis, and artificial intelligence.

[0056] In step 102, the pest and disease monitoring image is subjected to a frequency domain transformation to obtain a plurality of frequency domain coefficients corresponding to the pest and disease monitoring image. The pest and disease suspicion of the target trees is determined by all the frequency domain coefficients and the grayscale information entropy of the pest and disease monitoring image. When the pest and disease suspicion is greater than the preset suspicion, the first segmentation threshold of the pest and disease monitoring image is extracted.

[0057] In some embodiments, frequency domain transformation is performed on the pest monitoring image to obtain a plurality of frequency domain coefficients corresponding to the pest monitoring image, specifically by the following steps:

[0058] Obtaining the horizontal scale and vertical scale of the pest monitoring image;

[0059] Determining the horizontal frequency range and the vertical frequency range of the pest monitoring image by the horizontal scale and the vertical scale respectively;

[0060] determining all frequency positions according to the horizontal frequency range and the vertical frequency range;

[0061] Selecting a frequency position as a selected frequency position, and determining a frequency domain coefficient corresponding to the selected frequency position according to position information corresponding to the selected frequency position, the horizontal scale, the vertical scale, and the pixel value of each pixel in the pest and disease monitoring image;

[0062] Continue to determine the frequency domain coefficients corresponding to the remaining frequency positions, and then obtain multiple frequency domain coefficients corresponding to the pest monitoring image.

[0063] In a specific implementation, the horizontal scale and vertical scale of the pest monitoring image are obtained by using the image processing tool OpenCV.

[0064] In a specific implementation, the horizontal frequency range and the vertical frequency range of the pest and disease monitoring image are respectively determined by the horizontal scale and the vertical scale, that is, the result obtained by subtracting the value 1 from the horizontal scale is used as the upper limit of the horizontal frequency range, the result obtained by subtracting the value 1 from the vertical scale is used as the upper limit of the vertical frequency range, and the value 0 is used as the lower limit of the horizontal frequency range and the vertical frequency range, respectively. Then, the horizontal frequency range and the vertical frequency range of the pest and disease monitoring image are obtained according to the corresponding upper limit and lower limit. For example, when the horizontal scale and the vertical scale are M and N respectively, the horizontal frequency range is [0, M] and the vertical frequency range is [0, N].

[0065] It should be noted that the horizontal frequency range in this embodiment represents the frequency range of pixel brightness changes in the pest monitoring image in the horizontal direction, and the vertical frequency range in this embodiment represents the frequency range of pixel brightness changes in the pest monitoring image in the vertical direction.

[0066] In a specific implementation, all frequency positions are determined according to the horizontal frequency range and the vertical frequency range, that is, each horizontal frequency value in the horizontal frequency range is combined with each vertical frequency value in the vertical frequency range, and the combination results are used as frequency positions, thereby obtaining all frequency positions. For example, in the horizontal frequency range of [0, M] and the vertical frequency range of [0, N], when the horizontal frequency value is 0 and the vertical frequency value is 1, the composed frequency position is (0, 1). It should be noted that the horizontal frequency value and the vertical frequency value are both integer values, wherein the frequency position represents the position coordinate of the pest and disease monitoring image in the frequency domain, and the frequency position corresponds to position information, that is, the horizontal frequency value is the horizontal coordinate and the vertical frequency value is the vertical coordinate.

[0067] In some embodiments, the frequency domain coefficient corresponding to the selected frequency position is determined based on the position information corresponding to the selected frequency position, the horizontal scale, the vertical scale, and the pixel value of each pixel in the pest monitoring image, that is:

[0068] extracting a horizontal normalization factor and a vertical normalization factor corresponding to a selected frequency position according to the horizontal scale and the vertical scale respectively;

[0069] Obtaining a preset frequency domain transformation model;

[0070] The horizontal normalization factor, the vertical normalization factor, the position information corresponding to the selected frequency position, and the pixel value of each pixel point in the pest and disease monitoring image are input into the frequency domain transformation model, and the frequency domain transformation model outputs the frequency domain coefficient corresponding to the selected frequency position.

[0071] In a specific implementation, a horizontal normalization factor and a vertical normalization factor corresponding to a selected frequency position are respectively extracted based on the horizontal scale and the vertical scale. That is, position information of the selected frequency position is obtained, where the position information includes a horizontal coordinate and a vertical coordinate. When the horizontal coordinate is equal to zero, the horizontal scale is inversely calculated and a square root is taken, and the square root result is used as the horizontal normalization factor corresponding to the selected frequency position. When the horizontal coordinate is greater than zero, the horizontal scale is ratioed to a value of 2, the square root of the ratio is taken, and the square root result is used as the horizontal normalization factor corresponding to the selected frequency position. When the vertical coordinate is equal to zero, the vertical scale is inversely calculated and a square root is taken, and the square root result is used as the vertical normalization factor corresponding to the selected frequency position. When the vertical coordinate is greater than zero, the vertical scale is ratioed to a value of 2, the square root of the ratio is taken, and the square root result is used as the vertical normalization factor corresponding to the selected frequency position. In addition, in other embodiments, other calculation methods may be used to calculate the horizontal normalization factor and the vertical normalization factor corresponding to the selected frequency position, which will not be described in detail here.

[0072] It should be noted that, in this embodiment, the horizontal normalization factor represents a factor for adjusting a horizontal transformation result, and the vertical normalization factor represents a factor for adjusting a vertical transformation result.

[0073] In specific implementation, the preset frequency domain transformation model can be obtained through the pest and disease image analysis database. The preset frequency domain transformation model in this embodiment is a discrete cosine transform model. In addition, other frequency domain transformation models can also be used in other embodiments, which are not limited here. It should be noted that the pest and disease image analysis database in this embodiment is a database specifically used to store, manage and analyze images and data related to plant pests and diseases. It is usually used for pest and disease detection, monitoring, identification and prevention in the fields of agriculture and forestry. The database contains a large number of images related to pests and diseases, as well as corresponding annotations, classifications and feature information to assist in the automatic identification and analysis of pests and diseases.

[0074] In specific implementation, for example, the frequency domain coefficients corresponding to the selected frequency position are determined according to the above-mentioned method of determining the frequency domain coefficient corresponding to the selected frequency position based on the position information corresponding to the selected frequency position, the horizontal scale, the vertical scale, and the pixel value of each pixel point in the pest and disease monitoring image, and the frequency domain coefficients corresponding to the remaining frequency positions are further determined, thereby obtaining multiple frequency domain coefficients corresponding to the pest and disease monitoring image, which will not be repeated here.

[0075] It should be noted that the frequency domain coefficients in this application represent the coefficients obtained after the pest and disease monitoring image is transformed through the frequency domain. The frequency domain coefficients reflect the characteristic information of the pest and disease monitoring image at different frequency components. The lower frequency domain coefficients represent the overall outline, slowly changing parts and main brightness information of the pest and disease monitoring image, while the higher frequency domain coefficients correspond to the rapidly changing parts such as the details, edges and noise of the image. Therefore, by determining the frequency domain coefficients, it is possible to effectively identify whether there is pest and disease invasion in the pest and disease monitoring image, and then take corresponding protective measures for the target trees.

[0076] In some embodiments, reference Figure 2 As shown in FIG. 1 , this figure is an exemplary flow chart for determining the suspicious degree of pests and diseases according to some embodiments of the present application. In this embodiment, the suspicious degree of pests and diseases of target trees can be determined by all frequency domain coefficients and the grayscale information entropy of the pest and disease monitoring image using the following steps:

[0077] First, in step 1021, the total number of high-frequency coefficients and the total number of low-frequency coefficients are extracted from all frequency domain coefficients;

[0078] Next, in step 1022, the spectrum energy ratio of the pest monitoring image is determined based on the total number of high-frequency coefficients and the total number of low-frequency coefficients;

[0079] Then, in step 1023, the grayscale information entropy of the pest monitoring image is determined;

[0080] Finally, in step 1024, the suspicion degree of pests and diseases of the target trees is determined by using the spectral energy ratio and the grayscale information entropy.

[0081] In specific implementation, the total number of high-frequency coefficients and the total number of low-frequency coefficients are extracted from all frequency domain coefficients, that is: the preset frequency domain coefficient is compared with each frequency domain coefficient respectively, for each frequency domain coefficient, when the frequency domain coefficient is greater than the preset frequency domain coefficient, the frequency domain coefficient is used as the high-frequency domain coefficient, otherwise it is used as the low-frequency domain coefficient, and then all high-frequency domain coefficients and all low-frequency domain coefficients are obtained, and the total number of all high-frequency domain coefficients is calculated to obtain the total number of high-frequency coefficients, and the total number of all low-frequency domain coefficients is calculated to obtain the total number of low-frequency coefficients. In this embodiment, the high-frequency domain coefficient represents the energy coefficient of the rapidly changing part of the texture feature in the pest and disease monitoring image, and the low-frequency domain coefficient represents the energy coefficient of the slowly changing part of the texture feature in the pest and disease monitoring image.

[0082] It should be noted that the preset frequency domain coefficient in this embodiment is a pre-set standard frequency domain coefficient used to identify high frequency domain coefficients and low frequency domain coefficients, that is, the frequency domain coefficient higher than the preset frequency domain coefficient is used as the high frequency domain coefficient, and vice versa as the low frequency domain coefficient.

[0083] In specific implementation, the spectral energy ratio of the pest and disease monitoring image is determined based on the total number of high-frequency coefficients and the total number of low-frequency coefficients, that is, the ratio of the total number of low-frequency coefficients to the total number of high-frequency coefficients is calculated, and the ratio calculation result is used as the spectral energy ratio of the pest and disease monitoring image. In addition, in other embodiments, other calculation methods can also be used to calculate the spectral energy ratio of the pest and disease monitoring image.

[0084] It should be noted that, in this embodiment, the spectral energy ratio is used to measure the overall smoothness of the pest and disease monitoring image in the frequency domain. That is, the larger the spectral energy ratio, the greater the overall smoothness of the pest and disease monitoring image in the frequency domain, indicating that the possibility of the target trees being attacked by pests and diseases is greater; when the spectral energy ratio is smaller, the overall smoothness of the pest and disease monitoring image in the frequency domain is smaller, indicating that the possibility of the target trees being attacked by pests and diseases is smaller.

[0085] In some embodiments, the grayscale information entropy of the pest monitoring image may be determined by the following steps:

[0086] Obtaining the grayscale value corresponding to each pixel in the pest monitoring image;

[0087] Extract all different grayscale values ​​and determine the grayscale proportion of each different grayscale value;

[0088] The grayscale information entropy of the pest monitoring image is determined according to the grayscale proportions of different grayscale values.

[0089] It should be noted that, in this embodiment, different grayscale values ​​represent different grayscale values.

[0090] In specific implementation, the grayscale proportion of each different grayscale value is determined, that is: the total number of pixels in the pest and disease monitoring image is obtained, the frequency of occurrence of each different grayscale value is obtained, and for each different grayscale value, the corresponding frequency of occurrence is calculated relative to the total number, and the ratio calculation result is used as the grayscale proportion of the different grayscale value, thereby obtaining the grayscale proportion of each different grayscale value. In addition, in other embodiments, other calculation methods can also be used to calculate the grayscale proportion of different grayscale values, which is not limited here. In this embodiment, the grayscale proportion represents the proportion of different grayscale values ​​in the pest and disease monitoring image, and the grayscale proportion describes the proportion of the number of pixels of each grayscale level in the pest and disease monitoring image to the total number of pixels. By determining the grayscale proportion, the brightness distribution of the pest and disease monitoring image can be effectively analyzed to understand the contrast, brightness and overall visual characteristics of the pest and disease monitoring image.

[0091] In specific implementation, the grayscale information entropy of the pest and disease monitoring image is determined according to the grayscale proportion of each different grayscale value, that is: a preset information entropy model is obtained, the grayscale proportion of each different grayscale value is input as an input parameter into the preset information entropy model, and the information entropy model outputs the grayscale information entropy of the pest and disease monitoring image.

[0092] It should be noted that in this embodiment, the information entropy function in the prior art is used as the preset information entropy model, which will not be described in detail here. In addition, in other embodiments, other entropy models can be set according to actual needs, which is not limited here.

[0093] It should also be noted that the grayscale information entropy in this application represents the degree of uncertainty in the grayscale value distribution in the pest and disease monitoring image, that is, the greater the grayscale information entropy, the greater the degree of uncertainty in the grayscale value distribution in the pest and disease monitoring image, indicating that there are more texture detail features in the pest and disease monitoring image; the smaller the grayscale information entropy, the smaller the degree of uncertainty in the grayscale value distribution in the pest and disease monitoring image, indicating that there are fewer texture detail features in the pest and disease monitoring image; therefore, by determining the grayscale information entropy, the degree of damage to the target trees by pests and diseases can be effectively identified.

[0094] In specific implementation, the suspicion degree of pests and diseases of the target trees is determined by the spectral energy ratio and the grayscale information entropy, that is, the spectral energy ratio and the grayscale information entropy are weighted and summed, and the weighted summation result is used as the suspicion degree of pests and diseases of the target trees. In this embodiment, the weights of the spectral energy ratio and the grayscale information entropy are set to constants between 0 and 1. For example, in this application, the weight of the spectral energy ratio is set to 0.36, and the weight of the grayscale information entropy is set to 0.64. In addition, the weights of the spectral energy ratio and the grayscale information entropy can also be determined according to actual needs, which is not limited here.

[0095] It should be noted that the suspicion degree of pests and diseases in the present application indicates the degree of suspicion of the presence of pests and diseases in the target trees, that is, the greater the suspicion degree of pests and diseases, the greater the suspicion degree of the presence of pests and diseases in the target trees, and the smaller the suspicion degree of pests and diseases, the smaller the suspicion degree of the presence of pests and diseases in the target trees. In the monitoring of target trees, when the target trees are attacked by pests and diseases, the leaves will change color, spots, wither, curl, etc., and spots and wormholes will appear on the stems, resulting in complex texture features in the collected monitoring images, and the changes in their texture features are also more prominent. Therefore, the present application determines the suspicion degree of pests and diseases in the target trees through the spectral energy ratio and the grayscale information entropy, which can effectively identify the suspicion degree of the presence of pests and diseases in the target trees in the pest monitoring image, and further analyze the degree of pest and disease invasion.

[0096] It should also be noted that the preset suspicion level in this application represents a pre-set standard pest and disease suspicion level, which is used to determine whether the target forest is invaded by pests and diseases. If it exceeds this range, it indicates that the target forest is invaded by pests and diseases, and further analysis of the pest and disease monitoring images is required to obtain the degree of invasion of the target forest. Specifically, the preset suspicion level can be set according to actual needs and is not limited here.

[0097] In some embodiments, the first segmentation threshold of the pest monitoring image may be extracted by the following steps:

[0098] Obtaining the horizontal scale and vertical scale of the pest monitoring image;

[0099] Determine a sample template for dividing the pest monitoring image based on the horizontal scale and the vertical scale;

[0100] Dividing the pest monitoring image into a plurality of pest monitoring sub-images using the partitioning sample template;

[0101] The segmentation threshold of each pest monitoring sub-image is extracted, and then the first segmentation threshold of the pest monitoring image is determined by all the segmentation thresholds.

[0102] In specific implementation, the horizontal scale and vertical scale of the pest monitoring image are obtained through the image processing tool OpenCV, which will not be repeated here. The horizontal scale represents the horizontal size of the image, and the vertical scale represents the vertical size of the image.

[0103] In a specific implementation, the division sample template of the plant disease and pest monitoring image is determined based on the horizontal scale and the vertical scale, that is, a preset division number of the plant disease and pest monitoring image is obtained, the horizontal scale and the vertical scale are uniformly divided according to the preset division number, a horizontal division scale and a vertical division scale are obtained, and then the division sample template of the plant disease and pest monitoring image is obtained from the horizontal division scale and the vertical division scale. In addition, in other embodiments, other determination manners can also be used to obtain the division sample template, which is not limited here.

[0104] In a specific implementation, the preset division number of the plant disease and pest monitoring image can be obtained from a plant disease and pest image analysis database, and the preset division number represents a number of subgraphs into which the plant disease and pest monitoring image is required to be divided.

[0105] It should be noted that the division sample template in this embodiment represents a division template used as a reference size, and through determination of the division sample template, the plant disease and pest monitoring image can be divided into multiple subgraphs. In addition, the horizontal division scale in this embodiment represents a size of the horizontal scale used as the division sample template, and the vertical division scale in this embodiment represents a size of the vertical scale used as the division sample template.

[0106] In a specific implementation, the plant disease and pest monitoring image is divided into multiple plant disease and pest monitoring subgraphs from the division sample template, that is, the plant disease and pest monitoring image is divided from the top left corner according to the size of the division sample template, and multiple plant disease and pest monitoring subgraphs are obtained. In this embodiment, the plant disease and pest monitoring subgraph represents a local image region divided from the plant disease and pest monitoring image. The overall monitoring image can not clearly display the details of the plant disease and pest of each local region due to a large range, and therefore, through determination of the plant disease and pest monitoring subgraph, more accurate monitoring and analysis can be performed on a smaller scale.

[0107] In a specific implementation, the segmentation threshold of each plant disease and pest monitoring subgraph is extracted, that is, the segmentation threshold of each plant disease and pest monitoring subgraph can be extracted by the Otsu method in image processing, which is not described here again. The Otsu method is a threshold selection method based on maximum inter-class variance, which finds a threshold to maximize the inter-class variance between the foreground and the background after segmentation, that is, the difference between the two is maximized, so as to obtain the segmentation threshold. In addition, in other embodiments, other segmentation threshold extraction methods can also be used to extract the segmentation threshold of each plant disease and pest monitoring subgraph, which is not limited here. In this embodiment, the segmentation threshold represents a value for background and foreground segmentation of an image, and the foreground in this application represents target information to be extracted, and the background represents interference information to be separated.

[0108] In specific implementation, the first segmentation threshold of the pest and disease monitoring image is determined by all segmentation thresholds, that is, all segmentation thresholds are averaged, and the average calculation result is used as the first segmentation threshold of the pest and disease monitoring image. In addition, in other embodiments, other determination methods can also be used to determine the first segmentation threshold of the pest and disease monitoring image, which is not limited here.

[0109] It should be noted that the first segmentation threshold in this application represents the first threshold for foreground and background segmentation of the pest and disease monitoring image, which is used to analyze the degree of pest and disease infestation of the target trees in the pest and disease monitoring image. By determining the first segmentation threshold, the pest and disease monitoring image is quickly divided into different areas for the first time, thereby roughly analyzing the occurrence range and severity of pests and diseases in the target trees.

[0110] In step 103, the gradient amplitude of each pixel in the pest monitoring image is determined, a two-dimensional amplitude matrix is ​​constructed through all the gradient amplitudes, and a second segmentation threshold of the two-dimensional amplitude matrix is ​​extracted according to a preset image segmentation model.

[0111] In some embodiments, reference Figure 3 As shown in FIG. 1 , this figure is an exemplary flow chart for determining the gradient amplitude according to some embodiments of the present application. In this embodiment, determining the gradient amplitude of each pixel in the pest monitoring image can be achieved by using the following steps:

[0112] First, in step 1031, the horizontal gradient component and the vertical gradient component corresponding to each pixel point in the pest monitoring image are determined;

[0113] Then, in step 1032, a pixel point is selected as a selected pixel point, and the gradient amplitude of the selected pixel point is determined based on the horizontal gradient component and the vertical gradient component corresponding to the selected pixel point;

[0114] Finally, in step 1033, the gradient amplitudes of the remaining pixel points are further determined to obtain the gradient amplitudes of the respective pixel points in the pest and disease monitoring image.

[0115] In some embodiments, the following steps may be used to determine the horizontal gradient component and the vertical gradient component corresponding to each pixel point in the pest monitoring image:

[0116] Obtaining a preset horizontal convolution kernel and a preset vertical convolution kernel of the pest monitoring image;

[0117] Extracting a local image pixel block of each pixel point in the pest monitoring image;

[0118] For each pixel point, the corresponding local image pixel block is convolved with the preset horizontal convolution kernel and the preset vertical convolution kernel respectively to obtain the horizontal gradient component and vertical gradient component corresponding to the pixel point, and then the horizontal gradient component and vertical gradient component corresponding to each pixel point in the pest and disease monitoring image are obtained.

[0119] In specific implementation, the preset horizontal convolution kernel and the preset vertical convolution kernel of the pest and disease monitoring image can be obtained through the pest and disease image analysis database. The preset horizontal convolution kernel is usually: [-1, 0, 1; -2, 0, 2; -1, 0, 1], and the preset horizontal convolution kernel is usually: [-1, -2, -1; 0, 0, 0; 1, 2, 1]. In this embodiment, the preset horizontal convolution kernel represents a preset matrix for detecting horizontal edge information of the image, and the preset vertical convolution kernel in this embodiment represents a preset matrix for detecting vertical edge information of the image.

[0120] In specific implementation, the local map pixel blocks of each pixel point in the pest and disease monitoring image are extracted, that is: for each pixel point, the corresponding eight-neighborhood area is extracted with the pixel point as the center pixel point, and the eight-neighborhood area is used as the local map pixel block of the pixel point, thereby obtaining the local map pixel block of each pixel point. In addition, in other embodiments, other methods can also be used to extract the local map pixel blocks of each pixel point in the pest and disease monitoring image, which is not limited here.

[0121] It should be noted that, in this embodiment, the local image pixel block represents the range of the eight-neighborhood area extracted with the pixel point as the center.

[0122] It should also be noted that, in this embodiment, the horizontal gradient component represents a quantity used to describe the degree of change of the pest and disease monitoring image in the horizontal direction, that is, the larger the horizontal gradient component, the greater the degree of change of the pest monitoring image in the horizontal direction, and vice versa. The vertical gradient component in this embodiment represents a quantity used to describe the degree of change of the pest and disease monitoring image in the vertical direction, that is, the larger the vertical gradient component, the greater the degree of change of the pest and disease monitoring image in the vertical direction, and vice versa.

[0123] In a specific implementation, the gradient amplitude of the selected pixel point is determined based on the horizontal gradient component and the vertical gradient component corresponding to the selected pixel point. That is, the horizontal gradient component and the vertical gradient component are squared and summed, and the square root of the square sum calculation result is taken to obtain the gradient amplitude of the selected pixel point.

[0124] In a specific implementation, the gradient amplitudes of the remaining pixel points can be determined by the determination manner of "determining the gradient amplitude of a selected pixel point according to the horizontal gradient component and the vertical gradient component corresponding to the selected pixel point", and then the gradient amplitudes of all the pixel points in the pest and disease monitoring image are obtained

[0125] It should be noted that the gradient amplitude in the present application represents a quantity describing the degree of change of a pixel point in the pest and disease monitoring image, that is, the greater the gradient amplitude, the greater the degree of change of the pixel point in the pest and disease monitoring image, and vice versa. The edge in the image is usually a place with a larger gradient amplitude, because the pixel value changes most dramatically at the edge. By calculating the gradient amplitude, the edge information in the image can be effectively detected. For example, in the pest and disease monitoring image, the gradient amplitude can be used to identify the edge of a leaf, an abnormal edge caused by pests and diseases, and the like, so as to determine the position and range of the pests and diseases.

[0126] In some embodiments, the two-dimensional amplitude matrix can be constructed by all the gradient amplitudes by using the following steps, that is:

[0127] A two-dimensional matrix with the same size as the pest and disease monitoring image is created.

[0128] Each pixel point in the pest and disease monitoring image is traversed, and the gradient amplitude of each pixel point is filled into the corresponding position in the two-dimensional matrix to obtain a two-dimensional amplitude matrix.

[0129] In a specific implementation, a two-dimensional matrix with the same size as the pest and disease monitoring image is created by using a data structure in the prior art (such as a NumPy array), which will not be described here. The two-dimensional matrix represents a two-dimensional array structure composed of rows and columns.

[0130] It should be noted that the number of rows and columns of the two-dimensional matrix in the present embodiment corresponds to the number of pixel rows and columns of the pest and disease monitoring image. Each pixel in the pest and disease monitoring image has a corresponding position in the two-dimensional matrix. In the present application, the two-dimensional amplitude matrix represents a two-dimensional data structure composed of amplitude information at each pixel point in the pest and disease monitoring image. Each element in the two-dimensional amplitude matrix stores the gradient amplitude at the corresponding pixel point in the pest and disease monitoring image. By determining the two-dimensional amplitude matrix, the edges and features in the pest and disease monitoring image can be effectively highlighted. In the process of calculating the gradient amplitude, the boundaries between the pest and disease areas and the healthy areas in the image, as well as the specific texture and shape changes caused by the pests and diseases, and the like, will be represented as higher amplitudes in the amplitude matrix, which is conducive to more clearly identifying the position and range of the pests and diseases.

[0131] In some embodiments, the second segmentation threshold of the two-dimensional amplitude matrix can be extracted according to a preset image segmentation model by using the following steps, that is:

[0132] Get the preset image segmentation model;

[0133] The two-dimensional amplitude matrix is ​​input into a preset image segmentation model, and the preset image segmentation model outputs a second segmentation threshold.

[0134] In specific implementation, a preset image segmentation model can be obtained through the pest and disease image analysis database. The image segmentation model described in this application is processed using a threshold iteration model. In addition, other image segmentation models can also be used for processing in other embodiments, such as a bimodal model and an Otsu model, which are not limited here. The processing principle of the threshold iteration model in this embodiment is: initially select an estimated threshold, divide the image into two parts, the target and the background, calculate the average grayscale value of the two parts, update the threshold according to the new average grayscale value, and repeat this process until the threshold converges to obtain the final segmentation threshold.

[0135] It should be noted that the second segmentation threshold in this application represents the second segmentation threshold used to segment the background and foreground of the pest and disease monitoring image. The segmentation threshold is the key criterion for dividing the pixels in the pest and disease monitoring image into pest and disease areas and healthy areas. By determining the second segmentation threshold, the areas affected by pests and diseases in the image can be further distinguished from the normal healthy areas, avoiding confusion between pest and disease areas and healthy areas, thereby more accurately assessing the occurrence scope and severity of pests and diseases.

[0136] In step 104, dynamic segmentation verification is performed on the pest monitoring image using the first segmentation threshold and the second segmentation threshold to obtain a confidence segmentation threshold of the pest monitoring image.

[0137] In some embodiments, the first segmentation threshold and the second segmentation threshold are used to perform dynamic segmentation verification on the pest monitoring image to obtain a confidence segmentation threshold of the pest monitoring image, specifically by the following steps, namely:

[0138] constructing a dynamic segmentation threshold interval by using the first segmentation threshold and the second segmentation threshold;

[0139] Extract all segmentation threshold samples from the dynamic segmentation threshold interval;

[0140] For each segmentation threshold sample, segment the pest monitoring image into a foreground area and a background area using the segmentation threshold sample, and calculate the ratio of the average grayscale value of the segmented foreground area to the average grayscale value of the background area, thereby obtaining a relative grayscale ratio of the segmented pest monitoring image using each segmentation threshold sample;

[0141] Determining the confidence relative grayscale ratio of the pest monitoring image from all relative grayscale ratios;

[0142] The confidence segmentation threshold of the pest monitoring image is obtained by extracting the confidence relative grayscale ratio from the dynamic segmentation threshold interval.

[0143] It should be noted that, in this embodiment, the calculation result of the ratio of the average grayscale value of the foreground area to the average grayscale value of the background area is used as the relative grayscale ratio.

[0144] In specific implementation, a dynamic segmentation threshold interval is constructed by the first segmentation threshold and the second segmentation threshold, that is: the first segmentation threshold and the second segmentation threshold are numerically compared, the maximum segmentation threshold is used as the upper limit value of the dynamic segmentation threshold interval, and the minimum segmentation threshold is used as the lower limit value of the dynamic segmentation threshold interval, thereby obtaining the dynamic segmentation threshold interval. In this embodiment, the dynamic segmentation threshold interval represents the segmentation threshold range that can be used to dynamically segment the pest and disease monitoring image.

[0145] In a specific implementation, all segmentation threshold samples are extracted from the dynamic segmentation threshold interval, that is, starting from the lower limit value of the dynamic segmentation threshold interval, all segmentation thresholds with a value of 1 as a step size are extracted from the dynamic segmentation threshold interval, and the extracted segmentation thresholds are used as segmentation threshold samples, thereby obtaining all segmentation threshold samples. For example, when the dynamic segmentation threshold interval is [112, 117], all segmentation thresholds with a value of 1 as a step size are extracted from the dynamic segmentation threshold interval: 112, 113, 114, 115, 116, 117.

[0146] It should be noted that the segmentation threshold sample in this embodiment represents a sample used to determine the optimal segmentation threshold. In addition, the relative grayscale ratio in this embodiment represents the ratio between the average grayscale value of the foreground and the average grayscale value of the background in the pest and disease monitoring image after segmentation by the segmentation threshold. By determining the relative grayscale ratio, the relative difference in grayscale between the target area and the background area can be effectively evaluated.

[0147] In specific implementation, the foreground area and background area of ​​the pest monitoring image are segmented by the segmentation threshold sample, that is: the segmentation threshold sample is compared with the grayscale value corresponding to each pixel point in the pest monitoring image, and when the grayscale value corresponding to the pixel point is greater than the segmentation threshold sample, the pixel point corresponding to the grayscale value is used as an element of the foreground area, otherwise, the pixel point corresponding to the grayscale value is used as an element of the background area, thereby obtaining the foreground area and background area of ​​the pest monitoring image. It should be noted that in this application, the foreground area represents the area in the pest monitoring image where pests and diseases are infested, and the foreground area represents other areas in the pest monitoring image except the area where pests and diseases are infested.

[0148] In specific implementation, the confidence relative grayscale ratio of the pest and disease monitoring image is determined by all relative grayscale ratios, that is, the average value of all relative grayscale ratios is calculated, and the average value calculation result is used as the confidence relative grayscale ratio of the pest and disease monitoring image. In addition, in other embodiments, other calculation methods can also be used to calculate the confidence relative grayscale ratio of the pest and disease monitoring image, which is not limited here.

[0149] It should be noted that the confidence relative grayscale ratio in this embodiment represents the confidence ratio between the average grayscale value of the foreground area and the average grayscale value of the background area in the pest and disease monitoring image, that is, in this application, it is the comprehensive relative grayscale ratio of each segmented sample after segmentation. By analyzing the confidence relative grayscale ratio, the true ratio between the average grayscale value of the foreground area and the average grayscale value of the background area in the pest and disease monitoring image can be more accurately identified, thereby obtaining the optimal segmentation threshold of the pest and disease monitoring image based on the ratio.

[0150] In specific implementation, the confidence segmentation threshold of the pest and disease monitoring image is obtained by extracting the confidence relative grayscale ratio from the dynamic segmentation threshold interval, that is: the segmentation threshold sample corresponding to the confidence relative grayscale ratio is extracted from the dynamic segmentation threshold interval, and the segmentation threshold sample is used as the confidence segmentation threshold of the pest and disease monitoring image.

[0151] It should be noted that the confidence segmentation threshold in this application represents an effective segmentation threshold that can be used to segment the pest and disease monitoring image. The confidence segmentation threshold can accurately segment the target area and the background area in the pest and disease monitoring image. In the pest and disease monitoring image, the pest and disease monitoring image will be affected by the adhesion of pests and diseases to each other or mixed with plant tissues, as well as the similarity between the color and texture characteristics of pests and diseases and the color and texture characteristics of plant leaves in the background, making it difficult for existing segmentation algorithms to accurately distinguish between foreground areas and background areas, and unable to accurately determine the degree of pest and disease damage. This application dynamically verifies the segmentation threshold to obtain an effective segmentation threshold for the pest and disease monitoring image, so as to more realistically and effectively distinguish the pest and disease area from the normal background area, reduce misjudgments and missed judgments, and thus avoid the adhesion effects caused by pests and diseases adhering to each other or mixing with plant tissues, as well as the similarity between the color and texture characteristics of pests and diseases and the color and texture characteristics of plant leaves in the background, thereby improving the accuracy of identifying pest and disease damage.

[0152] It should also be noted that the dynamic segmentation verification in this application refers to the process of dynamically extracting the optimal segmentation threshold (confidence segmentation threshold) for the pest and disease monitoring image, wherein the first segmentation threshold and the second segmentation threshold are used to perform dynamic segmentation verification on the pest and disease monitoring image, that is: a dynamic segmentation threshold interval is constructed by the first segmentation threshold and the second segmentation threshold; all segmentation threshold samples are extracted from the dynamic segmentation threshold interval; for each segmentation threshold sample, the foreground area and the background area of ​​the pest and disease monitoring image are segmented by the segmentation threshold sample, and the ratio of the average grayscale value of the foreground area after segmentation to the average grayscale value of the background area is calculated, thereby obtaining the relative grayscale ratio of each segmentation threshold sample after segmentation; the confidence relative grayscale ratio of the pest and disease monitoring image is determined by all relative grayscale ratios; the confidence segmentation threshold of the pest and disease monitoring image is extracted from the dynamic segmentation threshold interval by the confidence relative grayscale ratio, thereby completing the dynamic segmentation verification of the pest and disease monitoring image.

[0153] In step 105, the pest and disease monitoring image is segmented based on the confidence segmentation threshold, and the degree of pest and disease damage of the target trees in the pest and disease monitoring image is determined according to the segmentation result.

[0154] In some implementations, segmenting the pest monitoring image based on the confidence segmentation threshold and determining the pest damage degree of the target trees in the pest monitoring image according to the segmentation result may specifically be performed by the following steps, namely:

[0155] Segmenting the pest monitoring image using the confidence segmentation threshold to obtain a foreground area and a background area corresponding to the pest monitoring image;

[0156] The pest and disease infestation area of ​​the target trees in the pest and disease monitoring image is analyzed based on the foreground area.

[0157] In a specific implementation, the confidence segmentation threshold is used to segment the pest and disease monitoring image to obtain the foreground area and background area corresponding to the pest and disease monitoring image, that is, the confidence segmentation threshold is compared with the grayscale value corresponding to each pixel point in the pest and disease monitoring image. When the grayscale value corresponding to the pixel point is greater than the confidence segmentation threshold, the pixel point corresponding to the grayscale value is used as an element of the foreground area of ​​the pest and disease monitoring image; otherwise, the pixel point corresponding to the grayscale value is used as an element of the background area of ​​the pest and disease monitoring image, thereby obtaining the foreground area and background area of ​​the pest and disease monitoring image.

[0158] In specific implementation, the pest and disease infestation area of ​​the target trees in the pest and disease monitoring image is analyzed based on the foreground area, that is, the total number of pixels in the foreground area is obtained, and the total number of pixels is used as the pest and disease infestation area of ​​the target trees in the pest and disease monitoring image.

[0159] It should be noted that in this embodiment, the area of ​​pest and disease damage can be used to measure the degree of pest and disease damage to the target trees, that is, the larger the area of ​​pest and disease damage, the greater the degree of pest and disease damage to the target trees, and the smaller the area of ​​pest and disease damage, the smaller the degree of pest and disease damage to the target trees. In specific implementation, the degree of pest and disease damage corresponding to different areas of pest and disease damage can be pre-set, so as to obtain the corresponding degree of pest and disease damage based on the determined area of ​​pest and disease damage of the target trees. No further details will be given here.

[0160] In addition, in another aspect of the present application, in some embodiments, the present application provides a pest and disease protection system for forestry seedling cultivation, the system includes a pest and disease image recognition unit, reference Figure 4 , which is a schematic diagram of exemplary hardware and / or software of a pest and disease image recognition unit according to some embodiments of the present application. The pest and disease image recognition unit 200 includes: an acquisition module 201, a processing module 202, and an execution module 203, which are described as follows:

[0161] Acquisition module 201, in this application, acquisition module 201 is mainly used to collect pest and disease monitoring images of target trees;

[0162] Processing module 202, in the present application, is mainly used to perform frequency domain transformation on the pest monitoring image to obtain multiple frequency domain coefficients corresponding to the pest monitoring image, determine the pest suspicion of the target tree through all the frequency domain coefficients and the grayscale information entropy of the pest monitoring image, and when the pest suspicion is greater than a preset suspicion, extract a first segmentation threshold of the pest monitoring image;

[0163] The processing module 202 is further configured to determine the gradient amplitude of each pixel in the pest monitoring image, construct a two-dimensional amplitude matrix using all the gradient amplitudes, and extract a second segmentation threshold of the two-dimensional amplitude matrix according to a preset image segmentation model;

[0164] In addition, the processing module 202 is further configured to perform dynamic segmentation verification on the pest monitoring image using the first segmentation threshold and the second segmentation threshold to obtain a confidence segmentation threshold of the pest monitoring image;

[0165] Execution module 203, in this application, the execution module 203 is mainly used to segment the pest and disease monitoring image based on the confidence segmentation threshold, and determine the degree of pest and disease damage of the target trees in the pest and disease monitoring image according to the segmentation result.

[0166] In addition, the present application also provides a computer device, which includes a memory and a processor, wherein the memory stores code, and the processor is configured to obtain the code and execute the above-mentioned pest and disease monitoring image recognition method.

[0167] In some embodiments, reference Figure 5 , which is a schematic diagram of the structure of a computer device for implementing a pest monitoring image recognition method according to some embodiments of the present application. The pest monitoring image recognition method in the above embodiment can be Figure 5 The computer device 300 shown in FIG. 1 is implemented as shown in FIG. 1 , and the computer device 300 includes at least one processor 301 , a communication bus 302 , a memory 303 , and at least one communication interface 304 .

[0168] The processor 301 may be a general-purpose central processing unit (CPU), or an application specific integrated circuit (ASIC) or one or more processors for controlling the execution of the pest monitoring image recognition method of the present application.

[0169] The communication bus 302 may be used to transmit information between the aforementioned components.

[0170] The memory 303 can be a read only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read only memory (EEPROM), a compact disc read only memory (CD ROM) or other optical disk storage, a magnetic disk or other magnetic storage device, or any other medium capable of storing desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to. The memory 303 can exist independently, and is connected to the processor 301 through the communication bus 302. The memory 303 can also be integrated with the processor 301.

[0171] The memory 303 is configured to store program codes for implementing the solutions of the present application, and the processor 301 is configured to execute the program codes stored in the memory 303. The program codes can include one or more software modules. The determination of the pest monitoring image recognition method in the above embodiments can be implemented by one or more software modules in the program codes of the processor 301 and the memory 303.

[0172] The communication interface 304 is configured to communicate with other devices or communication networks, such as an Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc., using any transceiver-like device.

[0173] In specific implementations, as an example, the computer device can include multiple processors, each of which can be a single CPU processor or a multi-CPU processor. The processor herein can refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0174] The aforementioned computer device can be a general-purpose computer device or a dedicated computer device. In a specific implementation, the computer device can be a desktop computer, a portable computer, a network server, a personal digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device, or an embedded device. The embodiments of this application do not limit the type of computer device.

[0175] In addition, the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned pest and disease monitoring image recognition method.

[0176] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.

[0177] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A pest monitoring image recognition method for use in a forestry seedling pest protection system to identify forestry pests and diseases, characterized in that: The method comprises the following steps: Collect pest and disease monitoring images of target trees; Performing a frequency domain transform on the pest monitoring image to obtain a plurality of frequency domain coefficients corresponding to the pest monitoring image, determining the pest suspicion degree of the target tree based on all the frequency domain coefficients and the grayscale information entropy of the pest monitoring image, and extracting a first segmentation threshold of the pest monitoring image when the pest suspicion degree is greater than a preset suspicion degree; Determine the gradient amplitude of each pixel in the pest monitoring image, construct a two-dimensional amplitude matrix through all the gradient amplitudes, and extract a second segmentation threshold of the two-dimensional amplitude matrix according to a preset image segmentation model; Performing dynamic segmentation verification on the pest monitoring image using the first segmentation threshold and the second segmentation threshold to obtain a confidence segmentation threshold for the pest monitoring image; Segmenting the pest monitoring image based on the confidence segmentation threshold, and determining the degree of pest damage of target trees in the pest monitoring image according to the segmentation result; The first segmentation threshold and the second segmentation threshold are used to dynamically segment and verify the pest monitoring image to obtain a confidence segmentation threshold for the pest monitoring image. The following steps are specifically used: constructing a dynamic segmentation threshold interval by using the first segmentation threshold and the second segmentation threshold; Extract all segmentation threshold samples from the dynamic segmentation threshold interval; For each segmentation threshold sample, segment the pest monitoring image into a foreground area and a background area using the segmentation threshold sample, and calculate the ratio of the average grayscale value of the segmented foreground area to the average grayscale value of the background area, thereby obtaining a relative grayscale ratio of the segmented pest monitoring image using each segmentation threshold sample; Determining the confidence relative grayscale ratio of the pest monitoring image from all relative grayscale ratios; The confidence segmentation threshold of the pest monitoring image is extracted from the dynamic segmentation threshold interval through the confidence relative grayscale ratio, and the confidence segmentation threshold represents an effective segmentation threshold capable of segmenting the pest monitoring image.

2. The method according to claim 1, wherein Performing frequency domain transformation on the pest monitoring image to obtain multiple frequency domain coefficients corresponding to the pest monitoring image specifically includes: Obtaining the horizontal scale and vertical scale of the pest monitoring image; Determining the horizontal frequency range and the vertical frequency range of the pest monitoring image by the horizontal scale and the vertical scale respectively; determining all frequency positions according to the horizontal frequency range and the vertical frequency range; Selecting a frequency position as a selected frequency position, and determining a frequency domain coefficient corresponding to the selected frequency position according to position information corresponding to the selected frequency position, the horizontal scale, the vertical scale, and the pixel value of each pixel in the pest and disease monitoring image; Continue to determine the frequency domain coefficients corresponding to the remaining frequency positions, and then obtain multiple frequency domain coefficients corresponding to the pest monitoring image.

3. The method according to claim 2, wherein Determining the frequency domain coefficient corresponding to the selected frequency position according to the position information corresponding to the selected frequency position, the horizontal scale, the vertical scale, and the pixel value of each pixel point in the pest and disease monitoring image specifically includes: extracting a horizontal normalization factor and a vertical normalization factor corresponding to a selected frequency position according to the horizontal scale and the vertical scale respectively; Obtaining a preset frequency domain transformation model; The horizontal normalization factor, the vertical normalization factor, the position information corresponding to the selected frequency position, and the pixel value of each pixel point in the pest and disease monitoring image are input into the frequency domain transformation model, and the frequency domain transformation model outputs the frequency domain coefficient corresponding to the selected frequency position.

4. The method according to claim 1, wherein Determining the suspicious degree of pests and diseases of target trees by using all frequency domain coefficients and the grayscale information entropy of the pest and disease monitoring image specifically includes: Extract the total number of high-frequency coefficients and the total number of low-frequency coefficients from all frequency domain coefficients; Determining a spectrum energy ratio of the pest monitoring image according to the total number of high-frequency coefficients and the total number of low-frequency coefficients; Determining the grayscale information entropy of the pest monitoring image; The suspicious degree of pests and diseases of target trees is determined by the spectral energy ratio and the grayscale information entropy.

5. The method according to claim 4, wherein Determining the grayscale information entropy of the pest monitoring image specifically includes: Obtaining the grayscale value corresponding to each pixel in the pest monitoring image; Extract all different grayscale values ​​and determine the grayscale proportion of each different grayscale value; The grayscale information entropy of the pest monitoring image is determined according to the grayscale proportions of different grayscale values.

6. The method according to claim 1, wherein Extracting the first segmentation threshold of the pest monitoring image specifically includes: Obtaining the horizontal scale and vertical scale of the pest monitoring image; Determine a sample template for dividing the pest monitoring image based on the horizontal scale and the vertical scale; Dividing the pest monitoring image into a plurality of pest monitoring sub-images using the partitioning sample template; The segmentation threshold of each pest monitoring sub-image is extracted, and then the first segmentation threshold of the pest monitoring image is determined by all the segmentation thresholds.

7. The method according to claim 1, wherein The pest and disease monitoring images of target trees are collected through surveillance cameras.

8. A pest and disease protection system for forestry seedling cultivation, which uses the method according to any one of claims 1 to 7 to perform pest and disease monitoring image recognition, and the pest and disease protection system for forestry seedling cultivation includes a pest and disease image recognition unit, characterized in that: The pest and disease image recognition unit includes: The acquisition module is used to collect pest and disease monitoring images of target trees; a processing module for performing a frequency domain transform on the pest monitoring image to obtain a plurality of frequency domain coefficients corresponding to the pest monitoring image, determining a pest suspicion degree of the target tree based on all the frequency domain coefficients and the grayscale information entropy of the pest monitoring image, and extracting a first segmentation threshold of the pest monitoring image when the pest suspicion degree is greater than a preset suspicion degree; The processing module is further configured to determine the gradient amplitude of each pixel in the pest monitoring image, construct a two-dimensional amplitude matrix using all the gradient amplitudes, and extract a second segmentation threshold of the two-dimensional amplitude matrix according to a preset image segmentation model; The processing module is further configured to perform dynamic segmentation verification on the pest monitoring image using the first segmentation threshold and the second segmentation threshold to obtain a confidence segmentation threshold of the pest monitoring image; An execution module is used to segment the pest monitoring image based on the confidence segmentation threshold, and determine the degree of pest damage of the target trees in the pest monitoring image according to the segmentation result.

9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a code, and the processor is configured to obtain the code and execute the pest monitoring image recognition method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the pest monitoring image recognition method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Rapid detection method for garden plant disease and insect pest area

    CN117974989A

  • Intelligent detection method and system for diseases and insect pests of agricultural crops

    CN118762189A