Tobacco disease diagnosis method and model based on image processing

By integrating the image features of the whole plant, stem, and leaves, and combining expert experience with data-driven weight adjustments, the problems of subjectivity and low accuracy in existing tobacco disease diagnosis methods have been solved, achieving multi-site collaborative diagnosis and efficient disease identification.

CN122023992APending Publication Date: 2026-05-12KUNMING UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
KUNMING UNIVERSITY
Filing Date
2026-02-04
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing methods for diagnosing tobacco diseases mainly rely on field observation, which is subjective, inefficient, and has a low diagnostic accuracy. They cannot fully reflect the systemic symptoms of diseases, and in particular, they ignore the morphological characteristics of stems and the whole plant.

Method used

An image processing-based approach is used to integrate the image features of the whole plant, stem, and leaves. By calculating the disease probability of leaves, stems, and the whole plant, and combining expert experience with data-driven weight adjustments, multi-site collaborative diagnosis is achieved.

Benefits of technology

It improves the comprehensiveness and accuracy of tobacco disease diagnosis, enhances the model's adaptability to atypical symptoms, alleviates overfitting problems under small sample sizes, and improves diagnostic accuracy and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure SMS_1
    Figure SMS_1
  • Figure SMS_11
    Figure SMS_11
  • Figure QLYQS_1
    Figure QLYQS_1
Patent Text Reader

Abstract

The invention discloses a tobacco disease diagnosis method and model based on image processing, and the method comprises the steps: collecting an original image of field flue-cured tobacco, preprocessing the image, calculating to obtain the disease probability of each leaf for different diseases K, and calculating to obtain the weighted average disease probability of the leaves according to the disease probabilities of a plurality of leaves; the stalk morbidity probability and the whole plant morbidity probability are obtained through calculation, then weighted averaging is carried out according to the weighted average morbidity probability of the leaves, the stalk morbidity probability and the whole plant morbidity probability, and the morbidity probability of the plant for the disease K is obtained through calculation. The method has the advantages that the image features of the leaves, the stalks and the whole plant can be integrated, multi-part collaborative diagnosis is achieved, the comprehensiveness and accuracy of disease recognition are improved, multi-source information fusion is achieved, and the disease diagnosis accuracy can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automatic disease identification technology, and in particular to a method and model for diagnosing tobacco diseases based on image processing. Background Technology

[0002] Currently, the diagnosis of tobacco diseases mainly relies on field observations and experience-based judgments by agricultural technicians. This method suffers from high subjectivity, low efficiency, and a high dependence on specialized personnel. With the development of image processing and artificial intelligence technologies, some studies have attempted to identify diseases based on leaf images. However, existing methods mostly focus on leaf lesion identification, neglecting stem and whole-plant morphological features, failing to comprehensively reflect systemic symptoms of diseases, and resulting in low diagnostic accuracy. Therefore, there is an urgent need for an intelligent diagnostic method and model for tobacco diseases that can integrate features from multiple image sites and achieve high diagnostic accuracy. Summary of the Invention

[0003] The technical problem to be solved by the present invention is to provide a method and model for diagnosing tobacco diseases that can integrate image features from multiple parts and has a high diagnostic accuracy.

[0004] To address the aforementioned technical problems, this invention provides a method for diagnosing tobacco diseases based on image processing, comprising the following steps: S1. Image Acquisition: Acquire raw images of flue-cured tobacco in the field, including overall images of the plant, images of the stem, and images of several leaves from the same plant; S2. Image preprocessing: Preprocess the original images of flue-cured tobacco collected in the field; S3, Calculate P leaf-n(k) For each leaf image, leaf features are extracted, and the probability of disease on each leaf for different diseases K is calculated and denoted as P. leaf-n(k) K represents the disease, and leaf-n represents the nth leaf of the plant. S4. Leaf Evidence Aggregation: Based on the P of several leaves leaf-n(k) The weighted average disease probability P of the leaves was calculated. leaf(k) ; S5, Calculate P stem(k) Based on the plant stem images, stem features are extracted, and the probability P of stem disease in response to different diseases K is calculated. stem(k) ; S6, Calculate P whole(k) Based on the overall image of the plant, extract overall features and calculate the probability P of the plant developing different diseases K. whole(k) ; S7. Based on the calculated P leaf(k) P stem(k) P whole(k) The probability P of plant developing disease K was calculated.k ; S8. According to the calculated P K Sort the diseases from largest to smallest and output the incidence probability P of the top few diseases. k The types of diseases are identified, and their corresponding image features are displayed.

[0005] Furthermore, in step S4, P leaf-(k) The calculation method includes the following steps: S41. Calculate the weights Wn of several blades:

