A vegetable disease distribution map production method, medium and system
By acquiring high-definition images from multiple angles and performing image segmentation and calculation of pest and disease impact rates, a vegetable disease and pest model is established, a machine learning algorithm is used to train image features, a disease distribution map is generated, and the Bayesian algorithm is used to screen irregular areas for high-definition analysis. Image processing solves the problem of pest detection errors caused by uneven image definition in large-area vegetable planting, and achieves more accurate generation of disease distribution maps.
Patent Information
- Application Number
- CN202410411536.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-08
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-04-08
AI Technical Summary
In large-area vegetable planting scenes, it is impossible to ensure that all parts of each vegetable are clearly entered into the mirror during the image acquisition process, resulting in uneven image clarity and affecting the accuracy of disease and pest detection.
By obtaining high -definition images from multiple angles, calculating the impact rate of image segmentation and pest pests, establish a model of vegetable diseases and insect pests, use machine learning algorithms to train image features, generate disease distribution maps, and screen the non -regular area through the Bayesian algorithm to perform high -definition areas to conduct high -definition areas. Image processing.
It improves the accuracy of vegetable pest and disease detection, ensures the accuracy and reliability of disease distribution maps, and solves detection errors caused by uneven image clarity.
Smart Images

Figure CN118247661B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of vegetable disease prediction, and in particular, relates to a method, medium and system for making a vegetable disease distribution map. Background Art
[0002] In large-scale vegetable planting scenarios, using drones and other equipment to take plant images from high altitudes and monitor pests and diseases based on image processing technology has become an important technical means. However, due to the following problems in actual applications, the monitoring effect is difficult to achieve as expected:
[0003] During large-scale shooting, due to the different postures of vegetables, it is impossible to ensure that all parts of each vegetable are clearly captured in the camera, and there will be blurred areas in the image.
[0004] Due to factors such as the drone's cruising speed, the clarity of images captured during some flights will be affected.
[0005] The above reasons result in that some vegetables or image areas in the final original image have insufficient clarity.
[0006] When the distribution of pests and diseases is subsequently calculated using image processing algorithms, areas with insufficient clarity will lead to increased errors in the calculation results and reduce the accuracy of the final output disease distribution map. Summary of the invention
[0007] In view of this, the present invention provides a method, medium and system for producing a vegetable disease distribution map, which can solve the problem that a high-definition image of each vegetable cannot be obtained during the image acquisition process, resulting in inaccurate vegetable disease and pest detection results.
[0008] The present invention is achieved in that:
[0009] A first aspect of the present invention provides a method, medium and system for producing a vegetable disease distribution map, which comprises the following steps:
[0010] S01. Obtain high-definition images of the vegetables from multiple angles based on 100 randomly picked vegetables affected by pests and diseases of the type to be predicted, which are recorded as a first image set; wherein the pests and diseases are diseases or insect pests;
[0011] S02. For each image in the first image set, segment the image according to color change or shape change to obtain a segmented image set;
[0012] S03. For the segmented image set, determine the pest and disease impact rate corresponding to the segmented image according to the color change degree or the shape change degree;
[0013] S04, integrating all segmented images of each vegetable, calculating the pest and disease impact rate of the vegetable, and recording it as the vegetable pest and disease index;
[0014] S05, for each vegetable, compressing the images corresponding to the vegetables at multiple angles to obtain vegetable images with a series of resolutions;
[0015] S06. Establish image features of each vegetable at different resolutions, and use a machine learning algorithm to train the established image feature sets at different resolutions to obtain a vegetable disease and insect pest model;
[0016] S07, obtaining a set of vegetable images taken by a drone in the area to be analyzed, performing resolution segmentation on each image in the vegetable image set to obtain a plurality of segmented images, recorded as a second image set, wherein each segmented image corresponds to a sub-area;
[0017] S08, using the vegetable pest model to calculate each segmented image in the second image set to obtain a sub-region pest index corresponding to each segmented image;
[0018] S09, marking the sub-region pest and disease index corresponding to each segmented image on the plane map of the area to be analyzed, to obtain a first pest and disease index plane map;
[0019] S10, analyzing the first pest index plane map using a Bayesian algorithm, and screening out multiple sub-regions whose pest indexes do not conform to a regular pattern as irregular regions;
[0020] S11, obtaining a high-definition image of the irregular area, and using the vegetable pest and disease model to calculate the high-definition image of the irregular area to obtain a pest and disease index corresponding to the irregular area;
[0021] S12: updating the first pest index plane map with the obtained pest index corresponding to the irregular area to obtain a second pest index plane map, and outputting it to the staff.
[0022] On the basis of the above technical solution, the vegetable disease distribution map making method, medium and system of the present invention can also be improved as follows:
[0023] Wherein, in step S02, segmenting the picture according to color change specifically includes the following steps:
[0024] Calculate the HSV histogram of the image and determine the main color components of the image;
[0025] Remove the main background color of the image, leaving the area different from the background color as the candidate lesion area;
[0026] The image segmentation according to shape change specifically includes the following steps:
[0027] The Canny edge detection algorithm was used to detect the edges of the sample plants;
[0028] The edges of the sample plants are removed, and the remaining internal regions with different shapes are used as candidate lesion regions.
[0029] The beneficial effects of adopting the above-mentioned improved solution are: preprocessing the sample image and extracting the lesion area.
[0030] Furthermore, the step S03 specifically includes the following steps:
[0031] Calculate the average Hue value of the segmented image and compare it with the Hue reference value of healthy plants to obtain the degree of color change;
[0032] Calculate the ratio of the pixels in the lesion area to the total pixels in the segmented image as the degree of shape change;
[0033] The degree of color change and the degree of shape change are combined to obtain the pest and disease impact rate corresponding to the segmented image.
[0034] The beneficial effect of adopting the above-mentioned improved scheme is: evaluating the degree of lesions in each segmented image.
[0035] Furthermore, the step S05 specifically includes the following steps:
[0036] Firstly, the original images of each vegetable sample at multiple angles are processed by image pyramid to obtain an image pyramid from high resolution to low resolution;
[0037] Then, sampling is performed according to the sampling interval resolution preset in the image pyramid to obtain images with different resolutions.
[0038] The beneficial effect of adopting the above-mentioned improved scheme is: generating images of different resolutions and providing diverse data for model training.
[0039] Furthermore, the step S07 specifically includes the following steps:
[0040] Collect images of the area to be detected to form a vegetable image set;
[0041] Each image in the vegetable image set is cut into multiple segmented images and recorded as a second image set.
[0042] The beneficial effect of adopting the above-mentioned improved solution is: performing slice processing on the new image.
[0043] Furthermore, the step S08 specifically includes the following steps:
[0044] extracting image features of the segmented images in the second image set;
[0045] The image features are input into the vegetable pest model to obtain the pest probability, that is, the pest index.
[0046] The beneficial effect of adopting the above-mentioned improved scheme is: predicting the lesion index of each sub-region.
[0047] Furthermore, the step S09 specifically includes the following steps:
[0048] Firstly, according to the position information of all segmented images, the distribution of segmented images is restored on the plane map of the area to be analyzed;
[0049] Then, in each sub-region where the segmented image is located, the predicted pest index of the segmented image is represented by color depth;
[0050] The pest and disease prediction results of each sub-area are marked on the plan view to generate a first pest and disease index plan view.
[0051] The beneficial effects of adopting the above-mentioned improved solution are as follows: the purpose of this step is to generate a disease distribution map.
[0052] Furthermore, the step S10 specifically includes the following steps:
[0053] Firstly, the pest index value of each sub-area in the first pest index plane is calculated to construct a feature vector;
[0054] Then, based on the disease diffusion characteristics, a Bayesian network structure is designed, the feature vector is input, and the disease index compliance probability of each sub-area is output;
[0055] Set a threshold, and the sub-region with a probability lower than the threshold is an irregular region, where the threshold is set to 0.7;
[0056] Finally, all irregular sub-regions are screened out from the plan view, and the location information of the irregular regions is output.
[0057] The purpose of this step is to detect irregular areas in the disease distribution map;
[0058] The Bayesian network can effectively determine the rationality of disease spread by calculating the conditional dependency between disease distributions.
[0059] A second aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores program instructions, and when the program instructions are run, they are used to execute the above-mentioned method for producing a vegetable disease distribution map.
[0060] A third aspect of the present invention provides a vegetable disease distribution map production system, which includes the above-mentioned computer-readable storage medium.
[0061] In order to solve the technical problem of inaccurate disease calculation caused by uneven clarity of vegetable images in the above-mentioned background technology, the present invention provides the following technical effects:
[0062] During the image segmentation process, clear and unclear areas are distinguished to ensure that clear images are used for subsequent processing;
[0063] For image areas with insufficient clarity, use algorithms such as super-resolution to enhance and compensate for the image;
[0064] When extracting features, weights are set according to the regional clarity to reduce the impact of clarity differences on the results;
[0065] When summarizing the disease calculation results, the clarity factor is considered to perform weighted fusion of different areas;
[0066] The final output disease distribution map can accurately reflect the actual disease distribution.
[0067] The system framework is simple and reliable, and can effectively solve the problem of reduced monitoring effect caused by different image clarity. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0069] Figure 1 The present invention is a flow chart of a method for producing a vegetable disease distribution map. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0071] like Figure 1 As shown, the first embodiment of the vegetable disease distribution map making method, medium and system provided by the first aspect of the present invention, in this embodiment, includes the following steps:
[0072] S01. Obtain high-definition images of the vegetables from multiple angles based on randomly picked more than 100 vegetables affected by pests and diseases of the type to be predicted, which are recorded as a first image set; wherein the pests and diseases are diseases or insect pests;
[0073] S02, for each image in the first image set, segment the image according to color change or shape change to obtain a segmented image set;
[0074] S03. For the segmented image set, determine the pest and disease impact rate corresponding to the segmented image according to the color change degree or the shape change degree;
[0075] S04, integrating all segmented images of each vegetable, calculating the impact rate of vegetable pests and diseases, and recording it as the vegetable pest and disease index;
[0076] S05, for each vegetable, compressing the images corresponding to the vegetables at multiple angles to obtain vegetable images with a series of resolutions;
[0077] S06. Establish image features of each vegetable at different resolutions, and use a machine learning algorithm to train the established image feature sets at different resolutions to obtain a vegetable disease and insect pest model;
[0078] S07, obtaining a set of vegetable images taken by a drone in the area to be analyzed, performing resolution segmentation on each image in the vegetable image set to obtain a plurality of segmented images, recorded as a second image set, wherein each segmented image corresponds to a sub-area;
[0079] S08, using the vegetable pest and disease model to calculate each segmented image in the second image set, to obtain a sub-region pest and disease index corresponding to each segmented image;
[0080] S09, marking the sub-region pest and disease index corresponding to each segmented image on the plane map of the area to be analyzed, to obtain a first pest and disease index plane map;
[0081] S10, analyzing the first pest index plane map using a Bayesian algorithm, and screening out multiple sub-regions whose pest indexes do not conform to a regular pattern as irregular regions;
[0082] S11, obtaining a high-definition image of the irregular area, and using a vegetable pest and disease model to calculate the high-definition image of the irregular area to obtain a pest and disease index corresponding to the irregular area;
[0083] S12, updating the first pest index plane map with the obtained pest index corresponding to the irregular area to obtain a second pest index plane map, and outputting it to the staff.
[0084] Specific implementation of step S01:
[0085] The purpose of this step is to obtain sample images to provide data support for the subsequent model building. In the specific implementation, it is first necessary to determine the type of vegetables to be predicted, such as tomatoes, cucumbers, etc. Then randomly select about 100 vegetable samples in the fields. For each vegetable sample, high-definition pictures are taken from multiple different angles (such as the front, side, 45 degrees, etc.) with a professional camera. Just take 3-5 pictures for one vegetable sample. When shooting, it is necessary to ensure sufficient light to avoid large areas of shadows. If the sample has lesions, try to capture the lesion. All the acquired pictures are summarized to form the first image set. The more images obtained in this step, the more comprehensive the categories, which will help improve the accuracy of subsequent modeling.
[0086] Specific implementation of step S02:
[0087] The purpose of this step is to preprocess the sample image and extract the lesion area. In specific implementation, the segmentation algorithm in image processing can be used, such as color-based segmentation, shape-based segmentation, etc. For color-based segmentation, first calculate the HSV histogram of the image to determine the main color components of the image. Then set the threshold, remove the main background color, and leave the area with a different background color as the candidate lesion area. For shape segmentation, algorithms such as Canny edge detection can be used to detect the edge of the sample, and then remove the outer contour of the plant, leaving the area with a different internal shape as the candidate lesion area. In addition, it can also be combined with instance segmentation algorithms in deep learning, such as Mask R-CNN to directly detect and segment the lesion area. Collect all segmented images to form a segmented image set.
[0088] Specific implementation of step S03:
[0089] The purpose of this step is to evaluate the degree of lesions in each segmented image. In specific implementation, the degree of lesions can be calculated based on the color information and shape information of each segmented image using the following method:
[0090] (1) Calculate the average Hue value of the image and compare it with the Hue reference value of healthy plants to obtain the degree of color change;
[0091] (2) Calculate the proportion of pixels in the lesion area to the total pixels in the image as the degree of shape change. Then combine the degree of color change and the degree of shape change, set the weight to calculate the lesion impact rate, and the impact rate range is 0-100%. If the lesion is serious, the color and shape changes are obvious, and the impact rate is close to 100%; if there is no lesion, the impact rate is 0%. The threshold is set as: color change weight 0.6, shape change weight 0.4.
[0092] The purpose of this step is to evaluate the degree of lesion in each segmented disease image. Set the following variables:
[0093] image i : the i-th segmented disease image;
[0094] pixel_num i :imageimage i The total number of pixels;
[0095] disease_pixel_num i :imageimage i The number of pixels judged as lesions in
[0096] H avr :imageimage i The average Hue value;
[0097] H ref : Reference Hue value of normal vegetable samples. Specific implementation method:
[0099] Calculate image i The average Hue value H avr , using the formula:
[0100]
[0101] Among them, H j Represents image i The Hue value of the jth pixel in .
[0102] Calculate H avr Compared with the normal reference value H ref The degree of difference H diff , using the formula:
[0103]
[0104] Calculate image i The proportion of diseased pixels in D shape , using the formula:
[0105]
[0106] H diff and D shape Perform weighted summation to obtain the pest and disease impact rate D i , using the formula:
[0107] D i =ω1H diff +ω2D shape ;
[0108] Among them, ω1 and ω2 are weight coefficients.
[0109] Specific implementation of step S04:
[0110] The purpose of this step is to evaluate the overall pathological condition of a single sample image. In specific implementation, for each vegetable sample, integrate all the corresponding segmented images. Average the pathological impact rate calculated for each segmented image to obtain the overall average pathological impact rate of the vegetable sample as the pest and disease index of the vegetable. This index reflects the overall pathological condition of the vegetable. The purpose of this step is to evaluate the overall pathological condition of a single vegetable sample. Set the following variables:
[0111] n: the number of segmented disease images corresponding to a vegetable sample;
[0112] D i : The pest and disease impact rate of the i-th segmented disease image;
[0113] D avr : The average disease impact rate of the vegetable sample, that is, the pest and disease index. Specific implementation method:
[0115] For a vegetable sample, calculate the sum of the disease and insect pest impact rates of all segmented disease images it contains, and then take the mean to obtain the average disease impact rate D of the sample. avr :
[0116]
[0117] The average impact rate is the pest and disease index of the vegetable sample.
[0118] For example, if 5 pictures of a vegetable are taken, and the disease impact rates of 3 of them are 20%, 15%, and 10% respectively, then the pest index of the vegetable is (20%+15%+10%) / 3=15%. The pest index data of all samples are recorded for the next step of model training.
[0119] Specific implementation of step S05:
[0120] The purpose of this step is to generate images of different resolutions to provide diverse data for model training. In specific implementation, firstly, the original images of each vegetable sample at multiple angles are processed by image pyramid to obtain an image pyramid from high resolution to low resolution. Then, samples are taken from the pyramid at certain intervals to obtain images of different resolutions. When sampling, the high-resolution image takes the original image, the medium-resolution image can take 80%, 60%, and 40% of the length and width of the original image, and the low-resolution image takes 20%. Finally, the images are arranged in order from high to low resolution to form a multi-resolution image sequence for each vegetable sample. This will provide fine-grained image data for model training.
[0121] Specific implementation of step S06:
[0122] The purpose of this step is to construct image features and train a classification model. In the specific implementation, first, for each resolution image of each vegetable sample, an image feature extraction algorithm is used to extract feature vectors. The algorithm can use SIFT, SURF, ORB, etc. Then, all images are divided into multiple data sets according to the resolution, and each data set contains the image features of all vegetable samples at this resolution. Next, a machine learning algorithm is used to train multiple classification models, each model corresponding to a data set of a resolution. The algorithm can use SVM, random forest, etc., and the label is the pest and disease index generated in step S04. Repeat this process until a vegetable pest and disease prediction model covering all resolutions is obtained.
[0123] Specific implementation of step S07:
[0124] The purpose of this step is to slice the new image. In the specific implementation, first use drones and other equipment to collect images of the area to be detected to form a vegetable image set. Then slice the image into multiple small pictures of a certain size. The slice size can be set to 20%, 40%, etc. of the length and width of the original image. When slicing, you can customize the grid and interval without overlap. Each slice image corresponds to a sub-area in the scan area. In this way, the large image can be decomposed into multiple small images, improving the parallel efficiency of subsequent calculations.
[0125] Specific implementation of step S08:
[0126] The purpose of this step is to predict the lesion index of each sub-region. In specific implementation, for each slice image in the second image set, the pest prediction model of the corresponding resolution trained in step S06 is used for prediction, that is, the slice image features are input and the pest probability is output. The probability is the pest index of the slice area. All slices are predicted in turn, and finally the pest prediction result of each sub-region is obtained.
[0127] Specific implementation of step S09:
[0128] The purpose of this step is to generate a disease distribution map. In specific implementation, first, based on the position information of all slice images, the distribution of slices is restored on the plane map of the area to be analyzed. Then, in each sub-area where the slice is located, the predicted disease and insect pest index of the slice is represented by the color depth. The darker the color, the greater the disease prediction value. After the above processing, the disease prediction results of each sub-area can be marked on the plane map to generate the first disease and insect pest index plane map.
[0129] Specific implementation of step S10:
[0130] The purpose of this step is to detect irregular regions in the disease distribution map. In specific implementation, a Bayesian network can be used to analyze the first pest and disease index plan view. First, calculate the pest and disease index values of each sub-region in the plan view to construct a feature vector. Then, based on the disease spread characteristics, design the Bayesian network structure, input the feature vector, and output the compliance probability of the disease index for each sub-region. The threshold is set to 0.7, and the sub-regions with a probability lower than the threshold are irregular regions. Finally, screen out all irregular sub-regions from the plan view and output the location information of the irregular regions. By calculating the conditional dependence relationship between disease distributions, the Bayesian network can effectively judge the rationality of disease spread.
[0131] The purpose of this step is to detect irregular regions in the disease distribution map. Set the following variables:
[0132] m: The number of sub-regions in the first pest and disease index plan view;
[0133] x i : The feature vector of the i-th sub-region in the first pest and disease index plan view;
[0134] P(A i ): The posterior probability that the Bayesian network outputs x i complies with the disease pattern. Specific implementation method:
[0136] Construct a Bayesian network, with the input being the sub-region feature vector x i , and the output being the posterior probability P(A i ).
[0137] For each sub-region i = 1, 2,..., m, input the feature vector x i into the Bayesian network to obtain the posterior probability P(A i ).
[0138] For the sub-regions where P(A i ) < threshold (threshold), identify them as irregular regions.
[0139] In step S10, threshold is used as the probability threshold for judging the compliance of the index with the pattern. The setting of the default value needs to comprehensively consider the following factors:
[0140] False positive rate and false negative rate. Setting threshold too high will miss irregular regions, and too low will misreport normal regions. It is necessary to balance the two.
[0141] Disease spread model. Different models have different accuracies in judging the regularity of the index, and it is necessary to set appropriate thresholds for the models.
[0142] Data distribution. The more concentrated the exponential distribution is, the higher the threshold can be set; the more scattered the distribution is, the lower the threshold needs to be.
[0143] Taking all the above factors into consideration, the recommended default threshold value range is 0.6-0.8. The specific value of 0.7 can take into account both the false alarm rate and the missed alarm rate.
[0144] Of course, the threshold setting needs to be adjusted according to the specific situation. If false positives or false negatives are found in subsequent use, the threshold can be appropriately modified to achieve the best effect.
[0145] Specific implementation of step S11:
[0146] The purpose of this step is to re-predict the pest index of irregular areas. In specific implementation, first locate the corresponding area in the original image according to the location information of the irregular area, and cut out the high-definition image block. Then, the high-definition image of each irregular area is predicted using the multi-resolution disease prediction model trained in step S06 to obtain the re-predicted pest index. The prediction results of multiple models can be averaged to improve accuracy.
[0147] The purpose of this step is to re-predict the pest index in irregular areas. Set the following variables:
[0148] image′ i : High-resolution original image of the i-th irregular sub-region
[0149] M j : The jth disease prediction model
[0150] D ij : Model M j For image image′ i The prediction results
[0151] k: number of models
[0152] D i :image image′ i Predicted pest index Specific implementation method:
[0154] For each irregular subregion i:
[0155] Input original image image′ i To each model M j (j=1, 2, ..., k), and get the prediction result D ij .
[0156] The output results of all models are averaged to obtain the final predicted pest index D i:
[0157]
[0158] This step uses the original high-definition image as input, which can restore the areas that may have prediction errors due to resolution distortion and optimize the results.
[0159] Specific implementation of step S12:
[0160] The purpose of this step is to optimize and output the final disease distribution map. In the specific implementation, the re-predicted irregular area pest index is first used to replace the original corresponding area index in the first pest index plane map. Then, the entire plane map is smoothed using filtering algorithms such as Gaussian smoothing to reduce prediction noise. After processing, the second pest index plane map is formed. Finally, the optimized disease distribution map is output to agricultural workers in the form of images or data for disease prevention and control.
[0161] A second aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores program instructions, and when the program instructions are executed, they are used to execute the above-mentioned method for producing a vegetable disease distribution map.
[0162] A third aspect of the present invention provides a vegetable disease distribution map production system, which includes the above-mentioned computer-readable storage medium.
[0163] The core principle of the system of the present invention is:
[0164] 1. Use computer vision and deep learning technologies to extract and annotate image features of diseases and build a comprehensive and fine-grained disease index map;
[0165] 2. Based on certain laws of disease occurrence and spread, use Bayesian network algorithm to detect unreasonable areas in the disease distribution map;
[0166] 3. For regional images with complex lighting or symptoms, integrating multiple model prediction results can improve the accuracy of disease judgment;
[0167] 4. Visualize the results and output them to help identify key areas for disease prevention and control measures.
[0168] Through image segmentation and fusion, machine learning and model integration and other technical means, the system of the present invention can use disease distribution information for intelligent diagnosis and prediction. The systemic design of computer vision, deep learning and other algorithms is comprehensively used, so that the present invention can efficiently and accurately realize the automated analysis of large-scale disease monitoring.
Claims
1. A method for producing a vegetable disease distribution map, characterized in that: The following steps are involved: S01. Obtain high-definition images of the vegetables from multiple angles based on 100 randomly picked vegetables affected by pests and diseases of the type to be predicted, which are recorded as a first image set; wherein the pests and diseases are diseases or insect pests; S02. For each image in the first image set, segment the image according to color change or shape change to obtain a segmented image set; S03. For the segmented image set, determine the pest and disease impact rate corresponding to the segmented image according to the color change degree or the shape change degree; S04, integrating all segmented images of each vegetable, calculating the pest and disease impact rate of the vegetable, and recording it as the vegetable pest and disease index; S05, for each vegetable, compressing the images corresponding to the vegetables at multiple angles to obtain vegetable images with a series of resolutions; S06. Establish image features of each vegetable at different resolutions, and use a machine learning algorithm to train the established image feature sets at different resolutions to obtain a vegetable disease and insect pest model; S07, obtaining a set of vegetable images taken by a drone in the area to be analyzed, performing resolution segmentation on each image in the vegetable image set to obtain a plurality of segmented images, recorded as a second image set, wherein each segmented image corresponds to a sub-area; S08, using the vegetable pest model to calculate each segmented image in the second image set to obtain a sub-region pest index corresponding to each segmented image; S09, marking the sub-region pest and disease index corresponding to each segmented image on the plane map of the area to be analyzed, to obtain a first pest and disease index plane map; S10, analyzing the first pest index plane map using a Bayesian algorithm, and screening out multiple sub-regions whose pest indexes do not conform to a regular pattern as irregular regions; S11, obtaining a high-definition image of the irregular area, and using the vegetable pest and disease model to calculate the high-definition image of the irregular area to obtain a pest and disease index corresponding to the irregular area; S12, updating the first pest index plane map with the obtained pest index corresponding to the irregular area to obtain a second pest index plane map, and outputting it to the staff; In step S02, segmenting the image according to color changes specifically includes the following steps: Calculate the HSV histogram of the image and determine the main color components of the image; Remove the main background color of the image, leaving the area different from the background color as the candidate lesion area; The image is segmented according to shape changes, which specifically includes the following steps: The Canny edge detection algorithm was used to detect the edges of the sample plants; removing the edge of the sample plant and taking the remaining internal region with different shapes as a candidate lesion region; Collect all the segmented images to form a segmented image set; The step S03 specifically includes the following steps: Calculate image i The average Hue value H avr , using the formula: Among them, H j Represents image i The Hue value of the jth pixel in image i Indicates the i-th segmented disease image; pixel_num i Represents image i The total number of pixels; Calculate H avr Compared with the normal reference value H ref The degree of difference H diff , using the formula: Among them, H diff Indicates the degree of color change; H avr Represents image i The average Hue value of H ref Indicates the reference Hue value of normal vegetable samples; Calculate image i The proportion of diseased pixels in D shape , using the formula: Among them, D shape Indicates the degree of shape change; disease_pixel_num i Represents image i The number of pixels judged as lesions in H diff and D shape Perform weighted summation to obtain the pest and disease impact rate D i , using the formula: D i =ω1H diff +ω2D shape ; Among them, ω1 and ω2 are weight coefficients; the value of ω1 is 0.6, the value of ω2 is 0.4, and the impact rate of pests and diseases D i The value range is 0-100%; The step S10 specifically includes the following steps: Firstly, the pest index value of each sub-area in the first pest index plane is calculated to construct a feature vector; Then, based on the disease diffusion characteristics, a Bayesian network structure is designed, the feature vector is input, and the disease index compliance probability of each sub-area is output; Set a threshold, and the sub-region with a probability lower than the threshold is an irregular region, where the threshold is set to 0.7; Finally, all irregular sub-regions are screened out from the plan view, and the location information of the irregular regions is output.
2. The method for making a vegetable disease distribution map according to claim 1, characterized in that: The step S05 specifically includes the following steps: Firstly, the original images of each vegetable sample at multiple angles are processed by image pyramid to obtain an image pyramid from high resolution to low resolution; Then, sampling is performed according to the sampling resolution interval pre-set in the image pyramid to obtain images with different resolutions.
3. The method for making a vegetable disease distribution map according to claim 2, characterized in that: The step S08 specifically includes the following steps: extracting image features of the segmented images in the second image set; The image features are input into the vegetable pest model to obtain the pest probability, that is, the pest index.
4. The method for making a vegetable disease distribution map according to claim 3, characterized in that: The step S09 specifically includes the following steps: Firstly, according to the position information of all segmented images, the distribution of segmented images is restored on the plane map of the area to be analyzed; Then, in each sub-region where the segmented image is located, the predicted pest index of the segmented image is represented by color depth; The pest and disease prediction results of each sub-area are marked on the plan view to generate a first pest and disease index plan view.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program instructions, and when the program instructions are executed, they are used to execute the vegetable disease distribution map making method according to any one of claims 1 to 4.
6. A vegetable disease distribution map making system, characterized in that: Contains the computer-readable storage medium of claim 5.
Citation Information
Patent Citations
Plant disease and insect pest detection method based on YOLOv5 neural network
CN117456358A
System and method for crop monitoring
GB202101329D0