Image-based early identification method and system for main diseases and insect pests of watermelons

By constructing a unified geometric reference and orientation field for watermelon and melon leaves and stems, and combining differential driving and feature anchor point recognition, the problem of accuracy and consistency in early identification of watermelon and melon diseases under greenhouse conditions was solved, and stable disease classification was achieved.

CN121280801APending Publication Date: 2026-01-06SHANGHAI ACAD OF AGRI SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511627522.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2026-01-06

AI Technical Summary

Technical Problem

Existing technologies struggle to reliably and interpretably identify early lesions of downy mildew, powdery mildew, and vine blight in watermelons and melons under greenhouse conditions. In particular, the lack of a unified geometric reference and parameter management in leaf and stem images leads to insufficient accuracy and consistency in identification.

Method used

By acquiring images of the front of the leaves and the unobstructed stems, a unified geometric reference for the leaves and stems is constructed. The directional field is extracted, a detection sub-region is generated, differential sequence analysis is performed, suspected lesion areas are identified, the stripe interval statistics are calculated, feature anchor points are determined, and the directional proportionality coefficient is used for verification to output the disease category.

Benefits of technology

Under conditions of low contrast and equipment differences, stable identification and accurate classification of watermelon and melon diseases were achieved, improving the consistency and recall rate of identification across equipment and time periods, and reducing reliance on manual inspection and false alarm rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121280801A_ABST
    Figure CN121280801A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image recognition, and discloses an image-based early recognition method and system for main diseases and insect pests of watermelons, and the method comprises the steps: collecting images of the front surfaces of leaves and unshielded stalks, and recording space-time identifiers; segmenting leaves and stalks, and extracting a vein skeleton and a stalk long axis to generate tangential, normal, axial and circumferential direction fields; in the sub-regions divided in the reference direction, indexes are constructed according to color difference, texture difference and edge difference, adjacent difference is carried out, and suspected regions are screened according to threshold values; fringes are extracted in the suspected area, risk strips are reserved according to the variable coefficient of the adjacent center distance, and feature strips are formed through reinspection in the adjacent area by means of end points and anchor points; and projecting the main vectors of the characteristic strips to a direction field to obtain two directional proportionality coefficients, rechecking downy mildew, powdery mildew and gummy stem blight evidences in combination with a parameter set, and outputting categories or uncertainty. The method has the advantages of being stable and explainable in early-stage small scab detection and typing under the greenhouse fixed imaging condition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition technology, and more specifically, to an image-based method and system for early identification of major diseases and pests affecting watermelons and melons. Background Technology

[0002] Watermelon and melon are important economic crops in greenhouse cultivation. Downy mildew, powdery mildew, and stem blight can occur from the seedling stage to the fruiting stage. In the early stages, the lesions are small in area and have low contrast, making them easily confused with physiological spots and mechanical damage. Greenhouse fixed cameras are limited by their viewing angle and shading, and can usually only acquire images of the front of the leaves and the unobstructed stems. It is difficult to reliably acquire images of the back of the leaves, resulting in insufficient distinguishable information about downy mildew and powdery mildew in the early stages. Variations in field light, differences in equipment, and cluttered backgrounds further reduce the early detection rate and the ability to distinguish between different types of diseases.

[0003] Current disease monitoring mainly includes manual inspection and image-based classification and identification. Manual inspection relies on experience, is inefficient and inconsistent, and is difficult to scale up and perform in real time. Conventional image classification often focuses on single features such as color or texture, and is not robust enough to small targets, low contrast, and isomorphic interference. It also has difficulty distinguishing the differences in patterns of vein extension versus vertical vein extension, as well as the differences in geometric features between axially stretched streaks and circumferentially asymmetrical streaks on stems.

[0004] To improve interpretability, some methods introduce saliency maps or attention heatmaps, but the outputs are mostly unstructured, making it difficult to establish a one-to-one evidence chain with geometric references such as leaf veins, leaf margins, and stem long axes. Inconsistencies in white balance, color response, and spatial scale across time periods and devices cause empirical settings for thresholds and weights to drift in different scenarios, making it difficult to reproduce experimental results. The utilization of time-series re-enhancing is also weak, generally lacking a quantification mechanism to decompose boundary changes into leaf tangential and normal directions, as well as stem axial and circumferential directions, making it difficult to form stable time-series evidence.

[0005] In summary, under the constraints of fixed collection in greenhouses, existing technologies lack a unified geometric reference for leaves and stems, a framework that can link and judge structured indicators such as color difference, texture difference, edge difference, strip spacing distribution, and directional ratio, and a calibrable and traceable parameter management and verification mechanism. As a result, there are still significant deficiencies in the early, stable, and interpretable identification of downy mildew, powdery mildew, and vine blight. Summary of the Invention

[0006] In view of this, the present invention proposes an image-based method and system for early identification of major diseases and pests of watermelon and melon, in order to solve the above problems.

[0007] This invention proposes an image-based method for early identification of major diseases and pests in watermelons and melons, comprising: S1: Collect images of the front of the leaves and the unobstructed stem of the target plant, and record the time and location markers. S2: Segment the leaf region and stem region in the frontal image of the leaf and the unobstructed stem image, extract the leaf vein skeleton and fit the long axis of the stem to generate the tangential direction field and normal direction field of the leaf, as well as the axial direction field and circumferential direction field of the stem. S3: Divide the leaf region and stem region into multiple detection sub-regions, and generate sampling sequences for the detection sub-regions along the tangential direction of the leaf or the axial direction of the stem; S4: Subtract the index values ​​of adjacent sampling points in the sampling sequence point by point to obtain the difference sequence, and use the amplitude of the difference sequence as the fluctuation index; the index value is obtained by normalized weighted sum of color difference, texture difference and edge difference; S5: When a fluctuating index in a detection sub-region exceeds the fluctuation threshold, the detection sub-region is identified as a suspected lesion sub-region. S6: Identify stripe sets in the suspected lesion sub-region and calculate the interval statistics of the stripe sets; the interval statistics; S7: Obtain the distribution coefficient based on the interval statistics of the stripe set. When the distribution coefficient exceeds the distribution threshold, the stripe set is identified as a risk stripe. S8: Determine feature anchor points within the risk strip and record the image coordinates of the feature anchor points; S9: Based on the feature anchor points, re-identify the stripe set in adjacent detection sub-regions and determine the second risk stripe; S10: Review the risk bands based on the determined directional proportional coefficients and parameter set, and output the downy mildew category, powdery mildew category, vine blight category, or output uncertainty.

[0008] Further, step S4 includes: The sampling sequences along the leaf tangential direction or stem axial direction within the detection sub-region are arranged in the sampling order, and the index difference between adjacent sampling points is calculated. The absolute value of the index difference is used as the fluctuation index.

[0009] Further, step S5 includes: When at least one fluctuation index in the detection sub-region exceeds the fluctuation threshold, the current detection sub-region is marked as a suspected lesion sub-region.

[0010] Further, step S7 includes: Calculate the spacing between the centers of adjacent stripes within the risk stripe to obtain the spacing sequence; The variability of the interval sequence is used as the distribution coefficient. When the distribution coefficient is less than or equal to the distribution threshold, the current risk band is removed. The interval statistics are obtained through the following method: Extract the stripe centerlines from the stripe set and obtain the coordinates of each stripe center. Sort the stripe centers according to the reference direction, which can be the leaf tangential direction or the stem axial direction. Calculate the shortest distance between two adjacent stripe centers to form a spacing sequence. Remove stripe centerlines with a length less than the minimum stripe length from the spacing sequence and trim the percentiles at both ends of the spacing sequence, removing outliers based on the absolute deviation of the median. When the number of valid samples is less than 3, do not output the interval statistics and mark the detection sub-region as uncertain. When the number of valid samples is greater than or equal to 3, output the mean, standard deviation, coefficient of variation, interquartile range, and at least one percentile value of the spacing sequence. The distribution coefficient is the coefficient of variation of the sequence of center-line spacing between adjacent stripes.

[0011] Further, step S8 includes: Select the risk bands that were not removed in step S7. When the endpoint of the risk band is located on the leaf boundary or stem boundary, use the endpoint as the feature anchor point. When the endpoint of the risk strip is not located on the leaf boundary or stem boundary, a strong response point is determined in the neighborhood of the endpoint according to the gradient extremum, and the strong response point is used as the feature anchor point.