[0006] Alesion,n is the area of ​​the nth leaf; Aleaf,n represents the total area of ​​several lesions on the nth leaf; It is a constant; S42, Calculate P leaf(k) : ; in: N is the total number of leaves analyzed; P leaf-n(k) Let n be the probability of disease K occurring on the nth leaf. Wn is the weight of the nth leaf.

[0007] Furthermore, in step S7, P k The calculation method includes the following steps: S71. Determine the weights of leaves, stems, and the whole plant, denoted as w. leaf(k) ,w stem(k) ,w whole(k) ; S72, Calculate P k : .

[0008] Furthermore, the method in step S71 includes the following steps: S711. Based on experience, experts pre-determine an initial weight matrix for leaves, stems, and the whole plant for different diseases k; denoted as: w leaf(k)1 ,w stem(k)1 ,w whole(k)1 Satisfying w leaf(k)1 +w stem(k)1 +w whole(k)1 =1; S712. Preset a threshold range for the probability of disease on leaves, stems, and the whole plant for each disease k. S713. In actual diagnosis, based on the calculated Pleaf(k) P stem(k) P whole(k) Each component is compared with its respective incidence probability threshold range. If the incidence probability threshold range is exceeded, the initial weight matrix is ​​adjusted to obtain the final weight matrix. The adjustment rule is: if the probability value is higher than the upper limit, it means that the symptoms of that part are very typical, so its weight is increased; if the probability value is lower than the lower limit, it means that the symptoms of that part are not obvious, so its weight is decreased. S714. Normalize the adjusted weights to obtain the final weight matrix w for leaves, stems, and the whole plant. leaf(k) ,w stem(k) ,w whole(k) .

[0009] Furthermore, The range is 2.5-3.5.

[0010] Furthermore, The value is 3.

[0011] Furthermore, the adjustment range in step S713 is an adjustment constant. If it exceeds the upper limit, the weight increases the adjustment constant; if it exceeds the lower limit, the weight decreases the adjustment constant.

[0012] Another adjustment range can be set to adjust proportionally based on the degree to which the threshold is exceeded.

[0013] Furthermore, in step S3, P leaf-n(k) The calculation method includes the following steps: S31. Calculate the feature value fi of the leaf features extracted for each leaf; S32, Eigenvalue Standardization: Standardize the eigenvalue fi for each feature i; finorm = (fi - μi) / σi; Where fi is the original feature value; μi is the mean of the feature in the training set; σi is the standard deviation of the feature in the training set; and finorm is the standardized feature value. S33. Determine the weight matrix W(k,i) of the image features of different diseases K; S34. Calculate the base score S for each disease K. k (image): ; Where: b k This represents the prior probability of disease k when there is no feature information. S35. Calculate the preliminary probability of image features: The base score S k (image) converted to incidence probability P leaf-n(k) : .

[0014] Furthermore, the image feature weight matrix W(k,i) in step S33 is determined by the following method: W(k,i)=α·Wexpert+(1-α)·Wlearned; Where Wexpert is a weight matrix determined by experts based on experience; Wlearned is the weight matrix obtained through data-driven learning; α is the expert trust coefficient, α∈[0,1]. α is set manually and can be adjusted in a timely manner according to the operation.

[0015] Furthermore, μi and σi in step S32 are updated periodically: μi(new)=θ*μi(old)+(1-θ)*μi(newsample); ; Where θ is the forgetting factor, and the value of θ can be defined manually.

[0016] Furthermore, in step S34, b k It is calculated based on historical incidence rates: ; Pkprior represents the historical incidence probability of disease k over a past period of time.

[0017] Furthermore, the stem disease probability P in step S5 stem(k) And the probability of disease on the whole plant P in step S6 whole(k) The calculation method and P leaf-n(k) The calculation method is the same, except that the corresponding leaf features are replaced with stem features and plant features, and the weight matrix of leaf features is replaced with the weight matrix of stem features and plant features.

[0018] Furthermore, the leaf characteristics include at least one of the following: lesion area ratio, distribution dispersion, weighted average roundness, weighted average elongation, weighted average fractal dimension, hue skewness, and chromaticity dispersion.

[0019] Furthermore, the plant characteristics include at least one of the following: canopy structure volume index, leaf yellowing ratio, and apical wilting index.

[0020] Furthermore, the stem characteristics include at least one of the following: stem base melanization ratio, stem longitudinal stripe index, and stem base diameter abnormality rate.

[0021] The present invention also provides an image processing-based tobacco disease diagnosis model that can implement the above method.

[0022] Beneficial effects of this invention: (1) This invention can integrate the image features of leaves, stems and whole plants to achieve multi-part collaborative diagnosis, improve the comprehensiveness and accuracy of disease identification, realize the fusion of multi-source information, and effectively improve the accuracy of disease diagnosis.

