Diagnosis and control method of pests and diseases of rock lily
By combining adaptive wavelet threshold denoising and dual-channel fusion segmentation with CNN neural network, the problem of traditional methods being unable to accurately diagnose diseases and pests in rock-grown red beans is solved, and high-precision disease and pest identification and control scheme generation are achieved.
Patent Information
- Application Number
- CN202510665976.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-05-22
AI Technical Summary
Traditional methods for diagnosing diseases and pests are insufficient to meet the precise diagnostic needs of transplanted rock-grown red beans, especially since leaf diseases and pests are diverse and complex in morphology, making it difficult for traditional outline recognition methods to achieve automation and accurate diagnosis.
An adaptive wavelet thresholding denoising, dual-channel fusion segmentation, and a CNN-based disease and pest diagnosis model are employed. By combining adaptive wavelet thresholding technology and dual-channel segmentation, noise and lesion features are accurately separated through three-layer wavelet decomposition and an improved soft thresholding function, and a disease and pest diagnosis model is constructed for diagnosis.
It enables accurate diagnosis of diseases and pests in rock-grown red beans, reduces missegmentation and loss of lesion details, improves identification accuracy and anti-interference ability, and can process and generate effective prevention and control solutions in real time.
Smart Images

Figure CN120564041B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of plant disease and pest diagnosis, in particular to a method for diagnosing and preventing pests and diseases of transplanted rock red beans. BACKGROUND
[0002] Rock red bean has beautiful tree shape, evergreen crown, and bright seeds, and is an ornamental tree species for courtyard greening. The trunk is straight, and the wood quality is excellent with beautiful texture, and is a redwood timber tree species. The seeds have the effects of clearing heat and detoxifying, removing swelling and removing dampness, and are important medicinal materials. The endangered reasons include the number of mature plants, flowering and fruiting conditions, seed characteristics, and reproductive capacity, which are often the primary factors restricting the population's own breeding. Some rare and endangered plants can produce seeds, but it is difficult to germinate and sprout through conventional sowing due to the hard and dense seed coat, resulting in weak natural regeneration capacity and rare status. The growth, reproduction and regeneration of rock red bean also face multiple external factors including environmental changes, interspecific competition, human activities, etc.
[0003] With the rapid development of information technology, AI, Internet of Things, big data, mobile Internet, etc., more and more technologies and products are applied to plant growth process monitoring and pest and disease identification and diagnosis. Based on the concept of precision agriculture, fine production and pest and disease management have gradually become the mainstream of agricultural development. At present, pest and disease rapid diagnosis is mainly achieved through contour recognition and deep learning, but traditional contour recognition relies on manual feature extraction, which is difficult to meet the needs of automation.
[0004] A Chinese patent with authorization number CN106708782B discloses a regional pest and disease detection and diagnosis discrimination method based on wavelet analysis. The method includes the following steps: first, extracting and sampling the test data of poplar pests; second, using wavelet transform to preliminarily analyze the sampled data; third, defining and constructing an NDVI time spectrum curve; fourth, filtering the noise of the NDVI time spectrum curve; fifth, enhancing and separating the poplar pests; sixth, establishing a signal detection model for poplar leaf-eating pests; and seventh, performing real-time dynamic detection on the detected pest signals. The invention is based on the principles and physical basis of forest pest remote sensing monitoring, and uses NDVI time series data to define and construct a poplar NDVI time spectrum curve containing pest information, to obtain the evolution characteristics and rules of NDVI changes over time, effectively monitoring plant growth and pest and disease, and avoiding the gradual weakening of poplar growth.
[0005] A plant disease and pest diagnosis method and system based on artificial intelligence are disclosed in Chinese Patent No. CN113688959B. The method includes the following steps: obtaining disease style features of each plant sample image with labels according to color texture distribution maps; training a variational autoencoder using each plant sample image with labels to obtain a Gaussian model corresponding to each plant sample image to be labeled; assigning labels to each plant sample image to be labeled according to the Gaussian model to obtain label data corresponding to each plant sample image to be labeled; training a target network according to each plant sample image with labels, label data corresponding to each plant sample image with labels, each plant sample image to be labeled, and label data corresponding to each plant sample image to be labeled; and inputting a target plant image into the trained target network to obtain a diagnosis result corresponding to the target plant image. The invention can improve the accuracy of the target network in diagnosing plant infection with diseases and pests.
[0006] Due to the different types of leaf diseases and pests of transplanted rock-growing red beans, the characteristics of the collected disease and pest images are also different. Traditional lesion area contour recognition relies on manual extraction, and the types of diseases and pests are numerous and complex in shape, so traditional contour recognition methods cannot meet the requirements of accurate diagnosis. SUMMARY
[0007] The technical problem to be solved by the present application is to provide a transplanted rock-growing red bean disease and pest diagnosis and control method to overcome the shortcomings of the prior art.
[0008] To achieve the above-mentioned purpose, the technical scheme adopted by the present application is as follows:
[0009] The transplanted rock-growing red bean disease and pest diagnosis and control method comprises the following steps:
[0010] Deploying video monitoring to collect rock-growing red bean leaf images;
[0011] Adaptive wavelet threshold denoising is performed on the collected rock-growing red bean leaf images;
[0012] Double-channel fusion segmentation is performed on the denoised rock-growing red bean leaf images to obtain rock-growing red bean disease and pest area images;
[0013] A disease and pest diagnosis model based on a CNN neural network is constructed;
[0014] The rock-growing red bean disease and pest area images are input into the disease and pest diagnosis model and the disease and pest probability is output;
[0015] When the disease and pest probability exceeds a threshold value, a control scheme is generated.
[0016] Further, the adaptive wavelet threshold denoising of the collected transplanted rock-growing red bean leaf images specifically comprises the following steps:
[0017] The collected leaf image of the rock red bean is subjected to three-layer wavelet decomposition:
[0018] The subbands subjected to three-layer wavelet decomposition are divided and adaptive thresholds are calculated respectively according to the subband categories, wherein the subband categories include: a high-frequency noise dominant category, a horizontal disease spot edge category, a vertical disease spot edge category and a low-frequency signal reservation category;
[0019] The improved soft threshold function is used to selectively inhibit the high-frequency coefficients after wavelet decomposition;
[0020] The wavelet is reconstructed to generate a rock red bean leaf image with denoising completed.
[0021] Further, the three-layer wavelet decomposition of the collected leaf image of the rock red bean specifically includes:
[0022] The first layer decomposition is: LL1, HL1, LH1 and HH1, wherein LL1 represents a low-frequency approximation subband; HL1, LH1 and HH1 represent horizontal, vertical and diagonal high-frequency detail subbands respectively;
[0023] The second layer decomposition of the LL1 subband is: LL2, HL2, LH2 and HH2, wherein LL2 represents a second layer low-frequency approximation subband; HL2, LH2 and HH2 represent second layer horizontal, vertical and diagonal detail subbands respectively;
[0024] The third layer decomposition of the LL2 subband is: LL3, HL3, LH3 and HH3, wherein LL3 represents a third layer low-frequency approximation subband, and HL3, LH3 and HH3 represent third layer horizontal, vertical and diagonal detail subbands respectively.
[0025] Further, the adaptive thresholds are calculated respectively according to the subband categories, specifically including:
[0026] The high-frequency noise dominant category subband includes: HH1 and HH2, and the high-frequency noise dominant category threshold is set as T g , and the calculation formula is:
[0027]
[0028] Wherein, σ represents the noise standard deviation, N g represents the total amount of pixels of the high-frequency noise dominant category subband, a g represents the high-frequency noise median item coefficient, M(·) represents the median function, |coeff g | represents the absolute value of the coefficient of the high-frequency noise dominant category subband after wavelet transform;
[0029] The horizontal disease spot edge category subband includes: HL1 and HL2, and the horizontal disease spot edge category threshold is set as T s , and the calculation formula is:
[0030]
[0031] wherein γ s represents a horizontal noise weight, a s represents a horizontal lesion mean term coefficient, |coeff s represents the absolute value of the coefficient of the horizontal lesion edge type sub-band after wavelet transform.
[0032] The vertical lesion edge type sub-band includes LH1 and LH2, and the vertical lesion edge type threshold is set as T c , and the calculation formula is:
[0033]
[0034] wherein γ c represents a vertical noise weight, a c represents a vertical lesion mean term coefficient, |coeff c represents the absolute value of the coefficient of the vertical lesion edge type sub-band after wavelet transform.
[0035] The low-frequency signal reservation type sub-band includes LL3, HL3, LH3 and HH3, and the low-frequency signal reservation type threshold is set as T d , and the calculation formula is:
[0036]
[0037] wherein γ d represents a low-frequency noise weight, a d represents a low-frequency noise coefficient, |coeff d represents the absolute value of the coefficient of the low-frequency signal reservation type sub-band after wavelet transform.
[0038] Further, the soft threshold function has a specific formula as follows:
[0039]
[0040] wherein i represents different sub-band categories, i = [g, s, c, d], T i represents the threshold of different sub-band categories, D i represents the improved soft threshold function, c i represents the high-frequency detail coefficient of different sub-band categories, sign(·) represents a positive and negative real number judgment function, and β represents a decay factor.
[0041] Further, the multiple pairs of denoised rock plant leaf images are subjected to double-channel fusion segmentation, specifically including the following steps:
[0042] The RGB image is converted to the Lab color space, the luminance channel L and the chroma channel A are extracted, and the calculation formula is:
[0043]
[0044] Wherein, R, G and B represent red, green and blue three color channels respectively;
[0045] The optimal threshold t of the A channel and the L channel is calculated based on the OTSU algorithm respectively A And t L ;
[0046] The luminance channel L and the chroma channel A are fused to generate a rock-growing red bean pest and disease area image, and the calculation formula is:
[0047]
[0048] Wherein, M(x,y) represents the reserved pixel point, A(x,y) represents the chroma of the pixel point, and L(x,y) represents the luminance of the pixel point.
[0049] Further, the pest and disease diagnosis model specifically comprises:
[0050] An input layer, three convolutional layers, three pooling layers, a fully connected layer and an output layer, wherein the input layer comprises 5 neurons, the activation function of the neuron uses Sigmoid, 1 convolutional layer and 1 pooling layer constitute a group, the output layer uses a Softmax classifier, and the output structure is a one-dimensional array with a length of 5;
[0051] The loss function calculation formula of the pest and disease diagnosis model is:
[0052]
[0053] Wherein, x represents the number of training samples, K represents the number of pest and disease categories, p j,k represents the probability of sample j belonging to the kth pest and disease label, y j,k represents the pest and disease label of sample j, and lambda represents a focusing factor.
[0054] Further, the prevention scheme is associated with a pest and disease type, a prevention opportunity and a pesticide dosage database, and a prevention scheme is dynamically generated according to a pest and disease probability classification.
[0055] According to one aspect of the present application, a storage medium is provided, the storage medium stores instructions, when a computer reads the instructions, the computer executes the transplanted rock-growing red bean pest and disease diagnosis and prevention method.
[0056] According to another aspect of the present application, there is provided an electronic device comprising a processor and the storage medium described above, the processor executing instructions in the storage medium.
[0057] Compared with the prior art, the present application has the following advantages:
[0058] 1、The present application is aimed at the problem that the traditional wavelet denoising method is prone to loss of lesion details or residual noise due to fixed threshold, and the adaptive wavelet threshold technology realizes the balance between noise suppression and lesion feature reservation by dynamically adjusting the threshold parameter.
[0059] 2、The present application improves the soft threshold function of wavelet denoising, retains weak lesion signals while suppressing noise, and avoids the problem of complete loss of weak edges by traditional soft threshold.
[0060] 3、The three-layer wavelet decomposition of the present application extracts subbands of different scales and directions through hierarchical extraction, providing a multi-resolution analysis framework for rock red bean disease and pest images. Combined with the adaptive threshold strategy, noise and lesion features can be accurately separated, laying a foundation for subsequent diagnosis and prevention.
[0061] 4、The present application has strong anti-interference through dual-channel threshold segmentation. Diseases usually appear as high values in the A channel and low values in the L channel, reducing missegmentation through dual-channel constraint. The complexity is comparable to single-channel Otsu, making it suitable for real-time processing.
[0062] 5、The present application increases the weight of difficult-to-classify samples (such as fuzzy lesions) by setting a focus factor for the loss function, focusing on leaf lesions rather than healthy textures, and improving the recognition accuracy of local diseases. BRIEF DESCRIPTION OF DRAWINGS
[0063] Other features, objects and advantages of the present application will become more apparent from the following detailed description of non-limiting embodiments made with reference to the accompanying drawings:
[0064] Figure 1 The flowchart of the embodiment of the present application is shown in the figure;
[0065] Figure 2 The wavelet denoising flowchart of the embodiment of the present application is shown in the figure;
[0066] Figure 3 The wavelet denoising decomposition schematic diagram of the embodiment of the present application is shown in the figure;
[0067] Figure 4 The disease and pest diagnosis model architecture diagram of the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0068] In order to make the purpose, technical scheme and advantages of the present application more clear, the present application will be described in detail below with reference to the drawings and specific embodiments.
[0069] As shown in the figure, the method for diagnosing and preventing pests and diseases of transplanted rock red beans comprises the following steps: Figure 1
[0070] Deploying video monitoring to collect rock red bean leaf images;
[0071] Adaptive wavelet threshold denoising is performed on the collected rock red bean leaf images;
[0072] The denoised rock red bean leaf image is subjected to double-channel fusion segmentation to obtain a rock red bean pest and disease area image;
[0073] A pest and disease diagnosis model based on a CNN neural network is constructed;
[0074] The rock red bean pest and disease area image is input into the pest and disease diagnosis model and outputs a pest and disease probability;
[0075] When the pest and disease probability exceeds a threshold value, a prevention and control scheme is generated.
[0076] As shown in the figure, adaptive wavelet threshold denoising is performed on the collected transplanted rock red bean leaf images, which specifically comprises the following steps: Figure 2 The collected rock red bean leaf images are subjected to three-layer wavelet decomposition:
[0077] The three-layer wavelet decomposition subbands are divided and adaptive thresholds are calculated according to the subband categories, wherein the subband categories include: high-frequency noise dominant category, horizontal disease spot edge category, vertical disease spot edge category, and low-frequency signal retention category;
[0078] The improved soft threshold function is used to selectively suppress the high-frequency coefficients after wavelet decomposition;
[0079] The wavelet is reconstructed to generate a denoised rock red bean leaf image.
[0080] As shown in the figure, the three-layer wavelet decomposition of the collected rock red bean leaf images specifically comprises:
[0081] Figure 3 The first layer decomposition is: LL1, HL1, LH1, and HH1, wherein LL1 represents a low-frequency approximation subband; HL1, LH1, and HH1 represent horizontal, vertical, and diagonal high-frequency detail subbands, respectively;
[0082] The LL1 subband is subjected to second layer decomposition into: LL2, HL2, LH2, and HH2, wherein LL2 represents a second layer low-frequency approximation subband; HL2, LH2, and HH2 represent second layer horizontal, vertical, and diagonal detail subbands, respectively;
[0083] The LL1 subband is subjected to second layer decomposition into: LL2, HL2, LH2, and HH2, wherein LL2 represents a second layer low-frequency approximation subband; HL2, LH2, and HH2 represent second layer horizontal, vertical, and diagonal detail subbands, respectively;
[0084] The third layer decomposition is performed on the LL2 subband to obtain LL3, HL3, LH3 and HH3, wherein LL3 represents a third layer low frequency approximation subband, HL3, LH3 and HH3 represent a third layer horizontal, vertical and diagonal detail subband respectively.
[0085] The adaptive threshold is calculated according to the subband category, and the calculation method comprises the following steps.
[0086] The high frequency noise dominant subband comprises HH1 and HH2, and the high frequency noise dominant threshold is set as T g , and the calculation formula is as follows:
[0087]
[0088] , wherein σ represents a noise standard deviation, N g represents the total number of pixels of the high frequency noise dominant subband, a g represents a high frequency noise median term coefficient, and M(·) represents a median function. g | represents the absolute value of the coefficient of the high frequency noise dominant subband after wavelet transform.
[0089] The horizontal plaque edge subband comprises HL1 and HL2, and the horizontal plaque edge threshold is set as T s , and the calculation formula is as follows:
[0090]
[0091] , wherein γ s represents a horizontal noise weight, a s represents a horizontal plaque median term coefficient, and |coeff s | represents the absolute value of the coefficient of the horizontal plaque edge subband after wavelet transform.
[0092] The vertical plaque edge subband comprises LH1 and LH2, and the vertical plaque edge threshold is set as T c , and the calculation formula is as follows:
[0093]
[0094] , wherein γ c represents a vertical noise weight, a c represents a vertical plaque median term coefficient, and |coeff c | represents the absolute value of the coefficient of the vertical plaque edge subband after wavelet transform.
[0095] The low frequency signal reservation subband comprises LL3, HL3, LH3 and HH3, and the low frequency signal reservation threshold is set as T d , and the calculation formula is as follows:
[0096]
[0097] where γ d represents the low-frequency noise weight, a d represents the low-frequency noise coefficient, |coeff d represents the absolute value of the coefficient of the low-frequency signal reserved sub-band after wavelet transform.
[0098] As shown in Table 1, the sub-band is divided into four categories according to the decomposition layer number and the direction characteristics.
[0099] Table 1
[0100]
[0101]
[0102] As shown in Table 2, the sub-band parameters are specifically set.
[0103] Table 2
[0104]
[0105] The soft threshold function has a specific formula:
[0106]
[0107] where i represents different sub-band categories, i=[g,s,c,d], T i represents the threshold value of different sub-band categories, D i represents the improved soft threshold function, c i represents the high-frequency detail coefficient of different sub-band categories, sign(·) represents the positive and negative real number judgment function, and β represents the attenuation factor.
[0108] In the early disease and pest image, the disease spot signal is weak, and the traditional soft threshold may be over-inhibited.
[0109] By default, β=0.2, which retains the weak disease spot signal while suppressing noise.
[0110] Example: if c=0.8T, the traditional soft threshold output is 0, and the improved output is 0.16T, which avoids completely losing weak edges.
[0111] As shown in Table 3, the experiment comparison of the traditional soft threshold and the improved soft threshold is shown.
[0112] Table 3
[0113] Method Lesion detection rate Noise residue Conventional soft threshold 0.872 35.1 dB Improved soft threshold 0.935 34.8 dB
[0114] The multiple pairs of denoised rock-growing red bean leaf images are subjected to double-channel fusion segmentation, specifically including the following steps:
[0115] Convert the RGB image to the Lab color space, extract the luminance channel L and the chroma channel A, and the calculation formula is:
[0116]
[0117] wherein R, G and B represent the red, green and blue color channels, respectively;
[0118] The optimal threshold t A and t L are calculated for the A channel and the L channel based on the OTSU algorithm, respectively.
[0119] The luminance channel L and the chroma channel A are fused to generate a rock-growing red bean pest and disease area image, and the calculation formula is:
[0120]
[0121] wherein M(x, y) represents the retained pixel point, A(x, y) represents the chroma of the pixel point, and L(x, y) represents the luminance of the pixel point.
[0122] L channel: reflects the brightness information and distinguishes the light and dark differences between the diseased spot and healthy tissue (such as the low brightness of the root rot area).
[0123] A channel: captures the red-green chroma difference (such as the brown diseased spot with a high A value).
[0124] The goal of Otsu is to find a threshold t that maximizes the inter-class variance of the two classes after segmentation, and the specific formula is:
[0125] η(t) = ω0(t)·ω1(t)·[μ0(t)-μ1(t)] 2
[0126] wherein ω0(t) and ω1(t) represent the pixel ratio of the pixel value less than or equal to t (background class) and the pixel ratio of the pixel value greater than t (foreground class), respectively, and μ0(t) and μ1(t) represent the average gray value of the background class and the average gray value of the foreground class, respectively.
[0127] Iterate through all possible thresholds t to find the t that maximizes η(t) as the optimal threshold.
[0128] As shown in Figure 4 , the pest and disease diagnosis model specifically includes:
[0129] an input layer, three convolutional layers, three pooling layers, a fully connected layer, and an output layer, wherein the input layer includes 5 neurons, the activation function of the neuron is Sigmoid, 1 convolutional layer and 1 pooling layer constitute a group, the output layer uses a Softmax classifier, and the output structure is a one-dimensional array with a length of 5;
[0130] The loss function calculation formula of the disease and pest diagnosis model is:
[0131]
[0132] Wherein, x represents the number of training samples, K represents the number of disease and pest categories, p j,k represents the probability of sample j belonging to the kth disease and pest label, y j,k represents the disease and pest label of sample j, and λ represents the focusing factor.
[0133] The basic structure of CNN is composed of an input layer, a convolutional layer, a pooling layer, a fully connected layer, and an output layer. The convolutional layer extracts image features, the pooling layer samples the features, the fully connected layer connects the extracted features, and the classifier outputs the results.
[0134] The image data is divided into a training set, a validation set, and a test set. The training set is a collection of data samples used for deep learning and training using the specified network, and directly participates in model parameter adjustment. The network learns the data features through the training set, and fits the generated model for prediction. The validation set is a data set used to evaluate the performance of the model, and helps to adjust the parameters in the training process to avoid overfitting or underfitting. The test set is used to judge the accuracy and robustness of the model, and is used after the model is generated. The data that the model has not encountered is used to test the performance of the model. In the training process, the training set, the validation set and the test set are divided according to the ratio of 6:2:2.
[0135] The disease and pest of rock red bean mainly includes the following types:
[0136] 1. Standing tree decay. The main ones are Ganoderma sp. and Schizophyllum commune Fr. The former has strong invasiveness and mainly infects the base of the trunk, causing trunk base decay and great potential harm. The latter has relatively weak pathogenicity and mainly infects wounds caused by mechanical damage, sunburn, frostbite or pathogenic infection. Once infected, it will gradually spread, leading to chronic wounds and even gradual expansion.
[0137] 2. Branch and trunk canker. The pathogen infects the branches and trunks, and the diseased tissues turn brown and necrotic, showing longitudinal expansion of long brown lesions, which can cause branch and trunk decay and induce secondary pests such as bark beetles, accelerating tree weakening.
[0138] 3. Wood borer. The larvae initially cluster and feed on subcutaneous tissues (often hollowing out subcutaneous tissues), and then disperse and bore into heartwood. The interior of the trunk is often bored into many channels, leading to the weakening and even death of the whole plant.
[0139] 4. Bark beetle. Adult beetles feed on branches and trunks, and their symbiotic fungi are often highly invasive plant pathogens. The combined damage of insects and fungi can easily lead to the weakening and even death of branches and trunks.
[0140] 5. Flower beetle. Many flower beetle adults were found on the tree trunk, but they mainly licked the juice flowing from the damaged part of the stem, and had no substantial harm to the tree itself.
[0141] The control scheme is associated with a database of pest type, control opportunity and pesticide dosage, and dynamically generates the control scheme according to the probability classification of the pests.
[0142] The diagnosis result is a set of numbers, including the category code and the possibility of the pests, if the possibility is greater than 80%, the control suggestion corresponding to the code is read from the database according to the code, and finally displayed to the user.
[0143] The computer readable storage medium of the embodiment can be an internal storage unit of the terminal, such as a hard disk or a memory of the terminal; the computer readable storage medium of the embodiment can also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card and the like equipped on the terminal; further, the computer readable storage medium can include both the internal storage unit and the external storage device of the terminal.
[0144] The computer readable storage medium of the embodiment is used to store the computer program and other programs and data required by the terminal, and can also be used to temporarily store the data that has been output or will be output.
[0145] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware, and the program can be stored in a computer readable storage medium, and when the program is executed, the processes of the above-mentioned embodiments can be included. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM) and the like.
[0146] The examples of the present application only describe the preferred embodiments of the present application, and do not limit the concept and scope of the present application, and various modifications and improvements of the technical solutions of the present application made by the engineers and technicians in the art shall fall within the protection scope of the present application without departing from the design idea of the present application.
Claims
1. A method for diagnosing and controlling pests of rock lily (Lycoris radiata), characterized in that, It comprises the following steps: Deploying video monitoring to collect images of leaves of rock-soil red bean; Adaptive wavelet threshold denoising is performed on the collected images of leaves of rock-soil red bean; A double-channel fusion segmentation is performed on the denoised images of leaves of rock-soil red bean to obtain images of pest and disease regions of rock-soil red bean; A pest and disease diagnosis model based on CNN neural network is constructed; The images of pest and disease regions of rock-soil red bean are input into the pest and disease diagnosis model and the pest and disease probability is output; When the pest and disease probability exceeds a threshold value, a control scheme is generated; The adaptive wavelet threshold denoising of the collected images of leaves of rock-soil red bean comprises the following steps: The collected images of leaves of rock-soil red bean are subjected to three-layer wavelet decomposition; The subbands of the three-layer wavelet decomposition are divided and adaptive thresholds are calculated according to the subband categories, wherein the subband categories include high-frequency noise dominant category, horizontal disease spot edge category, vertical disease spot edge category and low-frequency signal retention category; The soft threshold function is improved to selectively suppress the high-frequency coefficients after wavelet decomposition; The wavelet is reconstructed to generate the denoised images of leaves of rock-soil red bean; The three-layer wavelet decomposition of the collected images of leaves of rock-soil red bean comprises: The first layer decomposition is LL1, HL1, LH1 and HH1, wherein LL1 represents a low-frequency approximation subband; HL1, LH1 and HH1 represent horizontal, vertical and diagonal high-frequency detail subbands, respectively; The second layer decomposition of the LL1 subband is LL2, HL2, LH2 and HH2, wherein LL2 represents a second layer low-frequency approximation subband; HL2, LH2 and HH2 represent second layer horizontal, vertical and diagonal detail subbands, respectively; The third layer decomposition of the LL2 subband is LL3, HL3, LH3 and HH3, wherein LL3 represents a third layer low-frequency approximation subband; HL3, LH3 and HH3 represent third layer horizontal, vertical and diagonal detail subbands, respectively; The adaptive threshold calculation according to the subband categories comprises: The high-frequency noise dominant subband includes HH1 and HH2, and the high-frequency noise dominant threshold is set as , and the calculation formula is: ; wherein, denotes the standard deviation of the noise, denotes the total number of pixels of the high-frequency noise dominant subband, denotes the median item coefficient of the high-frequency noise, denotes the median function, denotes the absolute value of the coefficient of the high-frequency noise dominant subband after wavelet transform; The horizontal lesion edge class sub-band includes: HL1 and HL2, and the horizontal lesion edge class threshold is set as , and the calculation formula is: ; wherein, represents a horizontal noise weight, represents a horizontal lesion mean term coefficient, represents the absolute value of the coefficient of the horizontal lesion edge-like subband after wavelet transform; The vertical lesion edge class sub-band includes: LH1 and LH2, and the vertical lesion edge class threshold is set as The calculation formula is: ; wherein, represents a vertical noise weight, represents a vertical spot median term coefficient, represents the absolute value of the coefficient of the vertical spot edge-like subband after wavelet transform; The low-frequency signal reservation class subbands include LL3, HL3, LH3, and HH3, and the low-frequency signal reservation class threshold is set as , and the calculation formula is: ; wherein, represents a low-frequency noise weight, represents a low-frequency noise coefficient, represents the absolute value of the coefficient of the low-frequency signal preservation class subband after wavelet transform.
2. The method of claim 1, wherein, The soft threshold function has the following formula: ; wherein, denotes different subband classes, , denotes threshold values for different subband classes, denotes an improved soft threshold function, denotes high frequency detail coefficients for different subband classes, denotes a positive-negative real number decision function, denotes an attenuation factor.
3. The method of claim 2, wherein, The double-channel fusion segmentation of the denoised images of leaves of rock-soil red bean comprises the following steps: The RGB image is converted to Lab color space, the luminance channel L and the chrominance channel A are extracted, and the calculation formula is as follows: ; Wherein R, G and B represent red, green and blue color channels, respectively; The optimal threshold value is calculated based on OTSU algorithm for A channel and L channel respectively and ; The luminance channel L and the chrominance channel A are fused to generate the pest and disease region image of rock-soil red bean, and the calculation formula is as follows: ; wherein, represents a reserved pixel point, represents a chroma of a pixel point, represents a luminance of a pixel point.
4. The method of claim 3, wherein, The pest and disease diagnosis model comprises: An input layer, three convolution layers, three pooling layers, a full connection layer and an output layer, wherein the input layer comprises 5 neurons, the activation function of the neuron uses Sigmoid, 1 convolution layer and 1 pooling layer constitute a group, the output layer uses Softmax classifier, and the output structure is a one-dimensional array with a length of 5; The loss function calculation formula of the pest and disease diagnosis model is as follows: ; wherein, denotes the number of training samples, denotes the number of pest categories, denotes the probability of sample j belonging to the kth pest label, denotes the pest label of sample j, denotes the focusing factor.
5. The method of claim 4, wherein, The control scheme is associated with a pest and disease type, control opportunity and pesticide dosage database, and the control scheme is dynamically generated according to the pest and disease probability classification.
6. A storage medium, characterized by The storage medium stores instructions, and when a computer reads the instructions, the computer executes the transplanting rock plant red bean pest diagnosis and prevention method in any one of claims 1-5.
7. An electronic device, comprising: The storage medium stores instructions, and when a computer reads the instructions, the computer executes the transplanting rock plant red bean pest diagnosis and prevention method in any one of claims 1-5.
Citation Information
Patent Citations
A Regional Pest and Disease Detection and Diagnosis Method Based on Wavelet Analysis
CN106708782B
A Plant Disease and Pest Diagnosis Method and System Based on Artificial Intelligence
CN113688959B
Crop disease identification method, device and equipment and storage medium
CN119091189A
Disease and pest monitoring and diagnosis method based on lightweight deep separation convolution model
CN119851143A