[0012] Further, step S9 includes: Using the feature anchor point as a reference, steps S5 and S6 are executed again in adjacent detection sub-regions to obtain the second risk strip; When a risk band and a second risk band meet the pairing condition, the two bands are marked as a set of feature bands. The pairing conditions are that the distance between the endpoints of the two strips is less than the endpoint distance threshold and the directional difference between the two strips is less than the directional difference threshold; the endpoint distance threshold is the larger of 5% of the length of the longer strip and 20 pixels, and the directional difference threshold is 15 degrees.

[0013] Furthermore, it also includes the steps for calculating the directional scaling factor: By pairing the endpoints of each feature strip set together, calculating the distance between the endpoints, and selecting the two endpoints with the largest distance to form a direction vector; The component of the direction vector in the axial direction field of the stem is taken as the axial component, and the component of the direction vector in the circumferential direction field of the stem is taken as the circumferential component. The ratio of the axial component to the circumferential component is calculated to obtain the first directional proportionality coefficient. The component of the direction vector in the tangential direction field of the blade is taken as the tangential component, and the component of the direction vector in the normal direction field of the blade is taken as the normal component. The ratio of the tangential component to the normal component is calculated to obtain the second directional proportionality coefficient.

[0014] Furthermore, it also includes parameter set adjustment steps: When the second directional proportionality coefficient is greater than the cutting threshold and the centroid of the feature strip set is located within the leaf region, increase the weight of downy mildew evidence. When the first directional proportionality coefficient is greater than the circumferential threshold, increase the weight of the evidence for anthracnose. When the first directional proportionality coefficient and the second directional proportionality coefficient both fall into the symmetrical interval and the area growth rate per unit time is not less than the area threshold, the weight of the powdery mildew evidence is increased.

[0015] Further, step S10 includes: Calculate the downy mildew evidence score, which is a weighted sum of the vein restriction intensity score and the color difference score; Calculate the powdery mildew evidence score, which is a weighted sum of the particle uniformity score and the isotropic score; Calculate the evidence score for vine blight, which is a weighted sum of the axial elongation score and the point cluster colocation score; The three types of evidence scores are combined with the evidence weights obtained in the parameter set adjustment step to form three final scores, and the category corresponding to the maximum value of the three final scores is selected as the output category. When the ratio of the difference between the maximum and the second largest value to the maximum value is less than the uncertainty threshold or the maximum value is less than the lower limit of certainty, the output is uncertain. The parameter set includes uncertainty threshold, lower determinism threshold, tangent threshold, circumferential threshold, upper and lower limits of symmetry interval, area threshold, weights of three types of evidence, minimum strip length, endpoint distance threshold, direction difference threshold, and statistical parameters used to determine distribution threshold and fluctuation threshold.

[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention constructs a unified geometric reference and orientation field for leaves and stems under fixed greenhouse sampling conditions. It combines differentially driven suspected screening, stripe set interval statistics and distribution coefficient screening, feature anchor point-based multiple neighbor retrieval, and directional evidence fusion composed of a first and second directional proportionality coefficient. This forms a closed-loop identification link from candidate generation to structured verification, enabling early small lesions to be stably detected and accurately classified even under low contrast, isomorphic interference, and equipment differences. This link uses joint significance score-driven sampling differential to locate mutations, uses the coefficient of variation of stripe spacing to measure uneven aggregation and dispersion, generates feature stripe sets through quantifiable pairing of endpoint distance and orientation difference, and then uses the tangential and normal directions of leaf veins... Geometric constraints are achieved by projecting the axial and circumferential directions of the stem, thereby differentiating the vein-spreading pattern of downy mildew, the isotropic granular pattern of powdery mildew, and the axial stretching accompanied by circumferential asymmetry of anthracnose under the same indicator system. At the same time, the parameter set manages key parameters such as thresholds, weights, windows, and lengths in a versioned manner. Fluctuation thresholds and distribution thresholds can be robustly and adaptively based on health references and historical windows. The results management module records all intermediate quantities and parameter versions to support reproduction and auditing. Combined with uncertain outputs and re-collection guidance, online risk control and enhanced sampling loop are achieved. Overall, the consistency across devices and time periods, the recall rate and interpretability of early identification are improved, and the operation and maintenance costs caused by reliance on manual inspection and false alarms are reduced.

[0017] On the other hand, the present invention also provides an image-based early identification system for major diseases and pests of watermelon and melon, applied to the above-mentioned method, the system comprising: The image acquisition module collects frontal images of the leaves and unobstructed stems of the target plant, and records the time and location markers. The reference module is configured to segment the leaf region and stem region in the frontal image of the leaf and the unobstructed stem image, extract the leaf vein skeleton and fit the long axis of the stem, and generate the tangential direction field and normal direction field of the leaf, as well as the axial direction field and circumferential direction field of the stem. The region division module is configured to divide the leaf region and stem region into multiple detection sub-regions, and generate sampling sequences for the detection sub-regions along the tangential direction of the leaf or the axial direction of the stem. The difference calculation module is configured to calculate the difference between the index values ​​of adjacent sampling points in the sampling sequence to obtain the difference sequence, and use the amplitude of the difference sequence as the fluctuation index. The suspected screening module is configured to identify a sub-region as a suspected lesion sub-region when a fluctuating index within the detection sub-region exceeds the fluctuation threshold. The stripe recognition module is configured to identify stripe sets in suspected lesion sub-regions and calculate the interval statistics of the stripe sets; The stripe screening module is configured to obtain the distribution coefficient based on the interval statistics of the stripe set, and when the distribution coefficient exceeds the distribution threshold, the stripe set is identified as a risk stripe. The anchor point determination module is configured to determine feature anchor points within the risk strip and record the image coordinates of the feature anchor points; The re-neighbor retrieval module is configured to re-identify stripe sets in adjacent detection sub-regions based on feature anchor points and determine the second risk stripe. The category discrimination module is configured to review the risk bands based on the determined directional proportion coefficient and parameter set, and output the downy mildew category, powdery mildew category, vine blight category, or output uncertainty.

[0018] It should be noted that the image-based early identification system for major diseases and pests of watermelon and melon of the present invention has the same beneficial effects as its method, and will not be described in detail here. Attached Figure Description

[0019] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart illustrating an image-based method for early identification of major diseases and pests in watermelons and melons, provided as an embodiment of the present invention.

[0020] Figure 2 This is a functional framework diagram of an image-based early identification system for major diseases and pests of watermelons and melons, provided in an embodiment of the present invention. Detailed Implementation

[0021] Exemplary embodiments disclosed in this application will now be described in more detail with reference to the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0022] See Figure 1 As shown, this embodiment of the invention provides an image-based method for early identification of major diseases and pests in watermelons and melons, including: S1: Collect images of the front of the leaves and the unobstructed stem of the target plant, and record the time and location markers. S2: Segment the leaf region and stem region in the frontal image of the leaf and the unobstructed stem image, extract the leaf vein skeleton and fit the long axis of the stem to generate the tangential direction field and normal direction field of the leaf, as well as the axial direction field and circumferential direction field of the stem. S3: Divide the leaf region and stem region into multiple detection sub-regions, and generate sampling sequences for the detection sub-regions along the tangential direction of the leaf or the axial direction of the stem; S4: Subtract the index values ​​of adjacent sampling points in the sampling sequence point by point to obtain the difference sequence, and use the amplitude of the difference sequence as the fluctuation index; the index value is obtained by normalized weighted sum of color difference, texture difference and edge difference; S5: When a fluctuating index in a detection sub-region exceeds the fluctuation threshold, the detection sub-region is identified as a suspected lesion sub-region. S6: Identify stripe sets in suspected lesion sub-regions and calculate the interval statistic of the stripe sets; interval statistic; S7: Obtain the distribution coefficient based on the interval statistics of the stripe set. When the distribution coefficient exceeds the distribution threshold, the stripe set is identified as a risk stripe. S8: Determine feature anchor points within the risk strip and record the image coordinates of the feature anchor points; S9: Based on the feature anchor points, re-identify the stripe set in adjacent detection sub-regions and determine the second risk stripe; S10: Review the risk bands based on the determined directional proportional coefficients and parameter set, and output the downy mildew category, powdery mildew category, vine blight category, or output uncertainty.