[0023] (2) This invention introduces an expert trust coefficient, flexibly integrates expert experience weights and data learning weights, alleviates the overfitting problem under small sample size, improves model robustness, and realizes expert-data collaboration.

[0024] (3) By dynamically adjusting the weights of leaves, stems and whole plants based on typical disease characteristics, the model’s ability to adapt to atypical symptoms is enhanced, thus achieving adaptive weight adjustment. Detailed Implementation

[0025] The specific embodiments of the present invention will be further described below. It should be noted that these descriptions are for the purpose of aiding understanding the present invention, but do not constitute a limitation thereof. Furthermore, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0026] Example 1 A method for diagnosing tobacco diseases based on image processing includes the following steps: S1. Image Acquisition: Acquire raw images of flue-cured tobacco in the field, including overall images of the plant, stem images, and images of several leaves from the same plant; in this embodiment, the acquired images include top leaf images (3-5 images, showing new leaf symptoms), middle leaf images (3-5 images, showing typical symptoms), close-up images of the stem base (showing stem symptoms), overall side view of the plant (showing height and posture), and top view of the plant (showing canopy structure). S2. Image preprocessing: Preprocess the original images of flue-cured tobacco collected in the field; S3, Calculate P leaf-n(k) For each leaf image, leaf features are extracted, and the probability of disease on each leaf for different diseases K is calculated and denoted as P. leaf-n(k) K represents the disease, and leaf-n represents the nth leaf of the plant. S4. Leaf Evidence Aggregation: Based on the P of several leaves leaf-n(k) The weighted average disease probability P of the leaves was calculated. leaf(k) ; S5, Calculate P stem(k) Based on the plant stem images, stem features are extracted, and the probability P of stem disease in response to different diseases K is calculated. stem(k) ; S6, Calculate P whole(k) Based on the overall image of the plant, extract overall features and calculate the probability P of the plant developing different diseases K. whole(k) ; S7. Based on the calculated P leaf(k) P stem(k) P whole(k) The probability P of the plant based on image evidence was calculated. k ; S8. According to the calculated P K Sort the diseases from largest to smallest and output the probability P of the top few diseases. k The types of diseases are identified, and their corresponding image features are displayed.

[0027] Some tobacco diseases primarily affect the leaves, such as tobacco mosaic virus: leaves show obvious "mosaic" spots, alternating between dark and light green, sometimes accompanied by leaf twisting and deformity; tobacco red spot disease: circular or irregular brown lesions form on the leaves, with obvious concentric rings, distinct edges, and often a yellow halo around them. Some diseases show significant symptoms in the stem, such as tobacco black shank: the base of the stem blackens and rots, the plant is prone to lodging, and while leaves may wilt, this is not the primary characteristic; tobacco stem brown rot: the stem shows obvious discolored and rotten areas, and the leaves wilt secondarily. Some diseases present systemic symptoms, affecting the entire plant, such as tobacco bacterial wilt: initially some leaves wilt, later the entire plant wilts rapidly and dies, and a milky white bacterial ooze can be seen oozing from a cross-section of the stem; tobacco root-knot nematode disease: the plant grows slowly and is stunted, the leaves turn yellow and wilt, and the roots show typical nodular structures.

[0028] The above-mentioned image processing-based tobacco disease diagnosis method can integrate the image features of leaves, stems and whole plants to achieve multi-site collaborative diagnosis, improve the comprehensiveness and accuracy of disease identification, realize the fusion of multi-source information, and effectively improve the accuracy of disease diagnosis.

[0029] Specifically, in step S4, P leaf-(k) The calculation method includes the following steps: S41. Calculate the weights Wn of several blades:

[0030] Alesion,n is the area of ​​the nth leaf; Aleaf,n represents the total area of ​​several lesions on the nth leaf; It is a constant; S42, Calculate P leaf(k) : ; in: N is the total number of leaves analyzed; P leaf-n(k) Let n be the probability of disease K occurring on the nth leaf. Wn is the weight of the nth leaf.

[0031] By dynamically adjusting the weights of leaves, stems, and the whole plant based on typical disease characteristics, the model's adaptability to atypical symptoms is enhanced, achieving adaptive weight adjustment. In another embodiment, the selected typical disease characteristics can replace the lesion area ratio (i.e., Alesion,n / Aleaf,n) with other disease characteristics.

[0032] Specifically, in step S7, P k The calculation method includes the following steps: S71. Determine the weights of leaves, stems, and the whole plant, denoted as w. leaf(k) ,w stem(k) ,w whole(k) ; S72, Calculate P k : .

