Intelligent detection system for wheat ear diseases and insect pests in field
By constructing the illumination and feature influence coefficients of neighboring pixel blocks and combining them with a nonlocal mean filtering algorithm with adaptive attenuation parameters, the problems of uneven illumination and noise interference in the detection of wheat ear diseases and pests in the field were solved, thus improving the accuracy of disease and pest detection.
Patent Information
- Application Number
- CN202511554775.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2045-10-29
AI Technical Summary
In the detection of diseases and pests on wheat ears in the field, uneven lighting and noise interference make it difficult to accurately obtain detailed features of diseases and pests. Conventional denoising algorithms are prone to losing details of diseases and pests, affecting the detection accuracy.
By constructing the illumination influence coefficient and feature influence coefficient of neighboring pixel blocks, and combining them with adaptive attenuation parameters, a nonlocal mean filtering algorithm is used for image enhancement, preserving the detailed features of the pest and disease area and effectively denoising.
It improves the accuracy of wheat ear disease and pest detection in the field, ensuring that detailed features of diseased and pest-affected areas are effectively preserved even under light interference, thus enhancing detection precision.
Smart Images

Figure CN121033032B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, specifically to an intelligent detection system for diseases and pests on wheat ears in the field. Background Technology
[0002] Wheat ear diseases and pests are represented by Fusarium head blight, powdery mildew, wheat smut, aphids, and wheat midges. The occurrence of these diseases and pests is influenced by multiple factors, including climatic conditions, cultivation methods, and varietal resistance, and can significantly impact wheat food safety and yield. Therefore, wheat ear disease and pest detection is an important component of modern smart agriculture, playing a crucial role in yield prediction, disease monitoring, and precision agriculture. With the development of deep learning technology, wheat ear disease and pest detection methods based on target detection algorithms have shown significant advantages.
[0003] Currently, when using computer vision to detect wheat ear diseases and pests in the field, it is important to consider that the acquisition of wheat ear images is affected by the ambient lighting and the condition of the image capturing equipment, resulting in uneven lighting. The early detailed features of wheat ear diseases and pests are easily affected by the noise generated by the lighting, making it difficult to accurately capture the local details of wheat ear diseases and pests. Conventional denoising algorithms are prone to over-denoising when dealing with the above-mentioned lighting effects, resulting in the loss of disease and pest details. Consequently, when using deep learning algorithms for disease and pest detection, it is difficult to obtain effective features of wheat ear diseases and pests, affecting the accuracy of subsequent detection of wheat ear diseases and pests. Summary of the Invention
[0004] To address the aforementioned technical problems, the purpose of this application is to provide an intelligent detection system for wheat ear diseases and pests in the field, and the specific technical solution adopted is as follows:
[0005] This application proposes an intelligent detection system for wheat ear diseases and pests in the field, the system comprising:
[0006] Image acquisition module: Acquires images of wheat ears in the field and obtains the grayscale and brightness values of each pixel in the image;
[0007] Illumination Analysis Module: Determines the neighboring pixel blocks of each pixel through a preset neighborhood window; determines the illumination influence coefficient of each pixel's neighboring pixel blocks based on the brightness value distribution in the neighboring pixel blocks;
[0008] Grayscale analysis module: Determines the feature influence coefficient of a neighboring pixel block based on the degree of disorder in the distribution of grayscale values in the neighborhood of each pixel and the occurrence of pixels with the same grayscale value.
[0009] An image enhancement module: determining a comprehensive influence coefficient of a neighborhood pixel block of each pixel point based on the feature influence coefficient and the illumination influence coefficient; determining an adaptive attenuation parameter corresponding to each search pixel point in the search window of the target pixel point based on the difference between the comprehensive influence coefficient of the target pixel point and each search pixel point in the preset search window of the target pixel point, combining a preset basic attenuation parameter, and performing image enhancement on the wheat ear image by using a non-local mean filtering algorithm;
[0010] A disease and pest detection module: detecting diseases and pests of the wheat ear by using the enhanced image.
[0011] In one embodiment, the neighborhood pixel block is obtained by: taking a pixel block composed of all pixel points in a preset neighborhood window of each pixel point as the neighborhood pixel block of each pixel point.
[0012] In one embodiment, the illumination influence coefficient is obtained by:
[0013] Interval distribution statistics are performed on the luminance values of the pixel points in the neighborhood pixel block of each pixel point, and a light feature value of the neighborhood pixel block of each pixel point is constructed based on the statistical result.
[0014] The illumination influence coefficient of the neighborhood pixel block of each pixel point is determined based on the mean value of the luminance values of the pixel points in the neighborhood pixel block and the light feature value, and the illumination influence coefficient is positively correlated with the mean value of the luminance values and negatively correlated with the light feature value.
[0015] In one embodiment, the light feature value is obtained by:
[0016] The number of pixel points with a luminance value greater than or equal to a preset threshold and the number of pixel points with a luminance value less than the preset threshold in the neighborhood pixel block of each pixel point are counted respectively, and are denoted as a first number and a second number respectively; the difference between the first number and the second number is taken as the light feature value of the neighborhood pixel block of each pixel point.
[0017] In one embodiment, the feature influence coefficient is obtained by:
[0018] For any pixel point c in the neighborhood pixel block of each pixel point, interval distribution statistics are performed on the gray values of the pixel points in the neighborhood of the pixel point c, and a gray feature value of the neighborhood of the pixel point c is constructed based on the statistical result; a mean value of the gray feature values of the neighborhoods of all pixel points in the neighborhood pixel block is calculated and is denoted as a first mean value; the difference between the gray feature value of the neighborhood of each pixel point in the neighborhood pixel block and the first mean value is denoted as a first difference; the number of pixel point pairs with the same gray value in the neighborhood of the pixel point c in the neighborhood pixel block is obtained.
[0019] The feature influence coefficient of the neighborhood pixel block is positively correlated with the first difference and negatively correlated with the number of the pixel point pairs with the same gray value.
[0020] In one embodiment, the gray feature value is obtained by:
[0021] The number of the pixel points in the neighborhood of the pixel point c with a gray value greater than a preset threshold and the number of the pixel points in the neighborhood of the pixel point c with a gray value less than the preset threshold are counted respectively, and are denoted as a third number and a fourth number respectively; the difference between the third number and the fourth number in the neighborhood of the pixel point c is calculated as the gray feature value of the neighborhood of the pixel point c.
[0022] In one embodiment, the pixel point pair with the same gray value is a pixel point pair composed of two pixel points with the same gray value.
[0023] In one embodiment, the comprehensive influence coefficient is the product of the illumination influence coefficient and the feature influence coefficient of the neighborhood pixel block of each pixel point.
[0024] In one embodiment, the adaptive attenuation parameter is obtained by:
[0025] A negative correlation mapping function of the difference between the comprehensive influence coefficients of the neighborhood pixel blocks of two pixel points is used as the influence difference coefficient between the neighborhood pixel blocks of the two pixel points; and the product of the influence difference coefficient between the neighborhood pixel blocks of the target pixel point and each to-be-searched pixel point in the search window of the target pixel point and a preset basic attenuation parameter is used as the adaptive attenuation parameter corresponding to each to-be-searched pixel point in the search window of the target pixel point.
[0026] In one embodiment, the expression of the influence difference coefficient is:
[0027] In the expression, e is a natural constant; and represents the influence difference coefficient between the neighborhood pixel block of the pixel point a and the neighborhood pixel block of the to-be-searched pixel point b in the search window of the pixel point a; represents the comprehensive influence coefficient of the neighborhood pixel block of the pixel point a; represents the comprehensive influence coefficient of the neighborhood pixel block of the pixel point b; represents an exponential function with a natural constant as the base.
[0028] The present application has the following advantages:
[0029] The present application considers the need for image denoising processing when acquiring the wheat ear image in the field in the intelligent detection process of the wheat ear disease and pest, because of the light interference. Due to the influence of the field environment light and the image shooting device when acquiring the image, the light may not be uniform, and the local noise may be large, so that the details of the disease and pest in the acquired image are easy to be submerged by the noise. In view of the problem that the fixed attenuation parameter is used for denoising processing when the conventional non-local mean filtering algorithm is used for image denoising processing, the denoising effect is poor. The present application analyzes the need for denoising effect when the disease and pest occur. First, the light influence coefficient of the neighborhood pixel block of each pixel point is constructed by the light intensity value of the neighborhood of each pixel point, and the influence of the light intensity on the disease and pest area is considered. The feature influence coefficient of the neighborhood pixel block of each pixel point is constructed by the gray value of the neighborhood of each pixel point, and the difference feature of the local gray change of the pixel points in the disease and pest area and the normal wheat ear area is considered. The adaptive attenuation parameter setting is performed according to the feature influence coefficient and the light influence coefficient of the neighborhood pixel block, so as to ensure that the non-local mean filtering algorithm can strengthen the detail reservation of the disease and pest area and effectively denoise when denoising the wheat ear disease and pest image, and further improve the accuracy of the subsequent field wheat ear disease and pest detection. BRIEF DESCRIPTION OF DRAWINGS
[0030] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0031] Figure 1 A field wheat ear disease and pest intelligent detection system block diagram provided by an embodiment of the present application;
[0032] Figure 2 A schematic diagram for acquiring the light influence coefficient;
[0033] Figure 3 A flow chart of a field wheat ear disease and pest intelligent detection system. DETAILED DESCRIPTION
[0034] In order to further illustrate the technical means and effects taken by the present application to achieve the predetermined object, the specific implementation, structure, features and effects of the intelligent detection system for field wheat ear diseases and insect pests according to the present application are described in detail below in combination with the drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.
[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0036] The specific scheme of the intelligent detection system for field wheat ear diseases and insect pests provided by the present application is described below in combination with the drawings.
[0037] Please refer to Figure 1 which shows a block diagram of an intelligent detection system for field wheat ear diseases and insect pests according to one embodiment of the present application, which includes:
[0038] The image acquisition module 101 acquires field wheat ear images, and obtains the gray scale values and brightness values of each pixel point in the images.
[0039] Common diseases and insect pests of wheat ears include scab, smut and aphid damage, etc. In order to intelligently detect field wheat ear diseases and insect pests, a professional camera with a high-definition camera is first used to collect images of field wheat ears with diseases and insect pests.
[0040] Further, the acquired field wheat ear images are preprocessed, the wheat ear images are input into the weighted average method, and gray scale processing is performed, with the output being a gray scale image of the wheat ear. It should be noted that for the gray scale processing of the wheat ear images, the present application only provides one gray scale processing method, and there are many existing gray scale processing methods, and other gray scale processing methods such as the maximum value method, the minimum value method and the average value method can also be used for image gray scale processing, and the present application does not make specific limitations. At the same time, the RGB image of the wheat ear image is converted into an HSV space image, and the V channel image is extracted to obtain a brightness image of the wheat ear image.
[0041] The gray scale values and brightness values of each pixel point in the wheat ear image can be obtained through the gray scale image and the brightness image.
[0042] The light analysis module 102 determines the neighborhood pixel block of each pixel point through a preset neighborhood window; and determines the light influence coefficient of the neighborhood pixel block of each pixel point based on the brightness value distribution in the neighborhood pixel block of each pixel point.
[0043] Considering that in the planting production process of wheat, when the wheat ear is affected by pests and diseases, the early characteristics of the wheat ear pests and diseases usually show the characteristics of small lesion area, low color contrast and irregular shape, which are easy to be confused with noise. The light in the field changes at different times and weather conditions, and when acquiring the image of the wheat ear area pests and diseases, it will be affected by uneven light, resulting in a large amount of noise interference, so the acquired image needs to be denoised. Based on the above analysis, the non-local mean filtering algorithm is selected to denoise the original RGB image. In the filtering process, a large search window and a small neighborhood window need to be defined. Considering that the wheat ear image needs to be processed in a large range to find similar wheat ear regions that are not affected by light, the size of the search window is set to 21x21 in this embodiment. To avoid the situation that the neighborhood window is too small to be sensitive to noise or too large to ignore details, the size of the neighborhood window is set to 5x5 in this embodiment. In other embodiments of the application, the implementer can set the size of the search window and the neighborhood window according to the actual situation.
[0044] However, in the denoising process, considering that the wheat ear image is affected by uneven light, the higher brightness may cause local overexposure in the corresponding part of the wheat ear image, which may further amplify the noise. In the case of weak light and shadow, the pixel values of the corresponding region are generally low. When there is a pest and disease in the region, the detailed features of the pest and disease are blurred, which is easy to be misjudged as noise and smoothed out.
[0045] Therefore, based on the above analysis, taking any pixel point a in the search window of the wheat ear image as an example, the neighborhood window centered on the pixel point a is obtained, and all the pixel points in the 5x5 neighborhood window are combined into a pixel block as the neighborhood pixel block of the pixel point a.
[0046] Further, the brightness value of each pixel point can be obtained from the obtained brightness image, and the brightness values of all the pixel points in the neighborhood pixel block are taken as the input of the Otsu method. The output segmentation threshold is denoted as the first segmentation threshold T, and the number of pixel points with brightness values greater than or equal to the first segmentation threshold T and the number of pixel points with brightness values less than the first segmentation threshold T in the neighborhood pixel block are counted respectively and denoted as the first number and the second number. The difference between the first number and the second number is calculated as the brightness feature value of the neighborhood pixel block.
[0047] Further, based on the above analysis, the illumination influence coefficient of the neighborhood pixel block is constructed to indicate the influence of light on the neighborhood pixel block of each pixel point, and the expression is:
[0048]
[0049] In the formula, This represents the illumination influence coefficient of the neighboring pixel block of pixel a; This represents the average brightness value of all pixels in the neighborhood pixel block of pixel a; This represents the brightness feature value of the neighboring pixel block of pixel a; This represents the total number of pixels in the neighborhood pixel block of pixel a; It is an exponential function with the natural constant e as the base.
[0050] When the pixel block is located in a bright lighting condition The values are relatively large, and the proportion of pixels with brightness values greater than or equal to the threshold T is higher. The larger the value, the better the calculation results. A larger value indicates that the pixel area is affected by stable bright lighting; when the pixel is located in a darker lighting condition... The values are relatively small, and the proportion of pixels with brightness values less than the threshold T is higher. The smaller the value, the better the calculated result. The smaller the value, the more likely the pixel area is affected by stable, relatively dim lighting conditions.
[0051] The grayscale analysis module 103 determines the feature influence coefficient of the neighboring pixel block based on the degree of disorder in the distribution of grayscale values of each pixel in the neighborhood and the occurrence of pixels with the same grayscale value.
[0052] Considering the significant differences between diseased and healthy wheat areas when pests and diseases occur, diseased and pest-affected areas exhibit distinct characteristics compared to healthy wheat areas. For example, the pink mold layer of mildew, the black spore masses of smut, and clusters of aphids are scattered across the wheat ears.
[0053] Therefore, the distribution of gray values in the 8-neighborhood of all pixels in the neighboring pixel block of each pixel is analyzed. First, taking any pixel c in the neighboring pixel block of pixel a as an example, the gray values of all pixels in the 8-neighborhood of pixel c are used as the input of Otsu's method, and the output segmentation threshold is recorded as the second segmentation threshold. The number of pixels in the 8-neighborhood of pixel c with gray values greater than the second segmentation threshold and the number of pixels with gray values less than the second segmentation threshold are counted respectively and recorded as the third number and the fourth number. The difference between the third number and the fourth number in the 8-neighborhood of pixel c is calculated as the gray feature value in the 8-neighborhood of pixel c.
[0054] Furthermore, the distribution disorder of the grayscale feature values of all pixels in the 8-neighborhood of pixel a is analyzed, and combined with the number of pairs of pixels with the same grayscale value in the 8-neighborhood of each pixel in the neighborhood of pixel a, the feature influence coefficient of the neighborhood of pixel a is constructed, and the expression is:
[0055]
[0056] In the formula, The feature influence coefficient of the neighboring pixel block of pixel a; This is the normalization function; This represents the total number of pixels in the neighborhood pixel block of pixel a; This represents the grayscale feature value of pixel c within the 8-neighborhood of pixel a. The mean value of the grayscale feature values of the 8-neighborhood of all pixels in the neighborhood pixel block of pixel a is denoted as the first mean value; This represents the number of pairs of pixels with the same grayscale value in the 8-neighborhood of pixel c within the neighboring pixel block of pixel a. As a preset, extremely small positive number, in this embodiment of the application, The value is set to 1 to prevent the denominator from being 0. In other embodiments of this application, the implementer can set the value according to the actual situation. The value of . Specifically, the pixel pair with the same gray value is a pixel pair consisting of two pixels with the same gray value; for the number of pixel pairs with the same gray value in the 8-neighborhood, for example, if there are 4 pixels with the same gray value in the 8-neighborhood, then there are 6 pixel pairs according to the permutation and combination. This is the first difference.
[0057] When a pixel block is located in a pest-infested area, the mold, spores, aphids, etc., of the pests appear as randomly distributed protruding points. Within the 8-neighborhood of each pixel in the pixel block, the distribution of pixels with gray values higher or lower than the segmentation threshold is random and irregular, and it is extremely rare for pixels in the 8-neighborhood to have the same gray value. However, when a pixel block is located in a healthy wheat area, the gray value changes smoothly within the 8-neighborhood of each pixel in the pixel block. The distribution of gray values higher and lower than the segmentation threshold is balanced, usually with little difference, and the gray values of the 8-neighborhood pixels often appear the same. When the texture change of pixels in the neighboring pixel block of pixel a is irregular, the distribution of gray values in the 8-neighborhood of all pixels within the pixel block... The value fluctuates greatly, and the Q value is small, resulting in a low calculated value. A relatively large value indicates that the pixel block contains many details of pests and diseases; when the grayscale values of the 8-neighborhood of a pixel within a pixel block are regular, all the obtained values... The values are relatively stable, and the calculated values are... The value is relatively small, indicating that the pixel block mainly reflects the characteristics of healthy wheat spikes.
[0058] The image enhancement module 104 determines the comprehensive influence coefficient of the neighborhood pixel block of each pixel point based on the feature influence coefficient and the illumination influence coefficient; determines the adaptive attenuation parameter corresponding to each search pixel point in the search window of the target pixel point based on the difference between the comprehensive influence coefficient of the target pixel point and each search pixel point in the preset search window of the target pixel point, and combines the preset basic attenuation parameter; and performs image enhancement on the wheat spike image by using a non-local mean filtering algorithm.
[0059] For the feature fluctuation and illumination influence in the neighborhood pixel block of the pixel point a affected by illumination, an illumination texture index is constructed to represent the comprehensive evaluation of the illumination influence and local features of the neighborhood pixel block of each pixel point, and the expression is:
[0060]
[0061] In the formula, comprehensive influence coefficient of the neighborhood pixel block of the pixel point a; illumination influence coefficient of the neighborhood pixel block of the pixel point a; feature influence coefficient of the neighborhood pixel block of the pixel point a.
[0062] Further, when weighting the similarity between the image target pixel point and the neighborhood pixel block of other pixel points in the search window, it is considered that when the wheat spike image is affected by uneven illumination due to external environment, equipment, etc., the pixel points in the disease and pest area and the pixel points in the healthy wheat spike area may be given a high similarity due to the similar gray values, resulting in poor denoising effect. Based on the above analysis, when there is a difference in illumination and features, the attenuation parameter needs to be increased to offset the influence of illumination. When the pixel point a is the target pixel point, for each search pixel point in the search window of the pixel point a, the influence difference coefficient between the neighborhood pixel block of the pixel point a and the neighborhood pixel block of each search pixel point in the search window of the pixel point a is calculated, which is used to evaluate the illumination and feature difference between the neighborhood pixel block of the target pixel point and the neighborhood pixel block of the search pixel point in the corresponding search window, and the expression is:
[0063]
[0064] In the formula, influence difference coefficient between the neighborhood pixel block of the pixel point a and the neighborhood pixel block of the search pixel point b in the search window of the pixel point a; comprehensive influence coefficient of the neighborhood pixel block of the pixel point a; comprehensive influence coefficient of the neighborhood pixel block of the pixel point b; represents an exponential function with a natural constant as a base.
[0065] When there is a large difference in brightness and feature between two pixel blocks, the decay parameter needs to be reduced to give a smaller weight to the pixel to be searched, and the value of the calculated is larger, and the value of the calculated is smaller; when the brightness between two pixel blocks is similar, the feature difference is smaller, the decay parameter needs to be increased to give a smaller weight to the pixel to be searched, and the value of the calculated is larger.
[0066] Based on the above analysis, the adaptive decay parameter is constructed for each pixel to be searched, and the expression is:
[0067]
[0068] In the formula, represents the adaptive decay parameter corresponding to the weighting of the pixel to be searched b in the search window of the target pixel a; represents the influence difference coefficient between the neighborhood pixel block of the pixel a and the neighborhood pixel block of the pixel to be searched b in the search window; h is a preset basic decay parameter, and the value of h is set to 10 in the embodiments of the present application. In other embodiments of the present application, the implementer can set the value of h according to the actual situation.
[0069] The RGB image of the wheat ear is taken as the input of the non-local mean filtering algorithm, the adaptive decay parameters of each pixel to be searched calculated by the above method are taken as the corresponding decay parameters in the algorithm, and the operation is performed to carry out the denoising processing on the RGB image of the wheat ear, and the output is the denoised RGB image. The non-local mean filtering algorithm is a known technology, and the specific steps will not be described in detail.
[0070] The disease and pest detection module 105 detects the disease and pest of the wheat ear through the enhanced image.
[0071] The wheat ear RGB image denoised by the non-local mean filtering algorithm is labeled by the Lablimg labeling software, and the label types are scab, smut and aphid. The number of wheat ear RGB images provided by the present application is 10000, and the labeled data is divided into training set, test set and validation set by the ratio of 7:2:1. The YOLOv10 algorithm is used to train the wheat ear disease and pest detection model. Since the detailed features of the wheat ear disease are mainly small targets, the CBAM attention mechanism is added to the main part of the algorithm. Important feature channels can be filtered out through channel attention, and important regions on these channels can be filtered out through spatial attention, further highlighting the features of small target diseases and pests. In the positioning loss function part, CIoU loss function is used. When the wheat ears are densely distributed, the traditional IoU Loss may not provide an effective gradient direction because of the similar overlapping area, while the CIoU Loss can solve this problem by center point distance. In the classification loss function part, the binary cross entropy (BCE) loss function is selected. The independent class prediction mechanism of this loss function can avoid direct competition between classes. For the prediction of different diseases and pests to be detected, the prediction is independent of each other. When a wheat ear is infected with multiple diseases and pests at the same time, the BCE Loss can capture this complex disease condition. In the confidence loss function part, the binary cross entropy (BCE) loss function is also used. The optimizer selects the adaptive optimizer Adam, which has the characteristics of adaptive learning rate. For different parameters, the learning rate can be dynamically adjusted according to the statistical characteristics of the gradient, which can quickly converge and can be applied to small data sets to reduce the amount of data set labeling. The prepared data set is input into the configured YOLOv10 algorithm to train the wheat ear disease and pest detection model, and the maximum number of iterations is 100.
[0072] It should be noted that for the selection of the wheat ear disease and pest detection model and the setting of the parameters in the model, the present application only provides one setting method, and the implementer can also use other neural network models for training. The implementer can set the parameters in the model according to the actual situation, and the present application does not make specific limitations.
[0073] The trained wheat ear disease and pest detection model is used to detect and feedback the field wheat ear diseases and pests in real time. The content of module 105 is known, and the specific process will not be repeated.
[0074] The acquisition process of the light influence coefficient is shown in Figure 2 The flow chart of the intelligent detection system for field wheat ear diseases and pests is shown in Figure 3 .
[0075] In summary, in the process of intelligent detection of wheat ear parts in the field, the image of the wheat ear parts in the field needs to be denoised due to the interference of light. Because of the influence of the field environment light and the image shooting device when the image is acquired, the light may not be uniform, and the local noise may be large, which may cause the details of the disease and pest characteristics in the acquired image to be easily overwhelmed by noise. In order to solve the problem that the conventional non-local mean filtering algorithm uses a fixed attenuation parameter for denoising processing when denoising the image, resulting in poor denoising effect, the application analyzes the demand for denoising effect when the disease and pest occur. First, the light intensity value of each pixel neighborhood is used to construct the light influence coefficient of each pixel neighborhood pixel block, considering the influence of light intensity on the disease and pest area. The gray value of each pixel neighborhood is used to construct the feature influence coefficient of each pixel neighborhood pixel block, considering the difference in local gray scale change between the disease and pest area and the normal wheat ear area. The adaptive attenuation parameter setting is performed according to the feature influence coefficient and the light influence coefficient of the neighborhood pixel block, so as to ensure that the non-local mean filtering algorithm can strengthen the detail preservation of the disease and pest area and effectively denoise when denoising the wheat ear disease and pest image, and further improve the accuracy of subsequent field wheat ear disease and pest detection.
[0076] It should be noted that the above-mentioned embodiments of the application are in the order of description only, and do not represent the advantages and disadvantages of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are also possible or may be advantageous.
[0077] Each embodiment in the application is described in a progressive manner, and the same or similar parts between each embodiment can be referred to each other. Each embodiment focuses on the difference from other embodiments.
[0078] The above-described embodiments are only used to illustrate the technical solutions of the application, and not to limit them; modifying the technical solutions described in the above embodiments, or equivalently replacing some technical features, does not change the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the application, and should be included in the protection scope of the application.
Claims
1. An intelligent detection system for wheat ear diseases and pests in the field, characterized in that, The system includes: Image acquisition module: Acquires images of wheat ears in the field and obtains the grayscale and brightness values of each pixel in the image; Illumination Analysis Module: Determines the neighboring pixel blocks of each pixel through a preset neighborhood window; determines the illumination influence coefficient of each pixel's neighboring pixel blocks based on the brightness value distribution in the neighboring pixel blocks; Grayscale analysis module: Determines the feature influence coefficient of a neighboring pixel block based on the degree of disorder in the distribution of grayscale values in the neighborhood of each pixel and the occurrence of pixels with the same grayscale value. Image enhancement module: Based on the feature influence coefficient and the illumination influence coefficient, determine the comprehensive influence coefficient of the neighboring pixel blocks of each pixel; based on the difference between the comprehensive influence coefficient of the target pixel and each search pixel in the preset search window, combined with the preset basic attenuation parameter, determine the adaptive attenuation parameter corresponding to each search pixel in the target pixel search window, and combine with the non-local mean filtering algorithm to enhance the image of wheat ears. Pest and disease detection module: Detects pests and diseases in wheat ears using enhanced images; The process for obtaining the illumination influence coefficient is as follows: The brightness values of pixels in the neighboring pixel blocks of each pixel are statistically distributed over intervals, and the brightness feature values of the neighboring pixel blocks of each pixel are constructed based on the statistical results. The illumination influence coefficient of each pixel's neighboring pixel block is determined based on the average brightness value of the pixels in the neighboring pixel block and the brightness feature value. The illumination influence coefficient is positively correlated with the average brightness value and negatively correlated with the brightness feature value. The process for obtaining the feature influence coefficient is as follows: For any pixel c in the neighborhood pixel block of each pixel, perform interval distribution statistics on the gray values of pixels in the neighborhood of pixel c, and construct the gray value feature value of the neighborhood of pixel c based on the statistical results; calculate the mean of the gray value feature values of the neighborhood of all pixels in the neighborhood pixel block, and denot it as the first mean; denot the difference between the gray value feature value of the neighborhood of each pixel in the neighborhood pixel block and the first mean as the first difference; obtain the number of pixel pairs with the same gray value in the neighborhood of pixel c in the neighborhood pixel block. The feature influence coefficient of the neighboring pixel block is positively correlated with the first difference and negatively correlated with the number of pixel pairs with the same gray value; The process for obtaining the brightness feature value is as follows: The number of pixels with brightness values greater than or equal to a preset threshold and the number of pixels with brightness values less than a preset threshold in the neighboring pixel blocks of each pixel are counted separately and recorded as the first number and the second number, respectively; the difference between the first number and the second number is used as the brightness feature value of the neighboring pixel blocks of each pixel. The process for obtaining the grayscale feature values is as follows: The number of pixels with gray values greater than a preset threshold and the number of pixels with gray values less than a preset threshold in the neighborhood of pixel c are counted separately and denoted as the third number and the fourth number, respectively. The difference between the third number and the fourth number in the neighborhood of pixel c is calculated and used as the gray value feature value of the neighborhood of pixel c.
2. The intelligent detection system for wheat ear diseases and pests in the field according to claim 1, characterized in that, The process of obtaining the neighboring pixel block is as follows: the pixel block composed of all pixels within the preset neighbor window of each pixel is taken as the neighboring pixel block of each pixel.
3. The intelligent detection system for wheat ear diseases and pests in the field according to claim 1, characterized in that, The same grayscale value pixel pair is a pixel pair consisting of two pixels with the same grayscale value.
4. The intelligent detection system for wheat ear diseases and pests in the field according to claim 1, characterized in that, The comprehensive influence coefficient is the product of the illumination influence coefficient and the feature influence coefficient of the neighboring pixel blocks of each pixel.
5. The intelligent detection system for wheat ear diseases and pests in the field according to claim 1, characterized in that, The process of obtaining the adaptive attenuation parameter is as follows: The negative correlation mapping function of the difference between the comprehensive influence coefficients of the neighboring pixel blocks of two pixels is used as the influence difference coefficient between the neighboring pixel blocks of two pixels. The product of the influence difference coefficient between the target pixel and the neighboring pixel blocks of each search pixel in its search window and the preset basic attenuation parameter is used as the adaptive attenuation parameter corresponding to each search pixel in the search window of the target pixel.
6. The intelligent detection system for wheat ear diseases and pests in the field according to claim 5, characterized in that, The expression for the coefficient of difference is: In the formula, This represents the coefficient of difference in influence between the neighboring pixel blocks of pixel a and the neighboring pixel blocks of the pixel b to be searched within the search window. This represents the combined influence coefficient of the neighboring pixel block of pixel a; This represents the combined influence coefficient of the neighboring pixel block of pixel b; This represents an exponential function with the natural constant as its base.
Citation Information
Patent Citations
An image denoising method based on adaptive non-local mean of attenuation parameters
CN109191391A
Ultrasonic image processing method based on image enhancement
CN117649357A