[0023] Specifically, in step S1, tripod cameras and ring lights are placed every 2 meters along the main aisle in the greenhouse. The lens focal length is fixed at 35mm equivalent, the resolution is no less than 4000×3000 pixels, the shutter speed is 1 / 200 second, the ISO is 100 to 400, and the aperture is f / 8. The camera height is 1.4 meters above the ground, and the lens is at an angle of about 30 degrees to the row direction to avoid strong specular reflection. Each plant is photographed twice: once to obtain a frontal image of the leaf aligned with the normal direction of the largest leaf surface, and once to obtain an unobstructed image of the stem aligned with the side and front of the main stem along the row direction. Each photograph is recorded with a timestamp, camera number, row number, column number, and distance from the beginning of the row, in centimeters. The camera pose is obtained through a one-time intrinsic and extrinsic parameter calibration using a checkerboard or dot grid, and the calibration result is saved as a parameter version number. A unique identifier is generated immediately after photographing the same plant, following the rule of date plus camera number plus row number plus column number, for subsequent time-series matching and re-photo alignment.

[0024] Step S2 involves inputting the frontal image of the leaf and the unobstructed stem image into the segmentation and reference establishment pipeline, respectively. First, white balance and distortion are corrected in one step using color mapping and distortion parameters obtained from a calibration board. Then, the green vegetation index is calculated and coarsely segmented using a color threshold to obtain an initial foreground mask. The initial mask and the original image are fed into a semantic segmentation model (e.g., a lightweight encoder plus a depthwise separable convolutional decoder), with categories including leaves, stems, and background, outputting a binary mask. The leaf mask is then refined and subjected to vein filtering, with multi-scale fusion at filtering scales from 0.8 to 2.0 pixels. Next, skeletonization and small-branch denoising (branches shorter than 5 pixels are deleted) are performed to obtain the leaf vein skeleton. The leaf tangential direction field is obtained by interpolating the skeleton tangential direction at each leaf pixel, and the leaf normal direction field is obtained by interpolating the skeleton normal direction. The centerline of the stem mask is calculated by extracting it using a distance transform and fitting it piecewise within a local window using a least-squares straight line to obtain the stem's major axis. The axial direction field of the stem is defined by the direction of the major axis, and the circumferential direction field is defined by the direction perpendicular to the major axis. All four types of direction fields are saved as two-dimensional vector maps with the same resolution as the original image, and the mask, skeleton, major axis, and parameter version number are written into the results database.

[0025] Step S3 generates detection sub-regions and sampling sequences within the leaf and stem mask area. Leaf portion: Within the leaf mask, sweep along the tangential direction of the leaf at equal intervals of 8 to 12 pixels to form strip-shaped detection sub-regions. The strip width is 6 pixels, and the minimum overlap between strips is 2 pixels. Sampling points are set at 3-pixel intervals along the center line of each strip, covering the entire path from the leaf center to the leaf edge, stopping at the mask boundary. Stem portion: Within the stem mask, axial strips are divided along the long axis of the stem at 10-pixel intervals. The strip width is 6 pixels, and adjacent axial strips overlap by 2 pixels. Sampling points are arranged at 3-pixel intervals along the center line of each strip, covering the visible stem length. The sampling interval and strip width are automatically converted to millimeters based on spatial scale calibration to ensure that early lesion diameters of approximately 2 to 5 millimeters span at least two sampling points and one strip. For each detection sub-region, record its type (leaf or stem), start and end coordinates, strip direction, sampling point sequence coordinates, and unique image identifier, which will serve as input for subsequent differencing and filtering.

[0026] Step S4 calculates the index value at each sampling point. The index value is the weighted sum of the color difference, texture difference and edge difference after normalization. For the same sampling sequence, the index values ​​of adjacent sampling points are subtracted point by point to obtain the difference sequence. The absolute value of each point in the difference sequence is used as the fluctuation index to characterize the local abnormal mutation along the reference direction.

[0027] Step S5 scans fluctuation indicators in each detection sub-region. If at least one fluctuation indicator exceeds the fluctuation threshold, the detection sub-region is judged as a suspected lesion sub-region. The threshold adopts the calibrated greenhouse scene parameters to ensure that the suspected lesion can still be triggered in the early stage of weak contrast.

[0028] Step S6 performs stripe detection within the suspected lesion sub-region: the brightness or color channel is enhanced and refined, the set of stripe center lines is identified, and the stripe centers are sorted according to the reference direction output by S2; the spacing between adjacent stripe centers is calculated accordingly to form the spacing sequence and related statistical values ​​required for the interval statistics.

[0029] Step S7 calculates the distribution coefficient based on the variability of the spacing sequence to measure whether the stripes are non-uniformly clustered. When the distribution coefficient exceeds the distribution threshold, it indicates that the stripes present a typical abnormal clustering pattern of lesions. In this case, the current stripe set is marked as a risk band and retained for subsequent steps. Those that do not exceed the threshold are removed.

[0030] Step S8 determines feature anchor points within each risk strip: if the strip endpoint falls on the leaf boundary or stem boundary, the endpoint is directly used as the feature anchor point; otherwise, strong response points are located in the neighborhood of the endpoint using gradient extrema and used as feature anchor points; the image coordinates of the anchor points are recorded for cross-sub-region matching.

[0031] Step S9 uses the feature anchor point as a reference and repeats S6 to S7 in the detection sub-regions that are spatially adjacent to it to re-identify the stripe set and obtain the second risk stripe. If the distance between the endpoints of the two stripes and the difference in direction meet the preset pairing conditions, the two are jointly marked as a feature stripe set to provide stable geometric support for subsequent directional measurement.

[0032] Step S10 calculates the directional scaling factor for each feature strip set: the main extension vector is projected onto the leaf tangential and normal direction fields and the stem axial and circumferential direction fields respectively to obtain the second directional scaling factor and the first directional scaling factor; the evidence of downy mildew, powdery mildew and vine blight are reviewed and weighted in combination with the parameter set to generate three final scores; the downy mildew category, powdery mildew category or vine blight category is output according to the maximum score, and if the maximum score is insufficient or close to the second largest value, the output is uncertain.

[0033] In some embodiments of this application, step S4 includes: The sampling sequences along the leaf tangential direction or stem axial direction within the detection sub-region are arranged in the sampling order, and the index difference between adjacent sampling points is calculated. The absolute value of the index difference is used as the fluctuation index.

[0034] In this embodiment, within each detection sub-region, the sampling sequence generated in step S3 is read along the tangential direction of the leaf or the axial direction of the stem. A local window of size 5×5 pixels is extracted centered on each sampling point, and the color difference, texture difference, and edge difference are calculated and normalized to zero to one. Then, a weighted sum is calculated according to the set weights to obtain the index value of the sampling point. The color difference is the average color difference between the window and the healthy reference block in the same frame in CIE Lab space. The texture difference is the average chi-square distance between the local binary mode histogram and the reference histogram. The edge difference is the average value of the Sobel gradient magnitude on the window boundary minus the average value of the reference boundary. The healthy reference block is selected from the connected regions of the same crop in the same frame, at least 20 pixels away from the outside of the candidate region, and whose green vegetation index is in the upper quartile range, with an area of ​​not less than 400 pixels. Subsequently, the index values ​​of adjacent two sampling points are subtracted according to the sampling order, and the absolute value is taken as the fluctuation index of that point pair. A median filter of length 3 is applied to the fluctuation index of the entire sampling sequence to suppress isolated noise. To eliminate the scale difference under different illuminations, the filtered fluctuation index is linearly stretched to zero to one based on the 5th and 95th percentiles within the sub-region, and truncated at zero. The first sampling point has no predecessor, and the fluctuation index is set to zero. If the overlap ratio between any sampling point window and the mask is less than 80%, the point is skipped and interpolated in the sequence to fill it. Finally, three values ​​are output for each detection sub-region: first, the fluctuation index sequence; second, the maximum value of the sequence and its location (as a mutation location candidate); and third, the upper quartile of the sequence, as a robust intensity statistic. In subsequent step S5, the criteria of "whether the maximum value exceeds the fluctuation threshold" or "whether the upper quartile exceeds the fluctuation threshold" are used to determine whether to enter the suspected lesion sub-region, and the mutation location candidate is used for stripe initialization and localization acceleration. In some embodiments of this application, step S5 includes: When at least one fluctuation index in the detection sub-region exceeds the fluctuation threshold, the current detection sub-region is marked as a suspected lesion sub-region.