[0033] Specifically, the method in step S71 includes the following steps: S711. Based on experience, experts pre-determine an initial weight matrix for leaves, stems, and the whole plant for different diseases k; denoted as: w leaf(k)1 ,w stem(k)1 ,w whole(k)1 Satisfying w leaf(k)1 +w stem(k)1 +w whole(k)1 =1; S712. Preset a threshold range for the probability of disease on leaves, stems, and the whole plant for each disease k. S713. In actual diagnosis, based on the calculated P leaf(k) P stem(k) P whole(k) Each component is compared with its respective incidence probability threshold range. If the incidence probability threshold range is exceeded, the initial weight matrix is ​​adjusted to obtain the final weight matrix. The adjustment rule is: if the probability value is higher than the upper limit, it means that the symptoms of that part are very typical, so its weight is increased; if the probability value is lower than the lower limit, it means that the symptoms of that part are not obvious, so its weight is decreased. S714. Normalize the adjusted weights to obtain the final weight matrix w for leaves, stems, and the whole plant. leaf(k) ,w stem(k) ,w whole(k) .

[0034] Specifically, The range is 2.5-3.5.

[0035] Specifically, The value is 3.

[0036] Specifically, the adjustment range in step S713 is an adjustment constant. If it exceeds the upper limit, the weight increases the adjustment constant; if it exceeds the lower limit, the weight decreases the adjustment constant.

[0037] In another embodiment, the adjustment range can also be set to be adjusted proportionally based on the degree to which the threshold is exceeded.

[0038] The proposed scheme, which uses an initial weight matrix set by experts and dynamically adjusts the matrix based on the actual disease probability, is a "rule-based adaptive weight adjustment mechanism." This mechanism dynamically adjusts the importance of different evidence sources (leaves, stems, and the whole plant) according to the strength of real-time diagnostic evidence. Through dynamic weight adjustment, the system tends to support disease hypotheses with more consistent evidence, avoiding misjudgments caused by poor image quality of a single part (such as overexposure or blurring). If the probability of a certain part deviates significantly from the typical value, its weight is automatically reduced, thus more precisely simulating the attention allocation during expert diagnosis.

[0039] Specifically, in step S3, P leaf-n(k) The calculation method includes the following steps: S31. Calculate the feature value fi of the leaf features extracted for each leaf; S32, Eigenvalue Standardization: Standardize the eigenvalue fi for each feature i; finorm = (fi - μi) / σi; Where fi is the original feature value; μi is the mean of the feature in the training set; σi is the standard deviation of the feature in the training set; and finorm is the standardized feature value. S33. Determine the weight matrix W(k,i) of the image features of different diseases K; S34. Calculate the base score S for each disease K. k (image): ; Where: b k This represents the prior probability of disease k when there is no feature information. b k This can reflect the prevalence of diseases: some diseases are very common in certain regions or seasons (such as red spot disease in rainy areas), and even if the symptoms are not particularly obvious, they have a high probability of occurrence; while some diseases are very rare and require strong symptomatic evidence for diagnosis; by setting b k This allows for priority treatment of common diseases, which aligns with epidemiological principles.

[0040] S35. Calculate the preliminary probability of image features: The base score S k (image) converted to initial probability P leaf-n(k) : .

[0041] Specifically, the image feature weight matrix W(k,i) in step S33 is determined by the following method: W(k,i)=α·Wexpert+(1-α)·Wlearned; Where Wexpert is a weight matrix determined by experts based on experience; Wlearned is the weight matrix obtained through data-driven learning; α is the expert trust coefficient, α∈[0,1]. α is set manually and can be adjusted in a timely manner according to the operation.

[0042] Specifically, in this embodiment, Wlearned is calculated as follows: ; in: μk,i is the average value of the samples of disease K on feature i; μi is the average value of all samples on feature i; σi is the standard deviation of all samples on feature i; N represents the total number of all samples in the historical disease image database; Nk represents the total number of samples in the historical disease image database.

[0043] Traditional model weights are entirely data-driven, which can easily lead to model bias or overfitting in agricultural fields when there are insufficient samples or noisy annotations. This invention creatively introduces a controllable fusion mechanism by weighting a weight matrix Wexpert (determined by experts based on experience) and a weight matrix Wlearned (obtained through data-driven learning). By adjusting the expert trust coefficient α, the system can smoothly transition between expert-driven (when data is scarce) and data-driven (when data is abundant) modes, greatly improving the model's practicality and robustness.

[0044] Specifically, μi and σi in step S32 are updated periodically: μi(new)=θ*μi(old)+(1-θ)*μi(newsample); ; Where θ is the forgetting factor, and the value of θ can be defined manually.

[0045] In existing technologies, the normalization parameters of training data are usually fixed after model deployment, which cannot adapt to feature distribution drift caused by changes in environment and variety. This invention updates μi and σi periodically, enabling the system to adaptively track changes in feature distribution over time and in the environment, continuously maintaining consistency in feature scale, thereby ensuring long-term recognition accuracy, which is difficult to achieve with static models.

[0046] Specifically, in step S34, b k It is calculated based on historical incidence rates: ; Pkprior represents the historical incidence probability of disease k over a past period of time.

