Image processing-based leaf disease and pest identification method and system
By applying image processing-based methods in agricultural technology, using multi-spectral and thermal imaging equipment to collect data, dynamically adjust Bayesian networks, and perform state transfer learning, the shortcomings in leaf pest identification and prediction in the prior art are solved, higher identification accuracy and prediction reliability are achieved, and crop losses and the use of chemical pesticides are reduced.
Patent Information
- Application Number
- CN202510468123.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-04-15
AI Technical Summary
The prior art has shortcomings in leaf pest identification and prediction, especially in early pest identification and real-time monitoring, which makes it difficult to accurately capture subtle changes, resulting in limited timeliness and effectiveness of decisions.
Using an image processing-based method, data is collected by setting up multi-spectral and thermal imaging equipment, time series image data sets are constructed, Bayesian networks are dynamically adjusted, state transfer learning is performed, pest and disease areas are extracted, development trends are identified, and pest and disease locations are identified and located in the conditional random field model.
It improves the accuracy of pest identification and the reliability of prediction, and can identify pests and diseases earlier and more accurately, reduce crop losses, reduce dependence on chemical pesticides, and improve the health level and yield of crops.
Smart Images

Figure CN119992233A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of agricultural science and technology, and in particular to a leaf pest identification method and system based on image processing. Background Art
[0002] The field of agritech focuses on using modern scientific and technological means to improve and enhance agricultural production processes. It covers a wide range of fields, from precision agriculture and remote sensing monitoring to genetic engineering and plant pathology. In agritech, special attention is paid to developing technologies that can improve crop yield, quality and stress resistance while reducing environmental impact and costs. Technological advances in this field include the application of robotics in agriculture, the development of smart agricultural systems, and the optimization and protection of crops through information technology and biotechnology.
[0003] Among them, the leaf pest and disease recognition method refers to the use of image processing technology to automatically detect and identify pests and diseases on crop leaves. The main purpose is to enable farmers to take timely measures to prevent and control pests and diseases through early identification of pests and diseases, protecting crops from major losses. Through this technology, the use of chemical pesticides can be reduced, the health level and overall yield of crops can be improved, and it also helps protect the environment.
[0004] In practical applications, existing technologies rely on traditional image processing technology and primary data analysis, and fail to fully utilize time series data and advanced model algorithms. This leads to deficiencies in real-time monitoring and accurate prediction of pest and disease development, especially in the identification and prediction of early pest and disease stages. Due to the lack of high-contrast and dynamically adjusted data processing mechanisms, existing technologies cannot accurately capture subtle changes, which is crucial in plant pathology because early intervention is the key to preventing the spread of pests and diseases. The analysis of state transitions in existing technologies is not sophisticated enough to provide an accurate path for pest and disease progression, limiting the timeliness and effectiveness of decision-making. Technical limitations not only increase crop losses, but also lead to over-reliance on chemical pesticides, increasing the burden on the environment. Summary of the invention
[0005] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a leaf disease and insect pest identification method based on image processing.
[0006] In order to achieve the above object, the present invention adopts the following technical solution: a leaf pest identification method based on image processing, comprising the following steps:
[0007] S1: Set up multispectral and thermal imaging equipment, collect multispectral images and thermal imaging data of the target frequency band, delete images with insufficient clarity and data with too much noise, obtain optimized multispectral images, and mark and classify the data according to the collection date to form a time series image dataset;
[0008] S2: using the time series image data set, recording the feature changes at the target moment, dynamically adjusting the Bayesian network according to the feature changes, recording the adjusted weight and bias parameters, matching the growth conditions of the leaves in the differentiation stage, and constructing the adjusted dynamic model;
[0009] S3: performing state transfer learning on the adjusted dynamic model, calculating the transition probability between stages through the transition probability between states, and obtaining a state transfer probability matrix;
[0010] S4: using the state transition probability matrix, extracting the pest and disease area on the leaf in the image, identifying the pest and disease development trend, predicting the pest and disease development trend in the future time period, obtaining the probability value of the differentiated prediction path, evaluating the impact range of the pest and disease development through probability distribution, and outputting the pest and disease development prediction result;
[0011] S5: Based on the pest development prediction results, the affected area features are input into the conditional random field model, the pest locations on the leaves are identified and marked, the spatial dependency of the image pixels is analyzed, and the pest identification and location are output.
[0012] As a further solution of the present invention, the step of obtaining the optimized multispectral image is specifically as follows:
[0013] S111: Setting up multispectral and thermal imaging equipment, adjusting the sensing range to the preset target frequency band, performing equipment performance testing, and analyzing the stability of signal transmission to obtain initialized multispectral images and thermal imaging data;
[0014] S112: using image denoising technology to process the initialized multispectral image and thermal imaging data, and using image enhancement technology to optimize image edges to obtain processed multispectral image and thermal imaging data;
[0015] S113: According to the processed multispectral image and thermal imaging data, the formula is used:
[0016] ;
[0017] Calculate weighted and corrected quality metrics for each data point , get the optimized multispectral image;
[0018] in, Representative The strength of the data points, represents the weight of the data point, Represents the distance from the data point to the target center, represents the decay constant, represents the correction factor, and e is a natural constant.
[0019] As a further solution of the present invention, the step of acquiring the time series image data set is specifically:
[0020] S121: recording a timestamp for each image of the optimized multispectral image, associating the time information with the image data, and sorting the multispectral image data with the timestamp in chronological order to obtain a multi-band image data set;
[0021] S122: Based on the multi-band image data set, the formula is used:
[0022] ;
[0023] Calculate the weighted time series value to obtain the time series image data set;
[0024] in, represents the weighted time series value, Representative The timestamp of the image, is the weight assigned according to the image quality score, Represents the minimum timestamp of the image. Represents the maximum timestamp of the image, is the number of images.
[0025] As a further solution of the present invention, the step of obtaining the adjusted weight and bias parameters is specifically as follows:
[0026] S211: Based on the time series image data set, record the feature changes at the target time, evaluate the probability distribution of the impact on plant growth, and generate an initialized probability evaluation result;
[0027] S212: Using the initialized probability evaluation result, updating weight and bias parameters through Bayesian decision theory to obtain updated Bayesian network parameters;
[0028] S213: Using the updated Bayesian network parameters, the formula is:
[0029] ;
[0030] Calculate the current weight parameter , get the adjusted weight and bias parameters;
[0031] in, represents the old weight parameter, is the learning rate, is the error between the target and the prediction, is the current feature change indicator, is the regularization coefficient, is the attenuation factor.
[0032] As a further solution of the present invention, the step of obtaining the state transition probability matrix is specifically as follows:
[0033] S311: performing state transfer learning on the adjusted dynamic model, analyzing the state set of the adjusted dynamic model, including health, initial infection, and severe infection, identifying the basic structure of the model, and generating a state definition set;
[0034] S312: based on the differentiated states in the state definition set, dividing the time period in which the differentiated states appear, integrating the occurrence frequency of each differentiated state, identifying the transition probability between the differentiated states through a Markov chain algorithm, and obtaining initialization transition probability data;
[0035] S313: According to the initialized transition probability data, data is sorted and the transition frequency of the differentiated state is counted using the formula:
[0036] ;
[0037] Get the transition probability matrix;
[0038] in, Represents the state Transfer to state The probability of Represents the state Transfer to state The number of observations, From the state The total number of observations transferred to the remaining states, is the correction factor, For environmental factors, Status The stability coefficient, is the observation window size.
[0039] As a further solution of the present invention, the step of obtaining the probability value of the differentiated prediction path is specifically as follows:
[0040] S411: extracting the pest area on the leaf in the image and graying it according to the adjusted state transition probability matrix, identifying the pest diffusion process of the leaf, and obtaining the pest development sequence;
[0041] S412: using the pest development sequence, applying Markov chain theory to each pest diffusion process, calculating the path probability of reaching multiple terminal states from the current state, and generating a probability distribution graph;
[0042] S413: Based on the probability distribution graph, the probability distribution of each path is analyzed, and the associated path of the deviation is selected, using the formula:
[0043] ;
[0044] Get the probability value of the differentiated prediction path ;
[0045] in, is the improved pest and disease state transition probability, is the weight coefficient, is the variability factor of state transfer in the target environment, is the time since the last pest and disease event, is the attenuation constant, is the number of states, is a natural constant.
[0046] As a further solution of the present invention, the steps for obtaining the prediction results of the development of pests and diseases are specifically as follows:
[0047] S421: using the probability value of the differentiated prediction path, identifying the pest area through edge detection and region segmentation, identifying the pest development trend, identifying the pest path with serious development trend, and obtaining a key pest path set;
[0048] S422: Applying a deep learning model to perform time series analysis on the key pest and disease path set, combining environmental factors and real-time pest and disease development data, predicting the pest and disease development trend of each path, and obtaining pest and disease evolution trend data;
[0049] S423: Verify the pest evolution trend data, adjust the parameters of the prediction model by comparing with the pest development data at the fitting time point, and optimize the consistency of the prediction, using the formula:
[0050] ;
[0051] Obtain prediction results of pest and disease development;
[0052] in, Forecast results for pest and disease development, is the weight coefficient, and Represents forecast and real-time data, and is the nonlinear adjustment coefficient, is the weight of the impact of current environmental factors on the prediction, An indicator of the current environmental status.
[0053] As a further solution of the present invention, the steps of obtaining the identification and location of pests and diseases are specifically as follows:
[0054] S511: Based on the pest development prediction result, input the characteristics of the affected area into the conditional random field model, including vegetation index and spectral data, to generate a regional characteristic model;
[0055] S512: Scanning using the regional feature model to identify and mark the locations of pests and diseases on the leaves, and generating a leaf image with the pests and diseases marked;
[0056] S513: Using the leaf image with the pests and diseases marked, The dependence between each pixel and its neighboring pixels is calculated, and the weighted dependence impact evaluation value is calculated. The evaluation value is used to sort and classify the pixels in the leaf pest image, identify the spatial location of the pest area, and record the pest distribution area. The formula is used:
[0057] ;
[0058] Output pest and disease identification and location;
[0059] in, represents the weighted dependency impact assessment value, represents the total number of pixels in the image, Indicates The weight of the pixels, Representative The dependence of a pixel on the surrounding pixels, is the adjustment factor of the pixel neighborhood.
[0060] A leaf pest and disease identification system based on image processing, the leaf pest and disease identification system based on image processing is used to execute the leaf pest and disease identification method based on image processing, the system comprises:
[0061] The image acquisition module acquires multispectral images and thermal imaging data based on multispectral devices and thermal imaging devices, deletes invalid data with insufficient image clarity and excessive noise, obtains optimized multispectral images, and classifies and labels the data to construct a time series image dataset;
[0062] The feature change dynamic modeling module extracts the feature change information at the target moment based on the time series image data set, dynamically adjusts the Bayesian network, updates the weight and bias parameters according to the feature changes, generates an adjusted dynamic model, and records the weights, biases and associated parameters in the state transfer process through the model to obtain the state transfer learning result;
[0063] The state transfer module uses the state transfer learning results to calculate the state transfer probability of the differentiated growth stages of the leaves, obtains the state transfer probability matrix, extracts the leaf pest area, identifies the pest development trend, and outputs the pest development prediction result;
[0064] The pest location tracking module inputs the affected area characteristics into the conditional random field model based on the pest development prediction results, identifies and calibrates the pest location, and outputs pest identification and positioning.
[0065] Compared with the prior art, the advantages and positive effects of the present invention are:
[0066] In the present invention, the accuracy of pest and disease identification and the reliability of prediction are optimized through time series image data and feature change records. After collecting multispectral images and thermal imaging data, high-contrast images are screened and marked for classification, the quality of the data and the effectiveness of subsequent processing are enhanced, and a solid foundation is provided for establishing an accurate model. By dynamically adjusting the network parameters to reflect the state of each stage of leaf growth, pest and disease prediction is not only based on static data, but reflects the actual changes in plant growth, thereby improving the real-time application value and accuracy of the prediction model. The introduction of state transfer learning enables the transition from health to pest and disease stages to be more accurately predicted, which is crucial for early diagnosis and timely intervention, reducing crop losses and reducing dependence on chemical pesticides. The application of the conditional random field model based on the prediction results further improves the recognition accuracy of the specific location of pests and diseases, enables local treatment, and effectively improves the pertinence and economic efficiency of the treatment. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 It is a schematic diagram of the main steps of the present invention;
[0068] Figure 2 A flow chart of the acquisition steps for optimizing multispectral images of the present invention;
[0069] Figure 3 A flowchart of the steps for obtaining a time series image data set of the present invention;
[0070] Figure 4 A flow chart of the steps for obtaining the adjusted weight and bias parameters of the present invention;
[0071] Figure 5 A flow chart of the steps for obtaining the state transition probability matrix of the present invention;
[0072] Figure 6 A flow chart of the steps for obtaining the probability value of the differentiated prediction path of the present invention;
[0073] Figure 7 A flowchart of the steps for obtaining the prediction results of the development of pests and diseases of the present invention;
[0074] Figure 8 The present invention is a flowchart of the steps for obtaining pest identification and location. DETAILED DESCRIPTION
[0075] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0076] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, in the description of the present invention, "multiple" means two or more, unless otherwise clearly and specifically defined.
[0077] See also Figure 1 The present invention provides a technical solution: a leaf pest identification method based on image processing, comprising the following steps:
[0078] S1: Set up multispectral and thermal imaging equipment, collect multispectral images and thermal imaging data of the target frequency band, delete images with insufficient clarity and data with too much noise, obtain optimized multispectral images, and mark and classify the data according to the collection date to form a time series image dataset;
[0079] S2: Use a time series image dataset to record the feature changes at the target moment, dynamically adjust the Bayesian network according to the feature changes, record the adjusted weight and bias parameters, match the growth status of the leaves in the differentiation stage, and construct the adjusted dynamic model;
[0080] S3: Perform state transfer learning on the adjusted dynamic model, calculate the transition probability between stages through the transition probability between states, and obtain the state transfer probability matrix;
[0081] S4: Use the state transition probability matrix to extract the pest and disease area on the leaf in the image, identify the development trend of pests and diseases, predict the development trend of pests and diseases in the future time period, obtain the probability value of the differentiated prediction path, evaluate the impact range of pest and disease development through probability distribution, and output the prediction result of pest and disease development;
[0082] S5: Based on the prediction results of pest development, the affected area features are input into the conditional random field model, the pest locations on the leaves are identified and marked, the spatial dependence of the image pixels is analyzed, the consistency of positioning is checked, and the pest identification and positioning are output;
[0083] Optimization of multispectral images includes enhanced color discrimination, texture resolution, and target feature recognition; time series image data sets include multispectral images, thermal imaging data, and high-contrast images; adjusted weight and bias parameters include weight adjustment values, bias adjustment values, and the influence of target output features on the output; the adjusted dynamic model includes updated Bayesian network weights, updated Bayesian network bias parameters, and leaf growth condition simulation; the state transition probability matrix includes the transition probability from healthy to early infection, the transition probability from early infection to severe infection, and the transition probability of maintaining the current state; the probability values of differentiated prediction paths include the probability of the development stage of pests and diseases, the probability distribution map, and the spatial range of the expansion of pests and diseases; the prediction results of pest and disease development include the characteristics of the affected area, the location mark of pests and diseases, and the results of pixel-level spatial dependency analysis; pest and disease identification and positioning include the identified types of leaf pests and diseases, the leaf area affected by pests and diseases, and the position coordinates of the marked pests and diseases on the leaves.
[0084] See also Figure 2 , the steps to optimize the acquisition of multispectral images are as follows:
[0085] S111: Setting up multispectral and thermal imaging equipment, adjusting the sensing range to the preset target frequency band, performing equipment performance testing, and analyzing the stability of signal transmission to obtain initialized multispectral images and thermal imaging data;
[0086] The process of setting up multispectral and thermal imaging equipment involves adjusting the equipment to meet the preset target frequency band and performing basic equipment settings, including selecting the appropriate spectral band range and temperature range. According to the equipment manual or actual needs, set the appropriate band and temperature parameters of the multispectral and thermal imaging instruments, and adjust them through the equipment's debugging interface to ensure that the sensor response meets expectations. It is necessary to verify the working status by testing the performance of the sensor. Comparison experiments can be used, such as comparison with known standard sources or calibration with target objects, to ensure that the image quality and thermal imaging data captured by the equipment meet the requirements. When performing performance testing, focus on the sensitivity of the sensor, image clarity, and accuracy of the thermal image, collect signals and analyze the stability of signal transmission in real time, and check whether the signal has large fluctuations or interference. Through multiple tests, ensure that the signal transmission is stable and obtain initialized multispectral images and thermal imaging data.
[0087] S112: using image denoising technology to process the initialized multispectral image and thermal imaging data, and using image enhancement technology to optimize the image edge, to obtain processed multispectral image and thermal imaging data;
[0088] After obtaining the initialized multispectral image and thermal imaging data, data processing is performed to improve image quality. Removing noise from the data is a necessary step. Random noise in the data is screened out using digital filtering technology, which involves spectral analysis of the data, identifying and suppressing the frequency components unique to the noise, and applying image enhancement technology to optimize image edges, including sharpening and contrast enhancement. Sharpening increases the contrast of areas in the image where color changes quickly, making the image look clearer. Contrast enhancement optimizes the dynamic range of the entire image by adjusting the dark and bright parts of the image, thus obtaining the processed multispectral image and thermal imaging data.
[0089] S113: Based on the processed multispectral image and thermal imaging data, the formula is used:
[0090]
[0091] Calculate weighted and corrected quality metrics for each data point , get the optimized multispectral image;
[0092] in, Representative The strength of the data points, represents the weight of the data point, Represents the distance from the data point to the target center, represents the decay constant, represents the correction coefficient, e is a natural constant,
[0093] The specific meanings of the parameters in the formula are as follows: For the The intensity of a data point, expressed as the amplitude of the data point signal;
[0094] is the weight of the data point, taking into account the signal-to-noise ratio and importance of the data;
[0095] It is the actual distance between the data point and the target center, which is used to measure the spatial contribution of the data point;
[0096] is a decay constant, which indicates the rate at which data decreases with increasing distance;
[0097] To correct the coefficient, adjust the influence of each data point according to environmental factors. In order to calculate the specific value of the parameter, it is necessary to set it based on field measurements and equipment calibration data;
[0098] For example, This can be set by measuring the response curve and noise level of the device. It can be calculated based on the average viewing distance and light attenuation properties of the site. It needs to be adjusted according to the actual environmental conditions such as temperature, humidity, and air pressure. The specific value is set as unit, , rice, rice, , substitute into the formula and calculate:
[0099] ;
[0100] This result indicates that the weighted and corrected quality indicators are above the preset threshold, confirming the high quality of the data.
[0101] See also Figure 3 , the specific steps for obtaining the time series image dataset are:
[0102] S121: recording a timestamp for each image of the optimized multispectral image, associating the time information with the image data, and sorting the multispectral image data with the timestamp in chronological order to obtain a multi-band image data set;
[0103] The purpose of timestamping optimized multispectral images is to ensure that the collection time of each image is accurately marked. The key to this process lies in the setting of the image data management system. It is necessary to confirm whether the time synchronization function of the system is enabled to ensure that the system time is synchronized with the world standard time. During the image collection process, the system will automatically attach the current time as a timestamp to the metadata of each image file. This step is automatically completed through programming and helps to track and monitor any abnormalities that occur during the data collection process.
[0104] Data sorting and verification using multispectral image data with timestamps is a systematic data management activity. Images are sorted in chronological order by reading the timestamp information in the metadata of each image. This automated process ensures that all images can be arranged according to the actual collection timeline. The arranged data is checked for continuity and temporal consistency, which includes comparing whether the intervals between image timestamps conform to the predetermined collection frequency and whether there are any abnormalities such as time jumps or overlaps. This verification process is a key step in ensuring data integrity and availability, and a multi-band image dataset is obtained.
[0105] S122: Based on a multi-band image dataset, the formula is:
[0106] ;
[0107] Calculate the weighted time series value to obtain the time series image data set;
[0108] in, represents the weighted time series value, Representative The timestamp of the image, is the weight assigned according to the image quality score, Represents the minimum timestamp of the image. Represents the maximum timestamp of the image, is the number of images.
[0109] An improved temporal weight distribution formula is used, which combines the timestamp and image quality score to calculate the weighted time value of each image, so as to better reflect the importance of each image in the time series dataset. represents the weighted time series value, is a weight assigned based on the image quality score, providing the relative importance of the image in the dataset, , and They are the minimum and maximum timestamps in the dataset, which are used to normalize the timestamps so that the calculated weights are distributed between 0 and 1. The timestamps of three images are set. minutes, the corresponding image quality scores lead to a weight distribution of , and the minimum timestamp Minutes, maximum timestamp Minutes, the normalized timestamp is calculated as:
[0110] for : ;
[0111] for : ;
[0112] for : ;
[0113] The weighted time value is calculated as:
[0114] ;
[0115] This result shows that after weighted and normalized processing, a weighted time series value that comprehensively considers time and image quality is obtained, which provides a basis for subsequent time series analysis.
[0116] See also Figure 4 , the steps to obtain the adjusted weight and bias parameters are as follows:
[0117] S211: Based on the time series image data set, record the feature changes at the target time, evaluate the probability distribution of the impact on plant growth, and generate an initialized probability evaluation result;
[0118] The selection of target moments is based on predetermined growth cycles or significant environmental changes. The process involves complex data screening and feature recognition techniques, using computer vision and machine learning algorithms to automatically identify key changes in images. For example, edge detection technology is used to identify the appearance of new leaves or flowers in the growth state of plants. By setting thresholds, key stages of plant growth, such as flowering or fruit ripening, can be identified. Each marked image will be further analyzed to evaluate the impact of changes on plant growth, estimate the probability of occurrence of different growth stages, and generate initialized probability assessment results.
[0119] S212: using the initialized probability evaluation result, updating the weight and bias parameters through Bayesian decision theory to obtain updated Bayesian network parameters;
[0120] Using Bayesian decision theory, weights and bias parameters are updated. The process involves taking the initial probability assessment results and using Bayesian theorem to calculate the posterior probability. On this basis, the weights and bias parameters in the network are adjusted to better reflect the new data evidence. The process includes the calculation of prior probability and likelihood probability, as well as how to update network parameters through probability. Through an iterative process, the prediction accuracy of the entire network is optimized to obtain updated Bayesian network parameters.
[0121] S213: Using the updated Bayesian network parameters, the formula is:
[0122] ;
[0123] Calculate the current weight parameter , get the adjusted weight and bias parameters;
[0124] in, represents the old weight parameter, is the learning rate, is the error between the target and the prediction, is the current feature change indicator, is the regularization coefficient, is the attenuation factor;
[0125] Adjust the weight parameters of the Bayesian network, the formula represents the new weight parameter, is the previous weight parameter, represents the learning rate, represents the error between the target and the prediction, Indicates the current feature change index, is the regularization coefficient, is the weight decay factor;
[0126] Set the current feature change indicator obtained from the dataset , the error between the target and the prediction , learning rate , regularization coefficient , weight decay factor , and the initial weight , then the process of calculating the new weight is as follows:
[0127] ;
[0128] This result shows that by responding to the current feature changes and considering weight decay, the new weight parameters It has increased slightly, which indicates that the model gradually adapts to the feature changes and helps to predict future change trends more accurately.
[0129] See also Figure 5 , the specific steps for obtaining the state transition probability matrix are:
[0130] S311: Perform state transfer learning on the adjusted dynamic model, analyze the state set of the adjusted dynamic model, including health, initial infection and severe infection, identify the basic structure of the model, and generate a state definition set;
[0131] State transfer learning involves analyzing the state set of the adjusted model. In the process, various health states need to be identified and defined, such as health, early infection, and severe infection. The states are accurately identified by using state monitoring and diagnostic technologies, such as physiological signal monitoring and biomarker detection. The characteristic data of the states are analyzed to establish a clear state definition. This involves the use of machine learning methods, such as cluster analysis or decision trees, to distinguish the key features of different states to support dynamic tracking and updating of states, including the management of data flows and the generation of state definition sets.
[0132] S312: based on the differentiated states in the state definition set, dividing the time period in which the differentiated states appear, integrating the occurrence frequency of each differentiated state, identifying the transition probability between the differentiated states through the Markov chain algorithm, and obtaining the initialization transition probability data;
[0133] To understand the transition rules between states, it is necessary to collect enough real-time data. The data reflects the transition between different states. Statistical methods or machine learning algorithms, such as the Markov model, are used to analyze the data and identify the probability of transitioning from one state to another. The process involves the estimation of probability distribution and parameter optimization to ensure the accuracy and reliability of the model. It provides quantifiable dynamic conversion logic, which is the key to the model's ability to predict future state changes and obtain initial transition probability data.
[0134] S313: According to the initialized transition probability data, data is sorted and the transition frequency of the differentiated state is counted using the formula:
[0135] ;
[0136] Get the transition probability matrix;
[0137] in, Represents the state Transfer to state The probability of Represents the state Transfer to state The number of observations, From the state The total number of observations transferred to the remaining states, is the correction factor, is the environmental factor, reflecting the target state external influences, Status The stability coefficient, is the observation window size;
[0138] Set to within a specific observation period, from the state (Health) to status Number of observations (of initial infection) =100, the total number of transitions from a healthy state to any state is 300 times, correction factor Set to 1.2, environmental factor is 10, status The stability factor is 0.9, the observation window size is 20. Then the formula is as follows:
[0139] ;
[0140] This result shows that under given parameters and conditions, the probability of transitioning from a healthy state to an early infection state is about 44.83%. This result shows that after adjusting for the influence of observed data, the probability of transitioning from a healthy state to an early infection state is significant, which helps to make more accurate risk assessments and formulate preventive measures in practical applications.
[0141] See also Figure 6 , the specific steps for obtaining the probability value of the differentiated prediction path are:
[0142] S411: extracting the pest area on the leaf in the image and graying it according to the adjusted state transition probability matrix, identifying the pest diffusion process of the leaf, and obtaining the pest development sequence;
[0143] Extracting the pest and disease area on the leaf in the image requires the application of image segmentation technology to separate the leaf area in the input multispectral image from the background. This process uses threshold-based methods, color space segmentation (such as HSV, LAB), or deep learning models (such as convolutional neural networks) to identify and extract the leaf area. The extracted leaf area contains different color information and needs to be grayed. The RGB image is converted into a grayscale image using the weighted average method to ensure that the contribution of different colors to the grayscale is adjusted according to human eye perception. After graying, the pest and disease information in the image is expressed as different grayscale values or texture changes. Edge detection, morphological processing, region growing and other methods are used to detect the diseased area with obvious changes in the image. The pest and disease spread process describes the specific spread process and pattern of pests and diseases on leaves, which involves image processing and analysis of affected leaves. For example, image grayscale processing is used to identify and track the specific route of pests and diseases spreading from one area to another. By analyzing the characteristics of the diseased area (such as size, shape, and position), the development process of pests and diseases on leaves can be tracked. Combined with the state transition probability matrix, the transition of pests and diseases from one stage to another can be automatically tracked, which includes identifying the initial manifestations, progression speed, and diffusion path of pests and diseases, and obtaining the pest and disease development sequence.
[0144] S412: Using the pest development sequence, apply the Markov chain theory to each pest diffusion process, calculate the path probability from the current state to multiple end states, and generate a probability distribution map;
[0145] Statistical software is needed to process and analyze the sequence data of the development of pests and diseases. By establishing a Markov model, the transition probability of each state is used to predict the development trend of pests and diseases, which refers to the changes and development patterns of pests and diseases in the future, including the growth rate of pests and diseases, the expansion of the scope of influence, and the changes in severity. After processing the input data of the model, the calculation process involves setting different terminal states, such as the alleviation or aggravation of pests and diseases, and estimating the probability of reaching the state, showing the diffusion process and probability of various pests and diseases, providing a scientific basis for formulating prevention and control measures, and generating probability distribution maps.
[0146] S413: Based on the probability distribution graph, the probability distribution of each path is analyzed, and the associated path of the deviation is selected, using the formula:
[0147] ;
[0148] Get the probability value of the differentiated prediction path ;
[0149] in, is the improved pest and disease state transition probability, is the weight coefficient, is the variability factor of state transfer in the target environment, is the time since the last pest and disease event, is the attenuation constant, is the number of states, is a natural constant;
[0150] : The probability of transition from one state to another;
[0151] : Weight coefficient, taking into account the impact of the state transition;
[0152] : Environmental factors, reflecting the changes in state transition under different environmental conditions;
[0153] : Time decay factor, where Represents the time interval from the last state to the present;
[0154] is the decay constant, reflecting the effect of time;
[0155] In the denominator is a normalization factor to ensure that the sum of probabilities is 1;
[0156] There are 3 state transitions, and the parameters of each are set as follows:
[0157] ;
[0158] ;
[0159] ;
[0160] calculate item: ;
[0161] Calculate the numerator: ;
[0162] Calculate the denominator: ;
[0163] Probability calculation:
[0164] ;
[0165] This result shows that the probability value of the differentiated prediction path that integrates environmental factors and time attenuation is 0.123, which reflects the probability of a specific path appearing under given conditions. This value further guides the formulation of prevention and control strategies for the spread of high-risk pests and diseases.
[0166] See also Figure 7 , the specific steps for obtaining the prediction results of pest and disease development are as follows:
[0167] S421: using the probability value of the differentiated prediction path, identifying the pest area through edge detection and region segmentation, identifying the pest development trend, identifying the pest path with serious development trend, and obtaining the key pest path set;
[0168] The edge detection algorithm is used to identify the edge area in the image. The Canny edge detection algorithm is used. The algorithm calculates the gradient value of the image and sets the threshold to extract the edge. The binarization processing is further used to enhance the detail information in the image to complete the preliminary edge recognition. The image is divided into different regions through regional segmentation technology. The segmentation is based on the color difference, texture characteristics and edge information of adjacent regions. Common regional segmentation algorithms include k-means clustering algorithm and threshold segmentation algorithm. The obtained area is the pest and disease area. The pest and disease development trend of each path is analyzed. Based on the differentiated predicted path in the real-time data and the pest and disease area obtained after regional segmentation, the pest and disease probability of each path at different time points is further calculated. The identification of the pest and disease path is matched with the existing pest and disease development model to identify the paths with the most serious pest and disease development in different regions and obtain the key pest and disease path set.
[0169] S422: Apply deep learning models to conduct time series analysis on key pest and disease pathways, combine environmental factors and real-time pest and disease development data, predict pest and disease development trends for each pathway, and obtain pest and disease evolution trend data;
[0170] Time series analysis of a set of key pest and disease pathways is conducted using deep learning models, combined with environmental factors and real-time pest and disease development data. This involves using deep neural networks to train models with real-time data to identify pest and disease patterns, using environmental factors and real-time data as input to predict pest and disease development trends. The prediction process includes data processing, such as normalization and outlier processing, as well as model parameter optimization and verification, to obtain pest and disease evolution trend data.
[0171] S423: Verify the pest evolution trend data, adjust the parameters of the prediction model by comparing with the pest development data at the fitting time point, and optimize the consistency of the prediction. The formula is:
[0172] ;
[0173] Obtain prediction results of pest and disease development;
[0174] in, Forecast results for pest and disease development, is the weight coefficient, and Represents forecast and real-time data, and Nonlinear , is the weight of the impact of current environmental factors on the prediction,
[0175] An indicator of the current state of the environment;
[0176] The specific explanation and setting basis of the parameters in the formula are as follows:
[0177] is the weight coefficient used to balance the prediction data and real-time data The weight reflects the confidence of the prediction model compared with the real-time data. In this model, the weight It is determined based on the performance of previous models and expert evaluation, and a high value indicates that the data of the prediction model is considered relatively reliable;
[0178] and is a nonlinear adjustment coefficient, which is used to enhance the influence of prediction and real-time data. , , which means that the influence of the predicted data is squared, increasing its weight in the overall assessment, while the real-time data retains its original influence. This setting is optimized according to the nonlinear characteristics of the pest development model;
[0179] Current environmental factors The weight coefficient reflects the influence of environmental variables in the overall prediction. It means that environmental factors are also taken into account in the overall calculation, and this value is obtained through environmental impact analysis of past data;
[0180] =0.75 and =0.5 is obtained through data monitoring and ensemble prediction technology, reflecting the comparison between the prediction of future pest and disease development trends and the actual records in the past;
[0181] =0.65 is the value of the current environmental conditions, obtained through the real-time monitoring system, including the comprehensive impact index of environmental parameters such as temperature and humidity;
[0182] Substitute the specific values into the formula to calculate:
[0183] ;
[0184] This calculation result This shows that after combining the forecast data, real-time data and current environmental factors, the pest and disease development trend index is above average, which provides a comprehensive perspective to assess the future pest and disease development potential and can be used to further formulate prevention and control strategies. This value is closer to the predicted value. , indicating that the current environmental conditions and the output of the prediction model verify each other to a certain extent.
[0185] See also Figure 8 , the specific steps for obtaining pest and disease identification and location are:
[0186] S511: Based on the prediction results of pest and disease development, the characteristics of the affected area are input into the conditional random field model, including vegetation index and spectral data, to generate a regional characteristic model;
[0187] The characteristics of the affected area are input into the conditional random field model, and the geographic information system (GIS) and remote sensing technology are used to obtain accurate data on the affected area, including the leaf damage area, infection type and infection degree. GIS analyzes satellite images of multiple time periods to identify the changed areas and calculate the area and change rate of the area. The data is converted into a format acceptable to the conditional random field model. The model analyzes the characteristics to predict the development trend of future pests and diseases and generate a regional characteristic model.
[0188] S512: Scanning using the regional feature model to identify and mark the location of the pests and diseases on the leaves, and generating a leaf image with the pests and diseases marked;
[0189] High-precision scanning is performed to identify and accurately mark the locations of pests and diseases on leaves. This process includes the use of high-resolution image scanning technology and image processing algorithms. The scanning technology can capture tiny details on the surface of the leaves, and the image processing algorithm automatically identifies the location of the infected area by analyzing the color, texture and morphology of the image. The algorithm analyzes based on preset pest and disease characteristic parameters, such as typical signs of pests and diseases such as spots and holes on the leaves. Each mark will record the specific location and area to generate a leaf image that identifies the pests and diseases.
[0190] S513: Using leaf images with pests and diseases marked, The dependence between each pixel and its neighboring pixels is calculated, and the weighted dependence impact evaluation value is calculated. The evaluation value is used to sort and classify the pixels in the leaf pest image, identify the spatial location of the pest area, and record the pest distribution area. The formula is used:
[0191] ;
[0192] Output pest and disease identification and location;
[0193] in, represents the weighted dependency impact assessment value, represents the total number of pixels in the image, Indicates The weight of the pixels, Representative The dependence of a pixel on the surrounding pixels, is the adjustment factor of the pixel neighborhood.
[0194] In this formula, represents the total number of pixels in the image, Indicates The weight of the pixels, Representative The dependence of a pixel on the surrounding pixels, is the adjustment coefficient of the neighboring pixel. Suppose an image has 1000 pixels and the weight of each pixel is Set to 1, dependency The evaluation is 0.5, the adjustment coefficient is 0.3, and the consistency can be calculated according to the formula:
[0195] ;
[0196] The results show that the impact assessment value of pixel dependence and neighboring regulation in the image is 17.89. This value reflects the consistency and reliability of the image processing algorithm in marking the location of pests and diseases. The higher the value, the better the consistency of the algorithm, indicating that the calculation and analysis provide a scientific basis for the identification and location of pests and diseases.
[0197] The leaf pest and disease identification system based on image processing is used to execute the leaf pest and disease identification method based on image processing. The system includes:
[0198] The image acquisition module acquires multispectral images and thermal imaging data based on multispectral devices and thermal imaging devices, deletes invalid data with insufficient image clarity and excessive noise, obtains optimized multispectral images, and classifies and labels the data to construct a time series image dataset;
[0199] The feature change dynamic modeling module extracts the feature change information at the target moment based on the time series image data set, dynamically adjusts the Bayesian network, updates the weight and bias parameters according to the feature changes, generates the adjusted dynamic model, and records the weights, biases and associated parameters in the state transfer process through the model to obtain the state transfer learning results;
[0200] The state transfer module uses the state transfer learning results to calculate the state transfer probability of the differentiated growth stages of the leaves, obtain the state transfer probability matrix, extract the leaf pest area, identify the pest development trend, and output the pest development prediction results;
[0201] The pest location tracking module is based on the pest development prediction results, inputs the affected area characteristics into the conditional random field model, identifies and calibrates the pest location, and outputs pest identification and location.
[0202] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in other forms. Any technician familiar with the profession may use the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes and apply them to other fields. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.
Claims
1. A leaf pest identification method based on image processing, characterized in that: The following steps are involved: Set up multispectral and thermal imaging equipment, collect multispectral images and thermal imaging data of the target frequency band, delete images with insufficient clarity and data with excessive noise, obtain optimized multispectral images, and mark and classify the data according to the date of collection to form a time series image data set; Using the time series image data set, recording the feature changes at the target moment, dynamically adjusting the Bayesian network according to the feature changes, recording the adjusted weight and bias parameters, matching the growth conditions of the leaves in the differentiation stage, and constructing the adjusted dynamic model; Performing state transfer learning on the adjusted dynamic model, calculating the transition probability between stages through the transition probability between states, and obtaining a state transfer probability matrix; By using the state transition probability matrix, the pest and disease area on the leaf in the image is extracted to identify the development trend of the pest and disease, predict the development trend of the pest and disease in the future time period, obtain the probability value of the differentiated prediction path, evaluate the impact range of the pest and disease development through probability distribution, and output the prediction result of the pest and disease development; Based on the pest development prediction results, the affected area features are input into the conditional random field model, the pest locations on the leaves are identified and marked, the spatial dependency of the image pixels is analyzed, and the pest identification and location are output.
2. The leaf pest identification method based on image processing according to claim 1, characterized in that: The steps of obtaining the optimized multispectral image are specifically as follows: Set up multispectral and thermal imaging equipment, adjust the sensing range to the preset target frequency band, perform equipment performance testing, and analyze the stability of signal transmission to obtain initialized multispectral images and thermal imaging data; The initialized multispectral image and thermal imaging data are processed by using image denoising technology, and image enhancement technology is applied to optimize image edges to obtain processed multispectral image and thermal imaging data; Based on the processed multispectral image and thermal imaging data, the formula is used: ; Calculate weighted and corrected quality metrics for each data point , get the optimized multispectral image; in, Representative The strength of the data point, Representative The weight of the data point, Representative The distance from the data point to the target center, Representative The decay constant for each data point is represents the correction factor, and e is a natural constant.
3. The leaf pest identification method based on image processing according to claim 2 is characterized in that: The steps for acquiring the time series image dataset are specifically as follows: Recording a timestamp for each image of the optimized multispectral image, associating the time information with the image data, and sorting the multispectral image data with the timestamp in chronological order to obtain a multi-band image data set; Based on the multi-band image dataset, the formula is adopted: ; Calculate the weighted time series value to obtain the time series image data set; in, represents the weighted time series value, Representative The timestamp of the image, is the weight assigned according to the image quality score, Represents the minimum timestamp of the image. Represents the maximum timestamp of the image, is the number of images.
4. The leaf pest identification method based on image processing according to claim 3 is characterized in that: The steps for obtaining the adjusted weight and bias parameters are specifically as follows: Based on the time series image data set, recording the characteristic changes at the target time, evaluating the probability distribution of the impact on plant growth, and generating an initialized probability evaluation result; Using the initialized probability evaluation result, updating weight and bias parameters through Bayesian decision theory to obtain updated Bayesian network parameters; By using the updated Bayesian network parameters, the formula is adopted: ; Calculate the current weight parameter , get the adjusted weight and bias parameters; in, represents the old weight parameter, is the learning rate, is the error between the target and the prediction, is the current feature change indicator, is the regularization coefficient, is the attenuation factor.
5. The leaf pest identification method based on image processing according to claim 4 is characterized in that: The steps for obtaining the state transition probability matrix are specifically as follows: Performing state transfer learning on the adjusted dynamic model, analyzing a state set of the adjusted dynamic model, including health, initial infection, and severe infection, identifying a basic structure of the model, and generating a state definition set; Based on the differentiated states in the state definition set, the time period in which the differentiated states appear is divided, the occurrence frequency of each differentiated state is integrated, and the transition probability between the differentiated states is identified by a Markov chain algorithm to obtain initialization transition probability data; According to the initialization transition probability data, data is sorted and the transition frequency of the differentiated state is counted using the formula: ; Get the transition probability matrix; in, Represents the state Transfer to state The probability of Represents the state Transfer to state The number of observations, From the state The total number of observations transferred to the remaining states, is the correction factor, For environmental factors, Status The stability coefficient, is the observation window size.
6. The leaf pest identification method based on image processing according to claim 5, characterized in that: The steps for obtaining the probability value of the differentiated prediction path are specifically as follows: According to the adjusted state transition probability matrix, the pest and disease areas on the leaves in the image are extracted and grayed out, the pest and disease diffusion process of the leaves is identified, and the pest and disease development sequence is obtained; Using the pest development sequence, applying Markov chain theory to each pest diffusion process, calculating the path probability from the current state to multiple terminal states, and generating a probability distribution graph; Based on the probability distribution diagram, the probability distribution of each path is analyzed, and the associated path of the deviation is selected using the formula: ; Get the probability value of the differentiated prediction path ; in, is the improved pest and disease state transition probability, is the weight coefficient, is the variability factor of state transfer in the target environment, is the time since the last pest and disease event, is the attenuation constant, is the number of states, is a natural constant.
7. The leaf pest identification method based on image processing according to claim 6, characterized in that: The steps for obtaining the prediction results of the pest and disease development are specifically as follows: Using the probability value of the differentiated prediction path, the pest area is identified through edge detection and regional segmentation, the pest development trend is identified, the pest path with serious development trend is identified, and the key pest path set is obtained; Apply deep learning models to conduct time series analysis on the key pest and disease path set, combine environmental factors and real-time pest and disease development data, predict the pest and disease development trend of each path, and obtain pest and disease evolution trend data; The pest evolution trend data are verified by comparing with the pest development data at the fitting time point, adjusting the parameters of the prediction model, optimizing the consistency of the prediction, and using the formula: ; Obtain prediction results of pest and disease development; in, Forecast results for pest and disease development, is the weight coefficient, and Represents forecast and real-time data, and is the nonlinear adjustment coefficient, is the weight of the impact of current environmental factors on the prediction, An indicator of the current environmental status.
8. The leaf pest identification method based on image processing according to claim 7, characterized in that: The steps for obtaining the identification and location of pests and diseases are specifically as follows: Based on the pest and disease development prediction results, input the characteristics of the affected area into the conditional random field model, including vegetation index and spectral data, to generate a regional characteristic model; Scanning using the regional feature model to identify and mark the locations of pests and diseases on the leaves, and generating leaf images with the pests and diseases marked; The leaf image with the pests and diseases identified is used to analyze the dependency between each pixel and the neighboring pixels, calculate the weighted dependency impact evaluation value, use the evaluation value to sort and classify the pixels in the leaf pest and disease image, identify the spatial position of the pest and disease area, record the pest and disease distribution area, and use the formula: ; Output pest and disease identification and location; in, represents the weighted dependency impact assessment value, represents the total number of pixels in the image, Indicates The weight of the pixels, Representative The dependence of a pixel on the surrounding pixels, is the adjustment factor of the pixel neighborhood.
9. The leaf pest identification system based on image processing is characterized by: According to the leaf pest identification method based on image processing according to any one of claims 1 to 8, the system comprises: The image acquisition module acquires multispectral images and thermal imaging data based on multispectral devices and thermal imaging devices, deletes invalid data with insufficient image clarity and excessive noise, obtains optimized multispectral images, and classifies and labels the data to construct a time series image dataset; The feature change dynamic modeling module extracts the feature change information at the target moment based on the time series image data set, dynamically adjusts the Bayesian network, updates the weight and bias parameters according to the feature changes, generates an adjusted dynamic model, and records the weights, biases and associated parameters in the state transfer process through the model to obtain the state transfer learning result; The state transfer module uses the state transfer learning results to calculate the state transfer probability of the differentiated growth stages of the leaves, obtains the state transfer probability matrix, extracts the leaf pest area, identifies the pest development trend, and outputs the pest development prediction result; The pest location tracking module inputs the affected area characteristics into the conditional random field model based on the pest development prediction results, identifies and calibrates the pest location, and outputs pest identification and location.
Citation Information
Patent Citations
A system, method and computer product for real time sorting of plants
CN112584757A
Vegetable disease and pest outbreak prevalence prediction method, medium and system
CN117852726A
Pension service optimization method and system based on big data
CN118035870A
Bursaphelenchus xylophilus infection stage monitoring identification method based on unmanned aerial vehicle visible light remote sensing
CN119274098A
Crop monitoring system and method thereof
US20230316116A1
Cited By
Rice disease and pest identification method and system based on machine vision technology
CN120219861A
Corn disease and pest monitoring method based on image processing
CN120318774A
Laser deinsectization method and system of flying robot
CN120526339A
Floor antibacterial detection method and system
CN120801216A
Hyperspectral early-stage dynamic detection method and system for crop diseases and insect pests
CN120992517A