[0035] In this embodiment, the fluctuation threshold is initially determined using three strategies, with the largest value being taken as the final threshold: First, a global baseline threshold obtained from healthy samples during the calibration phase, initially set to 0.3; second, a local percentile threshold from the same frame's healthy reference set, calculated by extracting a fluctuation index sequence sampled in the same direction as the current sub-region within a connected healthy region within the same frame, at least 30 pixels outside the current detection sub-region, where the green vegetation index is in the upper quartile and overlaps with the leaf or stem boundary by no more than 20%, and taking the 95th percentile of this sequence; third, a robust statistical threshold, calculated by adding the median and median absolute deviation of the fluctuation index sequence for the current sub-region (median plus 1.5 times the median absolute deviation) as the threshold. The maximum value of these three thresholds is then limited to the range [0.2, 0.8] to obtain the fluctuation threshold for this sub-region. Simultaneously, a high threshold is set to 1.2 times the fluctuation threshold and not less than 0.4 for strong triggering scenarios.

[0036] The suspected criterion is determined using a two-tiered "trigger + noise suppression" approach: For triggering, either "continuous triggering" or "peak triggering" is sufficient. Continuous triggering refers to the existence of at least three adjacent sampling points in the fluctuation index sequence where the index value is greater than the fluctuation threshold, and the spatial length (converted by pixel spacing) corresponding to this continuous segment is not less than twice the minimum diameter projection of the lesion. Peak triggering refers to the maximum value in the sequence being greater than the high threshold. For noise suppression, firstly, boundary interference is suppressed; samples within 5 pixels of the leaf or stem boundary are not included in the continuous segment length but only participate in statistical reference. Secondly, isolated noise is suppressed; if the two sampling points on each side of the peak position do not exceed the fluctuation threshold, it is judged as an isolated reaction and not triggered. Thirdly, spatial consistency is checked; taking the sub-region as the center, two adjacent sub-regions are examined along the reference direction. If neither is triggered and the shortest distance from the sub-region to the healthy reference boundary is less than 20 pixels, it is judged as local highlight or texture disturbance and not triggered. Finally, directional consistency is verified; the angle between the main direction of the trigger segment and the reference direction of the sub-region is calculated. If the directional difference is greater than 30 degrees, it is not triggered. If any triggering condition is met and all noise suppression conditions are passed simultaneously, the detected sub-region is marked as a suspected lesion sub-region.

[0037] To support reproduction and auditing, the system writes a result management record when marking a suspected lesion sub-region. This record includes: the final fluctuation threshold and its three sources and values, whether a high threshold was used, the trigger type and trigger location index or continuous segment start and end index, whether boundary suppression is effective, isolated noise point judgment results, spatial consistency check results, directional consistency angle values, sampling interval and strip width, and parameter version number. These parameters (0.3, 0.2, 0.8, 1.2 times, 0.4, 3 points, 5 pixels, 20 pixels, 30 degrees, minimum diameter projection one times) are managed uniformly as a baseline configuration by the parameter configuration set and can be updated during the calibration phase according to greenhouse equipment and varieties.

[0038] In some embodiments of this application, step S7 includes: Calculate the spacing between the centers of adjacent stripes within the risk stripe to obtain the spacing sequence; The variability of the interval sequence is used as the distribution coefficient. When the distribution coefficient is less than or equal to the distribution threshold, the current risk band is removed. The interval statistics are obtained using the following methods: Extract the stripe centerlines from the stripe set and obtain the coordinates of each stripe center. Sort the stripe centers according to the reference direction, which can be the leaf tangential direction or the stem axial direction. Calculate the shortest distance between two adjacent stripe centers to form a spacing sequence. Remove stripe centerlines with a length less than the minimum stripe length from the spacing sequence and trim the percentiles at both ends of the spacing sequence, removing outliers based on the absolute deviation of the median. When the number of valid samples is less than 3, do not output the interval statistics and mark the detected sub-region as uncertain. When the number of valid samples is greater than or equal to 3, output the mean, standard deviation, coefficient of variation, interquartile range, and at least one percentile value of the spacing sequence. The distribution coefficient is the coefficient of variation of the sequence of spacing between the center lines of adjacent stripes.

[0039] In this embodiment, after stripe identification is completed, the stripe centerline is extracted within each risk stripe using sub-pixel centerline tracking. The centerline is smoothed with cubic splines, the smoothing window is set to 5 to 9 pixels, and the iteration terminates when the residual is less than 0.5 pixels. Then, the stripe centers are sorted according to a reference direction. The reference direction is the tangential direction of the leaf within the leaf and the axial direction of the stem within the stem. The shortest Euclidean distance between adjacent stripe centers is calculated to form a spacing sequence. If the centerline length is less than the minimum stripe length, the entire centerline is discarded. The minimum stripe length baseline is 20 pixels and automatically converted to millimeters according to spatial calibration. To suppress extreme values... The impact of subsequent statistics is assessed by pruning the interval sequence at both ends, with the baseline set at the 5th percentile and the 95th percentile. Outliers deviating from the median by more than three times the median absolute deviation are removed using the median absolute deviation method. If the number of valid samples after pruning and outlier processing is less than 3, the interval statistics for that band are not output, and the detection sub-region is marked as uncertain. The reason for insufficient samples is recorded for reference in re-collection. If the number of valid samples is greater than or equal to 3, the mean, standard deviation, coefficient of variation, interquartile range, and at least one percentile value set by the business, such as the 75th percentile, of the interval sequence are calculated and written to the results database. The distribution coefficient is taken as the coefficient of variation of the spacing sequence, i.e., the ratio of the standard deviation to the mean. To avoid the amplification effect caused by the mean being too small, when the mean is less than 1 pixel, 1 pixel is used instead of the mean in the calculation. The distribution coefficient is compared with the distribution threshold, which is derived from the separation point of the distribution coefficient distribution on healthy samples and the distribution coefficient distribution on lesion samples during the calibration stage. The baseline can be taken as the midpoint between the 95th percentile of the healthy distribution coefficient and the 5th percentile of the lesion distribution coefficient, and is updated in each greenhouse according to equipment and variety. When the distribution coefficient is less than or equal to the distribution threshold, it is determined that the stripe spacing distribution is close to uniform and does not have lesion characteristics, and the current risk strip is removed. Otherwise, the risk strip is retained and enters the anchor point determination and multiple neighbor search. The specific values ​​and version numbers of window size, percentile, threshold and minimum stripe length used in all calculations are uniformly managed by the parameter configuration set.

[0040] It should be noted that step S6 takes the suspected lesion sub-region output from step S5, along with the corresponding original image and orientation field, as input. First, channel selection and enhancement are performed within this sub-region: the luminance component and green component of the original image are selected, with priority given to the luminance component; denoising and contrast enhancement are performed on the selected component. For denoising, guided filtering or bilateral filtering with a radius of 2 to 3 pixels is used to preserve fine lines. Then, adaptive histogram equalization is performed to enhance the contrast of weak stripes. In order to suppress large-scale background gradients, a top-hat transformation is performed using a smoothing kernel with a size of 15 to 25 pixels to extract the fine line component, and it is linearly normalized with 0 to 1. Multi-scale fringe response calculations are performed on the enhanced results, with a scale step size of 1 pixel. An adjustable filter bank is used for the response kernel, with a direction step size of 10 degrees. Directional alignment is centered on the reference direction given in step S2, allowing a deviation of ±20 degrees. After calculating the fringe response at each scale and direction, the maximum response is taken to form a fringe response map. Non-maximum suppression and dual-threshold connection are applied to the response map. The low threshold is set to the 20th percentile of the overall response, and the high threshold is set to the 60th percentile, resulting in a connected fringe candidate mask. The fringe candidates are refined to obtain a 1-pixel wide skeleton. Short branches less than 20 pixels in length and burrs with endpoint gaps less than 3 pixels are removed. Small gaps within 3 pixels are used for connection to maintain continuity. A 3-pixel wide cross-section is taken in the normal direction of each pixel in the skeleton. The intensity extremum position is determined by quadratic curve fitting, achieving sub-pixel-level center positioning and writing it back as a center line. If the main direction of a local center line deviates from the reference direction by more than 30 degrees, it is judged as a false texture and discarded. The remaining centerlines are grouped by connected components. For each connected component, the centerline length, average response, mean curvature, and directional stability are recorded. The directional stability is represented by the directional standard deviation within a 5-pixel sliding window, and the threshold is set to 15 degrees. Then, the centerline points in each connected component are projected and sorted along the reference direction. The shortest distance between adjacent centerlines is extracted according to the projection order to form the spacing sequence of the suspected lesion sub-region. To improve robustness, the spacing sequence is first anomaly handled: centerline pairs with a length less than the minimum stripe length (20 pixels) are removed, the lower 5 percentile and upper 95 percentile of the sequence are then pruned, and outliers are removed using a three-fold median absolute deviation rule; if the number of valid samples is less than 3, the sub-region is marked as uncertain and empty statistics are output; if the number of valid samples is greater than or equal to 3, the spacing statistics are calculated and output, including the mean, standard deviation, coefficient of variation, interquartile range, and at least one percentile value set by the business, while writing back the stripe centerline set, the length and directional stability of each connected component, and the reference direction used for sorting. All the above parameter values ​​and thresholds are registered in the parameter configuration set and recorded by the result management so that the distribution coefficient can be directly calculated and the entire process can be reproduced in the subsequent step S7.