[0047] In another embodiment, b k Alternatively, it can be determined by experts based on experience or by logistic regression based on training data.

[0048] Specifically, the probability of stem disease P in step S5 stem(k) And the probability of disease on the whole plant P in step S6 whole(k) The calculation method and P leaf-n(k) The calculation method is the same, except that the corresponding leaf features are replaced with stem features and plant features, and the weight matrix of leaf features is replaced with the weight matrix of stem features and plant features.

[0049] Specifically, leaf characteristics include at least one of the following: lesion area ratio, distribution dispersion, weighted average roundness, weighted average elongation, weighted average fractal dimension, hue skewness, and hue dispersion.

[0050] Specifically, plant characteristics include at least one of the following: canopy structure volume index, leaf yellowing rate, and apical wilting index.

[0051] Specifically, stem characteristics include at least one of the following: stem base melanization ratio, stem longitudinal stripe index, and stem base diameter abnormality rate.

[0052] In this embodiment, the calculation methods for area ratio, distribution dispersion, weighted average roundness, weighted average elongation, weighted average fractal dimension, hue skewness, hue dispersion, canopy structure volume index, leaf yellowing ratio, apical wilting index, stem base blackening ratio, stem longitudinal stripe index, and stem base diameter anomaly rate are as follows: (1) The characteristic value f1 of the area ratio of lesions is calculated as follows: 1. Image Preprocessing and Leaf Segmentation: The original RGB image is converted to a color space more suitable for segmentation (such as HSV or Lab). Utilizing the significant differences in color (such as green channel, saturation) and texture between healthy leaf tissue and the background, the entire leaf region is extracted using thresholding, edge detection, or machine learning models (such as U-Net) to obtain the leaf mask. The total number of pixels within this mask is calculated, which is the leaf.

[0053] 2. Within the extracted leaf area, secondary segmentation is performed based on the color difference between lesions and healthy tissue: Specifically, a threshold segmentation method can be selected: In terms of saturation (S), brightness (V), or specific color components, the numerical range of lesions (usually appearing as yellow, brown, black, or white) differs significantly from that of healthy green areas. A binary mask of the lesion is obtained by setting a threshold or automatically determining the threshold using the Otsu method. The total number of pixels within the lesion mask is then calculated, which is the lesion.

[0054] Alternatively, machine learning segmentation can be used: pre-trained semantic segmentation models (such as U-Net and DeepLab) are used to directly classify the input image at the pixel level and output the lesion region. This method works better for complex lesions with blurred boundaries.

[0055] The total number of pixels within the lesion mask is the Alesion.

[0056] 3. Area Calculation and Ratio Determination: Count the total number of white pixels in the leaf mask and the lesion mask respectively, and use this count as the area of ​​each. Substitute this count into the following formula: f1 = Alesion / Aleaf.

[0057] (2) The method for calculating the characteristic value f2 of lesion distribution dispersion is as follows: 1. Locating the geometric center of lesions: First, identify all independent lesion regions on the leaf using image segmentation technology. For each lesion, calculate its geometric center coordinates (xi, yi); where i = 1, 2, 3, ..., r; r is the total number of lesions on the leaf. The geometric center coordinates are obtained by averaging the coordinates of all pixels within the lesion region. 2. Calculate the standard deviation of coordinates: Based on the centroid coordinates of all lesions, calculate the standard deviation σx of the x-coordinate sequence and the standard deviation σy of the y-coordinate sequence respectively; 3. Composite dispersion index f2: ; f2 represents the distribution dispersion. The larger the f2 value, the more dispersed the lesions are on the leaves; the smaller the value, the more concentrated the distribution.

[0058] Where σx and σy are the standard deviations of the centroid coordinates of all lesions in the x-axis and y-axis directions, respectively.

[0059] (3) The eigenvalue f3 of the weighted average circularity is calculated as follows: First, calculate f3,r separately for each lesion on the leaf; f3,r=4π*Alesion / P 2 ; Where r represents the number of discrete lesions on the leaf; P is the perimeter of the lesion; Then, for the calculated r f3,r values, calculate the weighted average circularity f3 on the blade: f3 is calculated using the area-weighted average method: ; (4) The eigenvalue f4 of the weighted average elongation is calculated as follows: First, calculate f4,r separately for each lesion on the leaf; f4,r=Lmajor / Lminor; Where Lmajor is the length of the major axis of the lesion; Lminor is the length of the minor axis of the lesion; Then, for the r calculated f4,r values, calculate the weighted average circularity f4 of the blade: f4 is calculated using the area-weighted average method: ; (5) The formula for calculating the eigenvalue f5 of the weighted average fractal dimension is as follows: First, calculate the fractal dimension f5,r for each lesion on the leaf individually; f5,r=log(N(q)) / log(1 / q); Where N(q) is the number of boxes covering the lesions; q is the size of the box.