[0041] The test involves taking a square neighborhood with a side length of 15 pixels centered on the candidate point. The first item is the strip response local mean normalization score: the mean of the strip response within the neighborhood is calculated and denoted as the neighborhood mean; the 5th and 95th percentiles of the strip response are calculated across the entire strip; the neighborhood mean is linearly normalized to these two percentiles and truncated between 0 and 1 to obtain the score. The second item is the gradient magnitude normalization score: the mean of the gradient magnitude is calculated within the same neighborhood; the 5th and 95th percentiles of the gradient magnitude are calculated across the entire strip; the same linear normalization and truncation between 0 and 1 are used to obtain the score. The third item is the perpendicular distance penalty score from the strip centerline: the shortest distance from the candidate point to the strip centerline is calculated; assuming a maximum allowable distance of 3 pixels, this distance is divided by the maximum allowable distance and truncated between 0 and 1, then the score is taken as the penalty. That is, a distance of 0 pixels scores 1, a distance of 3 pixels or more scores 0, with a linear transition in between. The final comprehensive score is equal to the weighted sum of the three scores with weights of 0.4, 0.4, and 0.2 respectively. If any one score is missing, it is combined by proportionally amplifying the remaining scores with their respective weights, and the percentiles used, window size, maximum allowable distance, and weights are recorded in the result record.

[0042] In some embodiments of this application, step S8 includes: selecting risk bands that were not removed in step S7, and when the endpoint of the risk band is located on the leaf boundary or stem boundary, using the endpoint as a feature anchor point.

[0043] When the endpoint of the risk strip is not located on the leaf boundary or stem boundary, a strong response point is determined in the neighborhood of the endpoint according to the gradient extremum, and the strong response point is used as the feature anchor point.

[0044] In this embodiment, step S8 is performed as follows: First, the coordinates of the two endpoints are extracted from each risk strip retained in step S7. At the same time, the corresponding binary masks of the leaf boundary and stem boundary are read and a distance field is generated to determine whether the endpoint is located on the boundary. When the shortest distance from any endpoint to the leaf boundary or stem boundary is less than or equal to 2 pixels, the endpoint is directly determined as a feature anchor point, and its type is recorded as "boundary anchor point", its boundary category, strip number, the coordinates of the endpoint in the original image and mask coordinate system, time identifier, position identifier, and current parameter version number. If both endpoints meet the requirements, the endpoint closer to the stem boundary is selected as the first anchor point, and the other is selected as a candidate anchor point. The stability of the strip centerline direction at the endpoint and the average response of the strip are used as quality scores, and the one with the higher quality score is given priority.

[0045] When the shortest distance between the endpoint of a risk strip and any boundary is greater than 2 pixels, a strong response point is searched within a square neighborhood centered on that endpoint to determine the feature anchor point. The neighborhood side length is 15 pixels, and is adaptively adjusted in millimeters as needed according to the calibrated spatial scale. First, local maxima candidates are calculated on the enhanced stripe response map and gradient magnitude map, respectively. The maxima criterion is that the response is greater than all pixels in the neighborhood within a 3×3 window and the response is not lower than the 70th percentile of the entire image. Then, non-maximum suppression is performed on the candidate points with a suppression radius of 3 pixels, and the candidate points are projected onto the normal section of the strip centerline. The lateral deviation between the response peak position on the normal section and the candidate point is required to be no more than 2 pixels to ensure geometric consistency with the strip. If the number of candidate points is 0, the response lower limit is relaxed to the 60th percentile of the entire image and repeated once; if it is still 0, the strip is marked as "anchor point unavailable", and the reason and re-acquisition suggestions are given in the result record. If the number of candidate points is greater than 1, the feature anchor point is selected based on the comprehensive score. The comprehensive score consists of three parts: the standardized score of the local mean of the strip response, the standardized score of the gradient magnitude, and the penalty score for the perpendicular distance from the strip centerline (the smaller the perpendicular distance, the higher the score); the baseline weights for the three components are 0.4, 0.4, and 0.2. To improve positioning accuracy, a one-dimensional profile with a length of 7 pixels is taken along the strip normal around the selected candidate point, and the peak position is fitted using a quadratic curve to achieve sub-pixel refinement; if the fitting residual is greater than 0.5 pixels, it reverts to pixel-level coordinates. The final output includes the refined coordinates of the anchor point, anchor point strength, comprehensive score, neighborhood contrast, perpendicular distance from the strip centerline, and distance from the nearest boundary, and a unique anchor point number is assigned; when both ends of the same strip are "inner anchor points" and the scores are close (difference less than 0.05), the one with the higher score is retained as the main anchor point, and the other is archived as a "candidate anchor point" for error tolerance during cross-sub-region pairing in step S9. The thresholds, neighborhood sizes, weights, and scoring rules mentioned above are managed by the parameter configuration set and written into the result management record along with the anchor point determination results to ensure reproducibility and auditability.

[0046] In some embodiments of this application, step S9 includes: Using the feature anchor point as a reference, steps S5 and S6 are executed again in adjacent detection sub-regions to obtain the second risk strip; When a risk band and a second risk band meet the pairing condition, the two bands are marked as a set of feature bands. The pairing conditions are that the distance between the endpoints of the two strips is less than the endpoint distance threshold and the directional difference between the two strips is less than the directional difference threshold; the endpoint distance threshold is the larger of 5% of the length of the longer strip and 20 pixels, and the directional difference threshold is 15 degrees.

[0047] In this embodiment, step S9 uses the feature anchor point output in step S8 as the starting point and selects one adjacent detection sub-region before and after it in the reference direction of the detection sub-region as the retrieval target. The determination of adjacent detection sub-regions is based on the strip step length. For leaves, two adjacent sub-regions along the tangential direction of the leaves are selected, and for stems, two adjacent sub-regions along the axial direction of the stems are selected. To cover slight pose errors, the retrieval window is extended by one strip step length in the reference direction and expanded to twice the strip width in the normal direction. Using the image coordinates of the feature anchor point in the atomic region as a reference, stripe search is initialized at the same relative position of adjacent detection sub-regions. The thresholds and processes of steps S5 and S6 are directly reused to obtain the stripe set and its interval statistics in adjacent detection sub-regions. The set that does not meet the distribution threshold is filtered out according to step S7. The set of connected center lines closest to the feature anchor point is selected as candidate stripes from the remaining stripe set. If the endpoint of a candidate strip is close to the boundary of the sub-region being searched (less than or equal to 2 pixels) and its length is less than the minimum strip length, it is considered not fully displayed. A supplementary search is allowed by adding a sub-region forward or backward to that sub-region. If no valid strip is still obtained, it is recorded as "no second risk strip obtained". The scope of the supplementary search and the reason for failure are written in the result record for reference in re-collection.

[0048] After obtaining the second risk strip, it is paired with the original risk strip for judgment. First, the strip direction is unified: a local straight line is fitted to the center line of each strip, with a fitting window length of 20 to 40 pixels, to obtain the strip direction vector; to eliminate ambiguity of positive and negative directions, if the dot product of two direction vectors is negative, the direction of the second risk strip is reversed to make them point in the same direction. The endpoint distance is calculated by finding the closest pair of two endpoints from four options, and the distance is measured using Euclidean distance in sub-pixel coordinates; the endpoint distance threshold is the larger of 5% of the longer strip length and 20 pixels, and is automatically converted to a millimeter value according to spatial scale calibration for cross-device consistency judgment. The direction difference is calculated as the angle between the direction vectors of the two strips, with a range limited to 0 to 90 degrees and a direction difference threshold of 15 degrees; when encountering strong leaf bending or local stem bending, to avoid interference from local curvature, the direction vector is first estimated on the highest straightness segment near the endpoint, and this segment is selected based on the minimum mean square residual. Two bands are considered to meet the pairing conditions and are jointly marked as a feature band set only when the nearest endpoint distance is less than the endpoint distance threshold and the direction difference is less than the direction difference threshold. If only one of them is met, a fault-tolerant review is triggered: the second risk band is slightly shifted and aligned along the reference direction by no more than two pixels, and the endpoint distance and direction difference are recalculated. If they pass, the pairing is successful. If they still fail, it is recorded as "pairing failed" and the specific values ​​of the two failed pairs and the threshold version number are written in the result record.

[0049] After successful pairing, to improve the robustness of subsequent directional scaling factors and category discrimination, two integration processes are performed on the feature strip set. The first is trajectory stitching: cubic splines are used to smoothly connect the two strips at their intersection, with the connection region length ranging from five to ten pixels. Nodules smaller than three pixels at the connection point are removed, and a continuous centerline and a uniform length metric are output. The second is quality scoring and labeling: the length, average response, directional stability, and endpoint confidence of the set are calculated. Directional stability is represented by the directional standard deviation of a five-pixel sliding window, and the value is recorded. If the directional standard deviation is greater than twenty degrees, the set is marked as "directionally unstable," and its weight is reduced in subsequent steps. All intermediate processes, including the search window range, supplementary search switch status, nearest endpoint coordinates, endpoint distance and directional difference values, threshold source and version, pairing results, and reasons, are written into the result record to achieve reproducible cross-sub-region re-identification and robust pairing in greenhouse scenarios.

[0050] In some embodiments of this application, a directional scaling factor calculation step is also included: By pairing the endpoints of each feature strip set together, calculating the distance between the endpoints, and selecting the two endpoints with the largest distance to form a direction vector; The component of the direction vector in the axial direction field of the stem is taken as the axial component, and the component of the direction vector in the circumferential direction field of the stem is taken as the circumferential component. The ratio of the axial component to the circumferential component is calculated to obtain the first directional proportionality coefficient. The component of the direction vector in the tangential direction field of the blade is taken as the tangential component, and the component of the direction vector in the normal direction field of the blade is taken as the normal component. The ratio of the tangential component to the normal component is calculated to obtain the second directional proportionality coefficient. When calculating the ratio, if the denominator is less than 0.1, it is treated as 0.1.

[0051] In this embodiment, the input consists of the continuous centerline of the feature strip set and the coordinates of its two endpoints, as well as the four types of orientation fields and region masks output in step S2. First, the centerline of the feature strip set is smoothed using cubic splines, with a smoothing window of 5 to 9 pixels. If the residual exceeds 0.5 pixels, the window is shrunk until the desired result is achieved, thus obtaining stable endpoints and main extension directions. All endpoints within the set are paired to calculate Euclidean distances, and the two endpoints with the largest distance are selected as the first and last endpoints. The coordinate difference between the first and last endpoints forms the orientation vector. To suppress the influence of local jagged edges at the endpoints, the endpoints are resampled 3 to 5 pixels inward along the centerline to represent their positions. Then, at the midpoint, first endpoint, and last endpoint of the orientation vector, unit orientation basis vectors are read from the orientation field: axial and circumferential vectors are read in the stem region, and tangential and normal vectors are read in the leaf region. If the midpoint is located in the leaf region and the endpoint crosses into the stem region, the corresponding orientation basis vectors are read within their respective regions, and a distance-weighted transition is performed at the boundary. The component amplitude in that direction is obtained by taking the dot product of the direction vector and each basis vector. To reduce the impact of noise on single-point readings, the mean of the direction basis vectors in the 3×3 neighborhood of each sampling position is taken as the basis vector at that position, and then the component amplitude is calculated. Finally, the component amplitudes of the three sampling positions are averaged to obtain the axial component, circumferential component, tangential component, and normal component. The ratio of the axial component to the circumferential component is calculated to obtain the first directional scaling factor, and the ratio of the tangential component to the normal component is calculated to obtain the second directional scaling factor. When any denominator is less than 0.1, it is treated as 0.1 to avoid unstable ratios, and this situation is recorded as a numerical protection event. If the strip is significantly curved in space, the center line can be divided into several segments with a fixed step size (e.g., 10 pixels). The above component calculation is repeated for each segment, and the quantile statistics of the entire segment are taken as robust results. The median is taken as the baseline. If the strip crosses the boundary or has invalid pixels with missing direction fields, the effective pixel ratio is not less than 80% as the condition for passing. Otherwise, the strip is abandoned or back to a shorter center line segment for recalculation. The output includes the first directional scaling factor, the second directional scaling factor, the number of sampling points participating in the averaging, whether denominator protection is triggered, whether cross-region readings are performed, and quality indicators such as smoothing residuals and intra-segment directional consistency. These, along with time identifiers, location identifiers, and parameter version numbers, are written into the result record for direct use in subsequent parameter set adjustments and category discrimination.

[0052] In some embodiments of this application, a parameter set adjustment step is also included: When the second directional proportionality coefficient is greater than the cutting threshold and the centroid of the feature strip set is located within the leaf region, increase the weight of downy mildew evidence. When the first directional proportionality coefficient is greater than the circumferential threshold, increase the weight of the evidence for anthracnose. When the first directional proportionality coefficient and the second directional proportionality coefficient both fall into the symmetrical interval and the area growth rate per unit time is not less than the area threshold, the weight of the powdery mildew evidence is increased.

[0053] In this embodiment, the parameter set adjustment takes the increase in area growth rate per unit time at the centroid position of the directional scaling factor strip as input, and outputs the increments of the evidence weights for downy mildew, powdery mildew, and anthracnose, with the updated weights limited to 0 to 1. The directional scaling factor comes from the directional scaling factor calculation step, where the first directional scaling factor is the ratio of the axial component to the circumferential component, and the second directional scaling factor is the ratio of the tangential component to the normal component. The centroid of the feature strip set is obtained by weighting the centerline coordinates by length, and the landing point is determined by the region mask to be located in the leaf region or stem region. The area growth rate per unit time comes from the time series library of the result management records: for two consecutive frames of risk strips or candidate connected components at the same position, the area difference is calculated and divided by the time difference to obtain the growth rate; to suppress random fluctuations, the growth rate is averaged within a sliding window containing at least 3 frames, with a window span baseline of 2 days and a minimum number of frames of 3.

[0054] The initial values ​​for the cutting threshold and the axial threshold are both 1.5. The initial values ​​for the symmetry interval are 0.8 to 1.2. The area threshold is set according to the crop and stage: 0.2 square millimeters per hour for the seedling stage and 0.5 square millimeters per hour for the fruiting stage. These initial values ​​are obtained using labeled samples during the calibration phase: the distributions of the second and first directional proportional coefficients for the three types of diseases are statistically analyzed, and the separation point between the healthy and lesion distributions is taken as the initial threshold. The symmetry interval is the interval covering 40% of the samples on both sides of the median distribution of powdery mildew samples. The area threshold is the upper quartile of the lower quartile that covers the early median growth rate of powdery mildew. After entering the operation phase, every 100 valid strip samples accumulated by the system, the thresholds are fine-tuned according to the quantile statistics of the latest samples, with a single offset not exceeding 10% of the initial value, and the version number is recorded.

[0055] The weight updates employ a rule of small-step accumulation, saturation truncation, and inertial smoothing. Each weight has an update step size: the baseline step size for downy mildew is 0.08, for powdery mildew it is 0.06, and for vine blight it is 0.08. When a corresponding condition is met, the weight is increased by one step size; if the condition is not met and is not met for three consecutive times, the weight is decreased by half the value of one step size. If the sum of the weights of the three classes exceeds 1 at any given time, it is scaled proportionally to exactly 1. Inertial smoothing is performed after each update, and the new weight is equal to the weighted combination of the previous weight percentage of 0.7 and the weight percentage after this update of 0.3, avoiding frequent fluctuations and truncating the result to between 0 and 1. The specific triggers are as follows: First, downy mildew is triggered by weighting, provided that the second directional proportional coefficient is greater than the cutting threshold and the centroid of the feature band set is located in the leaf region; second, anthracnose is triggered by weighting, provided that the first directional proportional coefficient is greater than the circumferential threshold; and third, powdery mildew is triggered by weighting, provided that the first and second directional proportional coefficients simultaneously fall into the symmetrical interval and the area growth rate per unit time is not less than the area threshold. To improve the robustness of the judgment, the directional proportional coefficients are first averaged using a sliding window, with the window length being the records of the last three feature bands. When denominator protection is triggered or the cross-regional reading ratio is less than 80%, the confidence level of the current directional evidence is downgraded, and the update step size is halved.