[0060] Then, for the calculated r f5,r values, calculate the weighted average f5 dimension of the blade: f5 is calculated using the area-weighted average method: ; (6) The eigenvalue f6 of the hue bias is calculated as follows: 1. Image segmentation and region extraction: Use segmentation techniques (thresholding or machine learning models) to accurately separate lesion regions from leaf images. Obtain a binary mask for this region.

[0061] 2. Color space conversion: Convert the original RGB image to the HSV (or HSL / HSI) color space, which is more in line with human vision for color perception.

[0062] 3. Extract the lesion tone array: Using the lesion mask obtained in step 1, extract the tone values ​​of all pixels located within the lesion area from the H channel image, forming an array {H1, H2, ..., H...} containing N tone values. N}

[0063] 4. Calculate the hue skewness: Calculate the mean μ of the hue value array. H and standard deviation σ H Then calculate the hue shift f6 using the following formula: ; Where H j Let be the hue value of the j-th pixel within the lesion area; μ H σ is the mean of the tonal values ​​of all pixels within the lesion area. H denoted as , where is the standard deviation of the hue values ​​of all pixels within the lesion area, and N is the total number of pixels within the lesion area.

[0064] f6>0 indicates that the data is right-skewed, with more pixels having high hue values ​​(such as yellowish or brownish); f6<0 indicates that the data is left-skewed, with more pixels having low hue values ​​(such as greenish); f6 close to 0 indicates that the distribution is symmetrical.

[0065] (7) The eigenvalue f7 of the chromaticity dispersion is calculated as follows: 1. Image segmentation and region extraction: Use segmentation techniques (thresholding or machine learning model) to accurately separate the lesion region from the leaf image and obtain the binary mask of the region.

[0066] 2. Color space conversion: Convert the original RGB image to the HSV (or HSL / HSI) color space; 3. Extract the saturation array of lesions: Using a lesion mask, extract the saturation values ​​of all pixels located within the lesion region from the S-channel image to form an array {S1, S2, ..., S...} containing N saturation values. N}; 4. Calculate the chromaticity dispersion: Calculate the mean μ of the saturation value array. S And calculate the chromaticity dispersion f7 according to the following formula: ; The larger the value of f7, the greater the difference between bright and dark areas within the lesion, and the more uneven the color; the smaller the value, the more uniform the color.

[0067] (8) The eigenvalue f8 of the canopy structure volume index is calculated as follows: 1. 3D data acquisition: Use multi-view stereo vision (SfM), lidar (LiDAR) or depth camera to acquire images or point cloud data of crop canopy from different angles.

[0068] 2. 3D Reconstruction and Alignment: Dense 3D point clouds are generated using algorithms such as SfM and then unified into a coordinate system based on the ground.

[0069] 3. Generate Canopy Height Model (CHM): Divide the horizontal plane into a regular grid. For each grid, calculate the maximum value (or a specific quantile) of the height of all point clouds within it as the canopy height of that grid. zij. Ground height can be obtained by fitting the lowest point or using a filtering algorithm (such as cloth simulation filtering), where zij is the difference between the canopy top height and the ground elevation.

[0070] 4. Numerical Integration: Sum the heights of all grid cells in the CHM, then multiply by the area of ​​a single grid cell. Δx*Δy gives the canopy volume f8: ; The larger the f8 value, the more lush and healthier the plant.

[0071] (9) The characteristic value f9 of the yellowing ratio is calculated as follows: 1. Leaf Region Segmentation: Separate the leaf region from the image, excluding the background (soil, sky, etc.). This can be achieved using the supergreen index, threshold segmentation, or semantic segmentation model to obtain the leaf mask and calculate Aleaf.

[0072] 2. Color Space Conversion and Channel Extraction: Convert the RGB image of the leaf area to the HSV color space. Extract the H (hue) channel. Hue values ​​directly reflect the type of color (e.g., green, yellow, orange).

[0073] 3. Define the hue threshold for "yellowing" and calculate the area: Based on a large number of samples, define the hue range that falls within the yellowing range (e.g., Hlow≤H≤Hhigh). Typically, the Hue value of healthy green is around 35°~90° (depending on the spatial definition), while the typical yellowing hue range may be between 20°~60° or 25°~45°. Within the leaf mask, count the total number of pixels whose hue values ​​fall within this threshold range; this is the Yellow hue.

[0074] 4. Calculate the yellowing ratio f9 using the following formula: :f9=(Ayellow / Aleaf)×100%; Ayellow: The pixel area of ​​the leaf that is judged to be "yellowed"; Aleaf: Total pixel area of ​​the leaf.