[0056] To resolve conflicting weightings, a conflict arbitration and freezing mechanism is implemented. If downy mildew and powdery mildew simultaneously meet the weighting conditions and their updated weights are close (difference less than 0.05), only powdery mildew receives a half-step weighting, while downy mildew remains unchanged, and is marked as a "leaf-type conflict." If downy mildew and stem blight simultaneously meet the conditions, arbitration is based on the centroid region: downy mildew takes priority if the centroid is in the leaf region, and stem blight takes priority if the centroid is in the stem region; non-priority regions remain unchanged for this round. If powdery mildew and stem blight simultaneously meet the conditions, the area growth rate per unit time is checked; if the growth rate is less than twice the area threshold, powdery mildew takes priority, otherwise stem blight takes priority. Once any category is prioritized, it enters a two-round freezing period. During the freezing period, unless its triggering conditions are completely unmet for three consecutive times, it will not be demoted in weight.

[0057] To achieve closed-loop self-calibration, the system writes a result record after each parameter set adjustment. This record includes: the window mean of the three directional scaling factors, centroid region determination, area growth rate per unit time and window mean, current version and value of the tangent threshold, circumferential threshold, symmetry interval, and area threshold, specific triggering conditions, update step size, scaling factor and inertial smoothing factor, conflict arbitration branch, frozen state, weights before and after the update, and time and location identifiers. If a weight remains less than 0.1 after 10 consecutive updates and has never triggered weighting, "weight decay protection" is triggered, temporarily setting the upper limit of that weight to 0.4 and prompting for resampling of leaf positions or stem segments to prevent long-term suppression of a single category. Through this adaptive and traceable weighting process, directional evidence and temporal growth evidence are stably injected into the final synthesis of category discrimination, and a reproducible implementation path is available under the constraints of greenhouse fixed imaging.

[0058] In some embodiments of this application, step S10 includes: Calculate the downy mildew evidence score, which is a weighted sum of the vein restriction intensity score and the color difference score; Calculate the powdery mildew evidence score, which is a weighted sum of the particle uniformity score and the isotropic score; The evidence score for vine blight is calculated, which is a weighted sum of the axial elongation score and the point cluster colocation score. The three types of evidence scores are combined with the evidence weights obtained from the parameter set adjustment step to form the three final scores, and the category corresponding to the maximum value of the three final scores is selected as the output category. When the ratio of the difference between the maximum and the second largest value to the maximum value is less than the uncertainty threshold or the maximum value is less than the lower limit of certainty, the output is uncertain. The parameter set includes uncertainty threshold, lower limit of certainty, tangent threshold, circumferential threshold, upper and lower limits of symmetry interval, area threshold, weights of three types of evidence, minimum strip length, endpoint distance threshold, direction difference threshold, and statistical parameters used to determine distribution threshold and fluctuation threshold.

[0059] In this embodiment, step S10 takes the feature strip set output from steps S8 to S9 and the scores of each item in the detection sub-region as input. First, it performs zero-to-one normalization verification on the leaf vein restriction strength score, color difference score, particle uniformity score, isotropic score, axial elongation score, and cluster colocation score. The normalization method is to perform a linear mapping between the 5th percentile and the 95th percentile recorded in the system calibration stage and truncate to zero-to-one. If any score is missing, it is imputed with the mean of the available scores of the same type and marked as "missing imputed". Then, it calculates the scores of three types of evidence: the downy mildew evidence score is the sum of the leaf vein restriction strength score and the color difference score according to weights, with baseline weights of 0.6 and 0.4; the powdery mildew evidence score is the sum of the particle uniformity score and the isotropic score according to weights, with baseline weights of 0.5 and 0.5; the anthracnose evidence score is the sum of the axial elongation score and the cluster colocation score according to weights, with baseline weights of 0.5 and 0.5. The above weights can be updated and overridden by the parameter set. To suppress abnormally high scores, the scores of the three types of evidence are truncated once, with scores exceeding 0.95 being counted as 0.95. The average of the scores from a sliding window including the three most recent records is then used as the robust score. Subsequently, the weights of the three types of evidence obtained from the parameter set adjustment step are introduced, and a weighted synthesis is performed on the scores of the three types of evidence to obtain the final scores of the three types. The synthesis rule is that the final score of each type is equal to "the score of that type of evidence multiplied by the weight of that type of evidence". The results of the three types are then normalized to zero to one by the maximum value for subsequent comparison. If the sum of the weights of the three types of evidence is less than 1, the unassigned part is retained as "uncertain weight" and the reason is included in the explanation when the output is uncertain. Next, uncertainty determination and category selection are performed: the maximum, second largest, and relative difference of the final scores for the three categories are calculated, and the relative difference is equal to "maximum value minus second largest value divided by maximum value"; when the maximum value is less than the certainty lower limit (baseline 0.30) or the relative difference is less than the uncertainty threshold (baseline 0.20), uncertainty is output, and a low-level warning is issued and the triggering reason of "low maximum value" or "insufficient relative difference" is recorded; when the above thresholds are passed, the category corresponding to the maximum value is taken as the output category, and the warning level is refined according to the size of the maximum value: the maximum value is less than 0.50 and outputs level one, between 0.50 and 0.70 and outputs level two, and greater than 0.70 and outputs level three. To improve reproducibility, a constraint consistency review is also performed: for downy mildew, the stability score of the margin difference is checked to see if it is not lower than the margin difference threshold (baseline 0.40). If not, the final score of downy mildew is linearly deducted according to the ratio of the difference to the threshold, and the maximum value and relative difference are recalculated. For powdery mildew, the consistency score of brightness and saturation is checked to see if it is not lower than the consistency threshold (baseline 0.50). If not, the same deduction method is used. For vine blight, the circumferential gradient asymmetry score is checked to see if it is not lower than the circumferential threshold (baseline 0.30). If not, the same deduction method is used. If the category changes or the trigger is uncertain after deduction, the result after deduction shall prevail.For rare cases of strong conflict (both final scores are greater than 0.70 and the relative difference is less than 0.10), output uncertainty directly and request two to three more frames of the same plant to enter the temporal verification branch; for cases where the number of valid samples of the input score is insufficient (less than three core scores), output uncertainty and record the missing list.

[0060] See Figure 2 As shown, this embodiment of the invention provides an image-based early identification system for major diseases and pests of watermelons and melons, including: The image acquisition module collects frontal images of the leaves and unobstructed stems of the target plant, and records the time and location markers. The reference module is configured to segment the leaf region and stem region in the frontal image of the leaf and the unobstructed stem image, extract the leaf vein skeleton and fit the long axis of the stem, and generate the tangential direction field and normal direction field of the leaf, as well as the axial direction field and circumferential direction field of the stem. The region division module is configured to divide the leaf region and stem region into multiple detection sub-regions, and generate sampling sequences for the detection sub-regions along the tangential direction of the leaf or the axial direction of the stem. The difference calculation module is configured to calculate the difference between the index values ​​of adjacent sampling points in the sampling sequence to obtain the difference sequence, and use the amplitude of the difference sequence as the fluctuation index. The suspected screening module is configured to identify a sub-region as a suspected lesion sub-region when a fluctuating index within the detection sub-region exceeds the fluctuation threshold. The stripe recognition module is configured to identify stripe sets in suspected lesion sub-regions and calculate the interval statistics of the stripe sets; The stripe screening module is configured to obtain the distribution coefficient based on the interval statistics of the stripe set, and when the distribution coefficient exceeds the distribution threshold, the stripe set is identified as a risk stripe. The anchor point determination module is configured to determine feature anchor points within the risk strip and record the image coordinates of the feature anchor points; The re-neighbor retrieval module is configured to re-identify stripe sets in adjacent detection sub-regions based on feature anchor points and determine the second risk stripe. The category discrimination module is configured to review the risk bands based on the determined directional proportion coefficient and parameter set, and output the downy mildew category, powdery mildew category, vine blight category, or output uncertainty.