[0075] (10) The characteristic value f10 of the apical wilting index is calculated as follows: 1. Plant segmentation: Separate the plant outline from the background to obtain a binary mask (which can be achieved through color thresholding or semantic segmentation).

[0076] 2. Identify key points: Stem base point B: Take the midpoint of the lowest end of the mask (or the junction of the stem and the ground).

[0077] Actual apex point A: Take the uppermost point of the mask (or the apical growth point).

[0078] Expected highest point E: Determined by taking the typical height Hplant of a healthy plant from the base point B and moving vertically upwards, or by taking the highest point of the mask in the vertical direction (if the plant is completely upright).

[0079] 3. Calculate key parameters: Plant height Hplant: The vertical distance (pixel difference) between the base point B and the expected highest point E.

[0080] The vertical distance d is the actual apex point A and the expected highest point E (if A is lower than E, then d = yA - yE; in the image coordinate system, the y-axis is positive downwards).

[0081] 4. Calculate the apical wilting index f10: f10 = (d / Hplant) × 100%; The larger the f10 value, the more severe the drooping at the tip.

[0082] If the number of lesions r is large (r>50), you can set it to only calculate the features of the top 20 lesions with the largest area, i.e., set r=20. The specific number can be adjusted flexibly.

[0083] (11) The characteristic value f11 of the stem base melanization ratio is calculated as follows: The definition of stem base blackening percentage: The percentage of the total surface area of ​​the stem near the ground (usually a 0-10 cm region) where the necrotic area is black or brown. This percentage directly quantifies the degree of stem base necrosis caused by diseases such as black shank. The higher the percentage, the more severe the disease.

[0084] ; in: N total Represents the total number of pixels in the stem base region; N dark This represents the number of pixels that are identified as "blackened" within the defined stem base area; (12) The characteristic value f12 of the longitudinal stripe index of the stem is calculated as follows: The definition of the stem longitudinal stripe index: It is used to quantify the prominence of longitudinal, elongated stripes appearing on the stem surface. It combines the two attributes of "longitudinality" and "continuity" of the stripes. This index effectively distinguishes the typical longitudinal stripe-like necrosis caused by diseases such as black shank from the possible circular or transverse lesions caused by diseases such as red star disease. The higher the index, the more pronounced the longitudinal stripe feature.

[0085] ; in: M represents the number of connected regions of all potential lesions detected in the image; i represents the i-th connected region; The continuity score (between 0 and 1) represents the i-th region, calculated based on its aspect ratio and fill factor; the thinner and denser the region, the higher the score. This represents the angle between the main axis direction of the i-th region and the central axis (vertical direction) of the stem; This represents the vertical score. The smaller the angle (closer to perpendicular), the closer this value is to 1; the larger the angle (closer to horizontal), the closer this value is to 0.

[0086] (13) The characteristic value f13 of the abnormal stem base diameter rate is calculated as follows: Definition of stem base diameter abnormality rate: This quantifies the degree of abnormality in stem swelling or shrinkage by comparing the diameter of the stem base of the tested plant with the baseline diameter of a healthy plant. A Ranomaly significantly greater than 0 indicates swelling, possibly caused by root-knot nematode disease or other pathogenic factors. A Ranomaly significantly greater than 0 combined with a high melanosis rate suggests necrosis and mild swelling caused by diseases such as blackleg. Combined with the wilting index: This can be used to differentiate diseases causing shrinkage (such as the late stages of severe bacterial wilt).

[0087] ;or

[0088] in: D measured This represents the diameter of the stem base of the plant being tested, as measured from the image. D healthy The reference diameter represents the base of the stem of a healthy plant of the same variety and at the same growth stage.

[0089] In another embodiment, image features can be flexibly added or removed, and the types of leaf features, plant features, and stem features, as well as the calculation method of feature values, can be flexibly adjusted according to the actual situation.

[0090] Example 2 A tobacco disease diagnosis model based on image processing that can implement the above method.

[0091] The embodiments of the present invention have been described in detail above, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and these variations still fall within the protection scope of the present invention.

Claims

1. A method for diagnosing tobacco diseases based on image processing, characterized in that: Includes the following steps: S1. Image Acquisition: Acquire raw images of flue-cured tobacco in the field, including overall images of the plant, images of the stem, and images of several leaves from the same plant; S2. Image preprocessing: Preprocess the original images of flue-cured tobacco collected in the field; S3, Calculate P leaf-n(k) For each leaf image, leaf features are extracted, and the probability of disease on each leaf for different diseases K is calculated and denoted as P. leaf-n(k) K represents the disease, and leaf-n represents the nth leaf of the plant. S4. Leaf Evidence Aggregation: Based on the P of several leaves leaf-n(k) The weighted average disease probability P of the leaves was calculated. leaf(k) ; S5, Calculate P stem(k) Based on the plant stem images, stem features are extracted, and the probability P of stem disease in response to different diseases K is calculated. stem(k) ; S6, Calculate P whole(k) Based on the overall image of the plant, extract overall features and calculate the probability P of the plant developing different diseases K. whole(k) ; S7. Based on the calculated P leaf(k) P stem(k) P whole(k) The probability P of plant developing disease K was calculated. k ; S8. According to the calculated P K Sort the diseases from largest to smallest and output the incidence probability P of the top few diseases. k The types of diseases are identified, and their corresponding image features are displayed.