[0061] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. An image-based early identification method of major diseases and insect pests of Cucumis melo, characterized by, Comprise: S1: Collect the leaf front image and the unobstructed stem image of the target plant, and record the time identifier and the location identifier; S2: In the leaf front image and the unobstructed stem image, the leaf area and the stem area are segmented, the vein skeleton is extracted and the stem long axis is fitted, the leaf tangential direction field and the leaf normal direction field and the stem axial direction field and the stem circumferential direction field are generated; S3: The leaf area and the stem area are divided into a plurality of detection sub-regions, and the detection sub-regions are generated in the leaf tangential direction or the stem axial direction; S4: The index values of adjacent sampling points in the sampling sequence are subtracted point by point to obtain a difference sequence, and the amplitude of the difference sequence is taken as the fluctuation index; The index value is obtained by normalizing and weighting the color difference, the texture difference and the edge difference; S5: When the fluctuation index in the detection sub-region exceeds the fluctuation threshold, the detection sub-region is determined as a suspected lesion sub-region; S6: Identify the stripe set in the suspected lesion sub-region and calculate the interval statistics of the stripe set; The interval statistics; S7: According to the interval statistics of the stripe set, the distribution coefficient is obtained, and when the distribution coefficient exceeds the distribution threshold, the stripe set is determined as a risk strip; S8: The feature anchor point is determined in the risk strip and the image coordinates of the feature anchor point are recorded; S9: According to the feature anchor point, the stripe set is re-identified in the adjacent detection sub-region and the second risk strip is determined; S10: According to the determined directionality proportion coefficient and the parameter set, the risk strip is reviewed, and the downy mildew category, the powdery mildew category, the vine wilt disease category or the output is uncertain.

2. The image-based early identification of major diseases and pests of Cucumis melo according to claim 1, characterized in that, Step S4 includes: The sampling sequence in the detection sub-region along the leaf tangential direction or the stem axial direction is arranged according to the sampling sequence, the index difference value between adjacent sampling points is calculated, and the absolute value of the index difference value is taken as the fluctuation index. 3.The image-based early identification method of main diseases and insect pests of C. melo according to claim 2, characterized in that, Step S5 includes: When there is at least one fluctuation index greater than the fluctuation threshold in the detection sub-region, the current detection sub-region is marked as a suspected lesion sub-region.

4. The image-based early identification of major diseases and pests of Cucumis melo according to claim 1, characterized in that, Step S7 includes: The interval between adjacent stripe centers in the risk strip is calculated to obtain an interval sequence; The variation degree of the interval sequence is taken as the distribution coefficient, and when the distribution coefficient is less than or equal to the distribution threshold, the current risk strip is removed; Wherein, the interval statistics is obtained by the following method: In the stripe set, the stripe center line is extracted and the coordinates of each stripe center are obtained, the stripe centers are sorted according to the reference direction, and the reference direction is taken as the leaf tangential direction or the stem axial direction; The shortest distance between the two adjacent stripe centers is calculated to form an interval sequence; The interval sequence is removed for the stripe center line with a length less than the minimum strip length, and the two ends of the interval sequence are cut off by a percentage and the outliers are removed according to the absolute deviation of the median; When the number of valid samples is less than 3, the interval statistics is not output and the detection sub-region is marked as uncertain; When the number of valid samples is greater than or equal to 3, the mean, standard deviation, coefficient of variation and interquartile range of the interval sequence and at least one percentile value are output; The distribution coefficient is the coefficient of variation of the interval sequence of the adjacent stripe center line. 5.The image-based early identification of major diseases and insect pests of C. melo according to claim 1, wherein, Step S8 includes: Selecting the risk strip which is not rejected in step S7, when the end point of the risk strip is located on the leaf boundary or stem boundary, taking the end point as a feature anchor point; When the end point of the risk strip is not located on the leaf boundary or stem boundary, determining a strong response point in the neighborhood of the end point according to the gradient extremum, and taking the strong response point as a feature anchor point. 6.The method of claim 1, wherein the method comprises: Step S9 comprises: Re-executing steps S5 and S6 in the adjacent detection sub-region with the feature anchor point as a reference to obtain a second risk strip; When the risk strip and the second risk strip satisfy a pairing condition, marking the two strips as a feature strip set; The pairing condition is that the end point distance of the two strips is less than an end point distance threshold and the direction difference of the two strips is less than a direction difference threshold; the end point distance threshold is the greater of 5% and 20 pixels of the length of the longer strip, and the direction difference threshold is 15 degrees.

7. The image-based early identification of major diseases and pests of C. melo according to claim 6, characterized in that, Further comprising a directionality proportion coefficient calculation step: Combining each end point of the feature strip set in pairs, calculating the distance between the end points, and selecting the two end points with the largest distance to form a direction vector; Taking the component of the direction vector in the stem axial direction field as an axial component, taking the component of the direction vector in the stem circumferential direction field as a circumferential component, calculating the ratio of the axial component to the circumferential component to obtain a first directionality proportion coefficient; Taking the component of the direction vector in the leaf tangent direction field as a tangent component, taking the component of the direction vector in the leaf normal direction field as a normal component, calculating the ratio of the tangent component to the normal component to obtain a second directionality proportion coefficient. 8.The method of claim 7, wherein the method comprises, Further comprising a parameter set adjustment step: When the second directionality proportion coefficient is greater than a tangent-normal threshold and the centroid of the feature strip set is located in the leaf region, increasing the downy mildew evidence weight; When the first directionality proportion coefficient is greater than an axial-circumferential threshold, increasing the vine blight evidence weight; When the first directionality proportion coefficient and the second directionality proportion coefficient both fall into a symmetry interval and the area growth rate per unit time is not less than an area threshold, increasing the powdery mildew evidence weight. 9.The method of claim 8, wherein the method comprises the steps of, Step S10 comprises: Calculating a downy mildew evidence score, which is composed of a weighted sum of a leaf vein restriction intensity score and a color difference score; Calculating a powdery mildew evidence score, which is composed of a weighted sum of a particle uniformity score and an isotropy score; Calculating a vine blight evidence score, which is composed of a weighted sum of an axial stretch degree score and a point cluster co-location degree score; Combining the three types of evidence scores with the evidence weights obtained by the parameter set adjustment step to obtain three types of final scores, and selecting the class corresponding to the maximum value among the three types of final scores as the output class; When the difference between the maximum value and the second maximum value and the ratio of the maximum value are less than an uncertainty threshold or the maximum value is less than a certainty lower limit, outputting uncertainty. The parameter set includes an uncertainty threshold, a certainty lower limit, a tangent-normal threshold, an axial-circumferential threshold, an upper and lower limit of a symmetry interval, an area threshold, three types of evidence weights, a minimum strip length, an end point distance threshold, a direction difference threshold, and statistical parameters for distribution threshold and fluctuation threshold determination.

10. An image-based early identification system of major diseases and pests of Cucumis melo, characterized by, For implementing the method of any one of claims 1-9, comprising: An image acquisition module is configured to acquire a leaf front image and an unobstructed stem image of a target plant, and record a time identifier and a position identifier; A reference establishment module is configured to segment a leaf region and a stem region in the leaf front image and the unobstructed stem image, extract a leaf vein skeleton and fit a stem long axis, and generate a leaf tangential direction field and a leaf normal direction field and a stem axial direction field and a stem circumferential direction field; A region division module is configured to divide the leaf region and the stem region into a plurality of detection sub-regions, and generate a sampling sequence for the detection sub-regions along the leaf tangential direction or the stem axial direction; A difference calculation module is configured to calculate the difference between index values of adjacent sampling points in the sampling sequence to obtain a difference sequence, and take the amplitude of the difference sequence as a fluctuation index; A suspected screening module is configured to determine a detection sub-region as a suspected lesion sub-region when the fluctuation index of the detection sub-region exceeds a fluctuation threshold; A strip identification module is configured to identify a stripe set in the suspected lesion sub-region and calculate interval statistics of the stripe set; A strip screening module is configured to obtain a distribution coefficient according to the interval statistics of the stripe set, and determine the stripe set as a risk strip when the distribution coefficient exceeds a distribution threshold; An anchor point determination module is configured to determine a feature anchor point in the risk strip and record an image coordinate of the feature anchor point; A complex neighbor retrieval module is configured to re-identify the stripe set in an adjacent detection sub-region according to the feature anchor point and determine a second risk strip; A category discrimination module is configured to review the risk strip according to the determined directionality proportion coefficient and the parameter set, and output a downy mildew category, a powdery mildew category, a gummy stem blight category, or output an uncertainty.