2. The tobacco disease diagnosis method based on image processing according to claim 1, characterized in that: In step S4, P leaf-(k) The calculation method includes the following steps: S41. Calculate the weights Wn of several blades: , Alesion,n is the area of ​​the nth leaf; Aleaf,n represents the total area of ​​several lesions on the nth leaf; It is a constant; S42, Calculate P leaf(k) : ; in: N represents the total number of leaves analyzed; P leaf-n(k) Let n be the probability of disease K occurring on the nth leaf. Wn is the weight of the nth leaf.

3. The tobacco disease diagnosis method based on image processing according to claim 1, characterized in that: In step S7, P k The calculation method includes the following steps: S71. Determine the weights of leaves, stems, and the whole plant, denoted as w. leaf(k) ,w stem(k) ,w whole(k) ; S72, Calculate P k : 。 4. The tobacco disease diagnosis method based on image processing according to claim 3, characterized in that: The method in step S71 includes the following steps: S711. Based on experience, experts pre-determine an initial weight matrix for leaves, stems, and the whole plant for different diseases k; denoted as: w leaf(k)1 ,w stem(k)1 ,w whole(k)1 Satisfying w leaf(k)1 +w stem(k)1 +w whole(k)1 =1; S712. Preset a threshold range for the probability of disease on leaves, stems, and the whole plant for each disease k. S713. In actual diagnosis, based on the calculated P leaf(k) P stem(k) P whole(k) Each component is compared with its respective incidence probability threshold range. If the incidence probability threshold range is exceeded, the initial weight matrix is ​​adjusted to obtain the final weight matrix. The adjustment rule is: if the probability value is higher than the upper limit, it means that the symptoms of that part are very typical, and its weight is increased. If the probability value is below the lower limit, it indicates that the symptoms in that area are not obvious, and its weight should be reduced. S714. Normalize the adjusted weights to obtain the final weight matrix w for leaves, stems, and the whole plant. leaf(k) ,w stem(k) ,w whole(k) .

5. The tobacco disease diagnosis method based on image processing according to claim 1, characterized in that: In step S3, P leaf-n(k) The calculation method includes the following steps: S31. Calculate the feature value fi of the leaf features extracted for each leaf; S32, Eigenvalue Standardization: Standardize the eigenvalue fi for each feature i; finorm = (fi - μi) / σi; Where fi is the original feature value; μi is the mean of the feature in the training set; σi is the standard deviation of the feature in the training set; and finorm is the standardized feature value. S33. Determine the weight matrix W(k,i) of the image features of different diseases K; S34. Calculate the base score S for each disease K. k (image): ; Where: b k This represents the prior probability of disease k when there is no feature information. S35. Calculate the preliminary probability of image features: The base score S k (image) converted to the probability of disease incidence P leaf-n(k) : 。 6. The tobacco disease diagnosis method based on image processing according to claim 5, characterized in that: The image feature weight matrix W(k,i) in step S33 is determined by the following method: W(k,i)=α·Wexpert+(1-α)·Wlearned; Where Wexpert is a weight matrix determined by experts based on experience; Wlearned is the weight matrix obtained through data-driven learning; α is the expert trust coefficient, α∈[0,1]. α is set manually and can be adjusted in a timely manner according to the operation.

7. The tobacco disease diagnosis method based on image processing according to claim 5, characterized in that: μi and σi in step S32 are updated periodically: μi(new)=θ*μi(old)+(1-θ)*μi(newsample); ; Where θ is the forgetting factor, and the value of θ can be defined manually.

8. The tobacco disease diagnosis method based on image processing according to claim 5, characterized in that: In step S34, b k It is calculated based on historical incidence rates: ; Pkprior represents the historical incidence probability of disease k over a past period of time.

9. The tobacco disease diagnosis method based on image processing according to any one of claims 5-8, characterized in that: The probability of stem disease P in step S5 stem(k) And the probability of disease on the whole plant P in step S6 whole(k) The calculation method and P leaf-n(k) The calculation method is the same, except that the corresponding leaf features are replaced with stem features and plant features, and the weight matrix of leaf features is replaced with the weight matrix of stem features and plant features.

10. A tobacco disease diagnosis model based on image processing, characterized in that: It can realize the tobacco disease diagnosis method based on image processing as described in any one of claims 1-9.