Summer grass ear dry front surface positioning image determination method, device and storage medium
By extracting the degree of withering sequence along the spike axis and locating the withering front, the problem of insufficient overall color statistics in the determination of the harvest period of Prunella vulgaris spikes was solved, and accurate determination at the critical harvest period was achieved.
Patent Information
- Application Number
- CN202611218187.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-12
- Publication Date
- 2026-11-24
AI Technical Summary
In determining the harvest period of Prunella vulgaris spikelets using existing technology, the overall color statistics are insufficient to distinguish the maturity status of spikelets at the critical harvest period, especially when the location of the withering front is not obvious, leading to difficulties in judgment.
By extracting the withering degree sequence along the ear axis, locating the withering front, constructing the withering degree sequence, and performing normalization and monotonicization, the harvest period can be accurately determined.
It improves the separability of the judgment at the critical harvest period, reduces the influence of light and individual background color differences, and enhances the stability and accuracy of the judgment.
Smart Images

Figure CN123160685A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method for determining the harvest period of Prunella vulgaris fruit spikes by locating the withering front, a computer-readable storage medium, and a device for determining the harvest period of Prunella vulgaris fruit spikes. Background Technology
[0002] Prunella vulgaris, a plant of the Lamiaceae family, is a commonly used traditional Chinese medicine, and its dried fruit spikes are typically harvested in summer when they turn from green to semi-withered to yellowish-brown. The timing of harvesting the fruit spikes directly affects the yield and content of active ingredients in the medicinal material: harvesting too early results in green fruit spikes with insufficient accumulation of dry matter and active ingredients; harvesting too late leads to over-withered fruit spikes, resulting in grain loss and discoloration. Therefore, accurately determining the harvesting period is crucial for ensuring the quality of Prunella vulgaris.
[0003] To reduce reliance on human experience, machine vision is used to determine the ripeness of fruit ears. A common approach is to acquire images of fruit ears, segment the fruit ear regions from the images, and then calculate the overall color statistics of the fruit ear regions, such as the mean color of the entire ear and the ratio of green to brown pixels. Another approach is to feed the above overall color features into a classification model to determine the ripeness level of the fruit ears.
[0004] However, the transformation of *Prunella vulgaris* spikelets from green to withered does not occur synchronously across the entire spike. Withering begins at one end of the spike and gradually progresses along the spike axis to the other end. A boundary exists between the withered brown section and the still-green section. This boundary moves from the first-withered end to the still-green end as the spike matures; this is referred to as the withering front. At the critical harvest period, the withering front reaches exactly the middle of the spike, at which point half of the spike is withered and half is green. The overall color statistics are very close to those of the earlier and later harvest periods. In the earlier period, the withering front is still near the first-withered end, and the entire spike is predominantly green; in the later period, the withering front has reached the far end, and the entire spike is predominantly withered. At the critical harvest period, the entire spike is half withered and half green, and the average color of the entire spike differs very little among the three periods.
[0005] Therefore, the method based on overall color statistics treats the ear as a uniformly colored whole, failing to depict the spatial process of withering along the ear axis. At the critical harvest period, the overall statistics are precisely the least sensitive, while the location of the withering front is the most discriminative. Thus, the existing method struggles to make accurate judgments at the crucial moment. Furthermore, differences in light conditions between different batches and the individual base color of different ears make it impossible to compare ear maturity using a fixed color threshold across different ears.
[0006] Therefore, accurately determining the harvest period of the ears of Prunella vulgaris when the ears gradually turn from green to withered along the ear axis and the overall color is similar at the critical harvest period is a technical problem that needs to be solved. Summary of the Invention
[0007] To address the problem in the aforementioned background technology that the overall color statistics are difficult to distinguish the ripening state of the ears during the critical harvest period, this invention provides a harvest period image determination method, computer-readable storage medium, and device for locating the withering front of Prunella vulgaris ears. By extracting the withering degree sequence along the ear axis and locating the withering front, the axial withering progress that is covered by the average value of the whole ear is explicitly extracted for harvest period determination.
[0008] In a first aspect, the present invention provides a harvest period image determination method for locating the withering front of *Prunella vulgaris* spikelets, comprising: acquiring an image of a *Prunella vulgaris* spikelet to be determined, the image containing a complete single spikelet, wherein withered brown and green segments are sequentially distributed along the spikelet axis; segmenting the image to obtain a spikelet region, and determining the spikelet axis direction of the spikelet region; respectively calculating the proportion of withered brown pixels in preset segments at both ends of the spikelet region along the spikelet axis direction, wherein the difference between the two proportions is not lower than a preset confidence lower limit, and determining the end with the higher proportion as the withering start end; dividing the spikelet region into multiple strips arranged sequentially along the spikelet axis direction from the withering start end; extracting the color component representing the degree of change of the spikelet from green to withering from each strip, obtaining a withering degree sequence arranged sequentially from the withering start end to the other end, wherein the color component is calibrated to take The value increases as the ear withers more severely; the withering degree sequence is normalized based on the color component of at least one band at the blue end, wherein the difference between the maximum value of the sequence and the benchmark is not lower than the preset lower limit of the dynamic range, otherwise it is determined as undeterminable; the normalized withering degree sequence is monotonicized to obtain a monotonic withering degree sequence that does not increase along the ear axis; the difference in withering degree between two adjacent bands in the monotonic withering degree sequence is calculated, and when the maximum value of the difference meets the preset significance condition, the boundary position between the two adjacent bands that obtain the maximum value is determined as the withering front of the ear, otherwise it is determined as undeterminable; the ratio of the axial distance from the withering front to the withering start end to the ear length of the ear region is calculated as the axial withering progress; the harvesting period of the Prunella vulgaris ear is determined based on the axial withering progress.
[0009] In conjunction with the first aspect, in one possible implementation, when dividing the ear region into multiple strips along the ear axis, first determine the two endpoints of the ear region along the ear axis, and divide the ear region between the two endpoints into N strips along the ear axis, where N is an integer from 8 to 40. Each strip covers the entire width of the ear region at the corresponding axial position in the direction perpendicular to the ear axis.
[0010] In conjunction with the first aspect, in one possible implementation, the color component characterizing the degree of change from green to withered in the ear of fruit is one of the following quantities: a representative value of the proximity of the withered brown color among the pixels of each ear of fruit within the strip, wherein the proximity of the withered brown color is obtained by monotonically decreasing the hue distance between the pixel's hue and a preset withered brown reference hue interval; a representative value of the degree of withering obtained by calibrating and mapping the a* component of the ear of fruit within the strip in the CIE Lab color space; and the proportion of withered brown pixels to the total number of ear of fruit within the strip. The representative value is taken as the mean or median of the corresponding quantity across all ear of fruit pixels within the strip. Hue is a circular quantity, so its numerical value is not taken directly, but rather used after being converted using the hue circle distance.
[0011] In conjunction with the first aspect, in one possible implementation, when determining the significance condition and identifying the withering front, the nearest maximum difference is taken as the adjacent difference whose maximum difference with the difference in withering degree between two adjacent bands does not exceed a preset tolerance. The nearest maximum differences that are axially adjacent to each other are grouped into the same candidate cluster. When the nearest maximum difference constitutes two or more axially separated candidate clusters, it is determined to be undeterminable. When it constitutes only one candidate cluster, the largest of the adjacent differences that do not belong to the candidate cluster is taken as the second largest value. The significance condition is determined to be satisfied only when the maximum value is not lower than the preset minimum drop amplitude and one of the following conditions is met: the second largest value does not exist or is zero; the second largest value is greater than zero and the ratio of the maximum value to the second largest value is not lower than the preset discrimination multiple. When the condition is met, the boundary position corresponding to the adjacent difference that achieves the maximum value in the candidate cluster is taken as the withering front; when there are more than two adjacent differences that achieve the maximum value, the point that is closest to the midpoint of the ear region in the direction of the ear axis is taken from the corresponding boundary position; if the distance from the two boundary positions to the midpoint is the same, the point that is closer to the withering start end is taken; the preset tolerance is the absolute tolerance on the normalized scale.
[0012] In conjunction with the first aspect, in one possible implementation, before the normalization, bands in the withering degree sequence whose absolute values of the differences in withering degree with their adjacent bands on both sides exceed a preset fluctuation range are identified as abnormal bands, and the average value of the withering degree of the adjacent bands on both sides of the abnormal band is used to correct it; the monotonicization process includes: performing order-preserving regression on the normalized withering degree sequence along the ear axis to obtain a monotonic withering degree sequence that does not increase monotonically along the ear axis.
[0013] In conjunction with the first aspect, in one possible implementation, when determining the harvest period based on the axial withering progress, the axial withering progress is compared with a pre-defined suitable harvesting range: if it falls within the suitable harvesting range, it is determined to be in the harvesting period; if it falls below the suitable harvesting range, it is determined to be not yet in the harvesting period; and if it exceeds the suitable harvesting range, it is determined to be past the harvesting period. Furthermore, the axial withering progress can be calculated separately for multiple ears within the same sampling area, and its statistical value can be used as the overall axial withering progress of the sampling area, thereby providing the harvest period determination result for the sampling area.
[0014] In a second aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect. In a third aspect, the present invention provides an image determination device for the harvesting period of *Prunella vulgaris* spikelets, comprising a processor and a memory, the memory storing a computer program, which, when executed by the processor, implements the method described in the first aspect.
[0015] The beneficial effects of this invention are as follows: Instead of using the overall ear color statistics as the maturity criterion, the ear is divided into strips along the axis and a withering degree sequence is constructed, explicitly expressing the spatial process of the ear transitioning from green to withered as the location of the withering front. At the critical harvest period, the average color of the entire ear is insufficient to distinguish between early, critical, and late states, but the fact that the withering front is located in the middle of the ear remains distinguishable, thus improving the separability of harvest period determination during the most critical time. Simultaneously, normalizing the withering degree sequence based on the green end of the ear itself prevents the criterion from relying on a fixed absolute color threshold, reducing the impact of batch lighting and individual background color differences. Furthermore, abnormal strip correction and monotonicity processing suppress the shaking caused by local insect spots and reflections, improving the identifiability and stability of the main drop at the front. These effects do not require additional imaging hardware or complex deep network models. Attached Figure Description
[0016] Figure 1 A flowchart illustrating the method for determining the harvest period of Prunella vulgaris spikelets according to an embodiment of the present invention; Figure 2 A schematic diagram of the structure of each functional step of image processing provided in the embodiments of the present invention; Figure 3 This is a schematic diagram showing the progression of the Prunella vulgaris spikelet along the spikelet axis from the beginning of withering and the movement of the withering front. Figure 4 This is a schematic diagram illustrating the division of the ear region into strips along the ear axis starting from the beginning of withering according to an embodiment of the present invention; Figure 5 This is a magnified partial schematic diagram of the extraction of color representative values within the strip according to an embodiment of the present invention; Figure 6This is a schematic diagram of the withering degree sequence along the ear axis and the curve of the withering front located by the difference between adjacent stripes in an embodiment of the present invention. Figure 7 This is a schematic diagram comparing the differentiation between the whole ear color mean method and the withering front method of this invention at the critical harvest period; Figure 8 A schematic diagram showing the alignment of the ashen color sequence after normalization at the cyan end under different lighting or background conditions; Figure 9 This is a flowchart illustrating an end-to-end processing procedure according to an embodiment of the present invention; Figure 10 This is a schematic diagram showing the distribution of the axial withering progress of multiple ears of fruit within the sampling area according to an embodiment of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. The specific values used in the following embodiments, such as the number of bands, hue values, normalization benchmarks, and withering progress thresholds, are illustrative examples and do not constitute a limitation on the scope of protection of this invention. Those skilled in the art can adjust the corresponding parameters according to the actual conditions such as the ear variety and imaging conditions; the adjusted implementation methods still fall within the scope of protection of this invention.
[0018] Before proceeding with the specific implementation, several terms involved in this invention will be explained. The "ear axis direction" refers to the length extension direction of the ear from one end to the other, which is also the direction along which the ear withers. For an ear region with a roughly elongated shape, the ear axis direction is its length direction. The "withering start end" refers to the end of the same ear along the ear axis where the proportion of withered brown pixels is higher within a preset segment. The withering of *Prunella vulgaris* ear usually progresses from one end along the ear axis to the other, so this end appears as having a significantly higher proportion of withered brown pixels in the image. This invention uses this end as the origin of the axial coordinate system and the direction from this end to the other end as the positive direction of the axial coordinate system. In one implementation, the withered brown pixels in step 101 and the withered brown reference hue range in step 102 use the same calibration basis: after excluding invalid color pixels with saturation below a preset lower limit from the white balance-corrected image, pixels whose hue falls within the withered brown reference hue range are determined to be withered brown pixels.
[0019] The starting point of withering is directly determined by the ratio of withered brown pixels at both ends of the current image, without requiring historical images of the ear of fruit or tracing the order of withering. When the difference in the ratio of withered brown pixels at both ends is lower than a preset confidence lower limit, the previous state is used for discrimination processing without locating the front. The green end refers to the end of the same ear that has not yet withered and is the greenest, i.e., the far end that the withering progresses towards; as withering progresses, the range of the green end continuously shrinks. The strip refers to a section of the ear spanning the entire width of the ear after dividing the ear area along the ear axis. Each strip is arranged sequentially along the ear axis from the starting point of withering and does not overlap with each other. Each strip corresponds to a small segment along the ear axis.
[0020] The color component characterizing the degree of change from green to withered ears refers to a color metric that monotonically changes as the ears change from green to withered. When the ears are young and tender, the hue is predominantly green; after withering, the hue becomes more yellowish-brown. The HSV color space refers to a color space that describes color using hue, saturation, and lightness. The hue circle distance refers to the shortest arc length from a pixel hue to a preset withered brown baseline hue range, considering the hue circle's wraparound characteristics; when a pixel hue falls into this range, the distance is zero. The monotonically decreasing conversion means that the calculated withered brown proximity does not increase with the hue circle distance. In one implementation, the shortest arc length is d, and the preset upper limit of the distance cutoff is d0. max The degree of brownish color close to CH is 0 and (1-d / d) max The larger of the two; when d is 0, CH is 1, and when d is not less than d... max CH is 0. Other mappings that do not increase with increasing d can also be used. The CIE Lab color space refers to a color space that describes color using a lightness component and two color components a* and b*, where the a* component represents the degree of color from green to red, increasing as the ear of fruit withers. However, hue is a circular quantity, and a* is a continuous quantity with positive and negative values; neither of their original channel values should be directly used as the degree of withering. Therefore, this method uses one of the following three as the color component: the hue circle distance between the pixel hue and the preset brownish-brown reference hue interval, calculated by monotonically decreasing the brownish-brown proximity; the degree of withering that increases with increasing withering, obtained by calibrating and mapping the a* component; and the proportion of brownish-brown pixels within the strip. The color component of a strip is the mean or median of the corresponding components on all ear of fruit pixels within that strip. The representative value refers to this mean or median; using the median can reduce the influence of individual abnormal pixels.
[0021] The withering degree sequence refers to a one-dimensional sequence formed by arranging the color components of each band sequentially from the withering start point along the ear axis to the green end. The k-th element corresponds to the withering degree of the k-th band from the withering start point. Since withering progresses from the start point, the sequence generally shows a non-increasing trend along the ear axis: bands near the start point are withered and have high values, while bands near the green end are still green and have low values. The actual collected original sequence may show fluctuations due to local insect spots and reflections, and its strict monotonicity is obtained by the monotonicity processing in step 104. The normalization refers to using the color component of one or more bands located at the green end as a benchmark, subtracting the benchmark from each element in the sequence and adjusting it according to the variation range of the sequence itself, so that the normalized withering degree has the green end of the ear itself as zero and its most withered point as one, so that the withering degree between different ears and different batches can be compared on the same scale.
[0022] The monotonicity treatment refers to adjusting the withering degree sequence into a monotonically non-increasing sequence along the ear axis to eliminate non-monotonic trembling caused by local insect spots, reflections, or bract residue. The abnormal bands refer to bands where the withering degree deviates significantly from both adjacent bands. The withering front refers to the axial position corresponding to the boundary between the withered brown and green sections on the ear; in the monotonicized withering degree sequence, the withering degree at the front drops sharply from high to low, thus representing the boundary between the two bands that achieve the maximum difference in withering degree between adjacent bands. The axial withering progress refers to the ratio of the axial distance from the withering front to the withering initiation point to the ear length; its value is equal to the proportion of the withered brown section to the ear length, ranging from 0 to 1. A larger value indicates that the withering has progressed further and the ear is more mature. The suitable harvesting range refers to the pre-defined range of axial withering progress values corresponding to the appropriate harvesting state. The upper limit of "all green" refers to the upper threshold for determining the degree of withering of the whole ear of fruit; the lower limit of "all withered" refers to the lower threshold for determining the degree of withering of the whole ear of fruit.
[0023] like Figure 1 As shown, the method for determining the harvest period of Prunella vulgaris spikelets provided by the embodiments of the present invention includes steps 101 to 106. The following is in conjunction with... Figures 2 to 9 Each step will be explained in detail. For example... Figure 2 As shown, the present invention divides each step into several functional links, namely image acquisition and segmentation, strip division and color extraction, normalization and monotonicity, frontal location, progress calculation and harvest period determination. Each link is connected in sequence, and the output of the previous link is used as the input of the next link.
[0024] like Figure 3As shown, the withering of *Prunella vulgaris* spikelets begins at the starting point and progresses along the spike axis towards the green end, forming withered brown sections and still-green sections on the spike. The withering front between these two sections moves from the starting point towards the green end as the spike matures. Earlier in the season, the withering front is still near the starting point, and the withered section is shorter. At the critical harvest period, the withering front has reached the middle of the spike, with half of the spike remaining green and half still green. Later in the season, the withering front is close to the green end, and the withered section is longer. This invention characterizes the progression of withering by locating the distance from the withering front to the starting point, thereby determining the harvest period.
[0025] Step 101: Acquire an image of the *Prunella vulgaris* spike to be judged, segment the spike region from the image, determine the axis direction of the spike region, and identify the end with a higher proportion of withered brown pixels in the preset segments at both ends of the spike as the withering start end. The image can be captured by a regular camera or mobile phone in the field or at the sampling point, ensuring that the spike roughly fills the frame and the background is relatively simple. The spike region can be segmented using conventional color and shape-based segmentation methods, such as thresholding in HSV space based on the difference in hue and saturation between the spike and the background, and then taking the largest connected component as the spike region. Such segmentation methods are known in the art and will not be elaborated here.
[0026] When determining the ear axis direction, the smallest bounding rectangle is obtained for the ear region, and its long side direction is taken as the ear axis direction. The smallest bounding rectangle refers to the rectangle with the smallest area that can exactly contain the ear region. For curved ears, a skeleton can also be extracted from the ear region. The skeleton refers to the curve obtained by refining the ear region along its shape midline. In this case, the skeleton is parameterized by arc length, and the tangent direction of the skeleton at each point is taken as the ear axis direction at that point. The ear length is the total arc length of the skeleton from the beginning of withering to the other end. Strips are divided along the skeleton according to equal arc lengths, and each strip covers the entire width of the ear region in the normal direction at the corresponding point of the skeleton. Measuring the ear length with the arc length of the skeleton rather than the straight-line distance between the two ends can avoid the systematic underestimation of the axial distance when the ear is curved, so that the axial withering progress is not distorted by the degree of curvature of the ear.
[0027] When determining the starting point of withering, sections approximately one-tenth of the ear length are taken at each of the two endpoints along the ear axis. The proportion of withered brown pixels to the total ear pixels in each section is calculated, and the end with the higher proportion is taken as the starting point of withering. For ear that withers unidirectionally from one end along the ear axis, the proportion of withered brown pixels at that end is usually not lower than that at the other end during ripening, and identification based on this generally does not depend on the ripening stage. For the same batch of ear, the starting points of withering are usually anatomically consistent, for example, all withering begins from the base of the ear; even so, this method still calculates the proportion of withered brown pixels at both ends of each ear before determining the starting point, rather than directly specifying it according to the anatomical direction: firstly, some ear may wither in the opposite direction; secondly, the difference in proportions at both ends is also used to determine whether the starting point is identifiable. When the difference in the proportion of withered brown pixels at both ends is less than the preset confidence lower limit, it may indicate that the ear is still green or has withered, or it may indicate that the ear has an abnormal withering morphology or insufficient image quality; in this case, the starting point is not identifiable and is handled as a boundary case below, without entering the frontal positioning.
[0028] Step 102: Starting from the point of decay, the ear region is divided into multiple strips arranged sequentially along the ear axis. The color component representing the degree of decay from green to withered is extracted from each strip, resulting in a sequence of decay degree arranged sequentially from the point of decay towards the green end. For example... Figure 4 As shown, firstly, the two endpoints of the ear region are determined along the ear axis, namely the endpoint of the withering start end and the endpoint of the green end. Then, the ear region between the two endpoints is divided into N strips along the ear axis, numbered sequentially from the withering start end as the 1st to the Nth strip. Each strip covers the entire width of the ear region at that axial position in the direction perpendicular to the ear axis, so that a strip corresponds to a small segment along the ear axis and contains all the ear pixels of that segment.
[0029] The number of strips, N, affects the axial spatial resolution and noise resistance: if N is too small, the frontal positioning is too coarse; if N is too large, there are too few pixels in each strip, and the representative value is easily affected by noise. In one implementation, N is taken as an integer in the range of 8 to 40, for example, 20. For a fruit ear about 30 mm long, taking 20 strips, each strip is about 1.5 mm along the ear axis, which can distinguish the frontal position while ensuring that there are enough pixels in each strip. For each strip, the representative value of all fruit ear pixels in that strip in the selected color component is taken as the withering degree of that strip. Arranged sequentially from the withering start end to the cyan end, the withering degree sequence is obtained.
[0030] The selected color components must be calibrated so that their values increase with the severity of ear withering, and the direction is clear. Taking the HSV hue component as an example, hue is a circular quantity, and its value varies with the encoding. Therefore, the hue value is not directly taken. Instead, white balance correction is first performed during acquisition using a standard color chart or gray chart. Then, invalid color pixels with saturation below a preset lower limit within the band are excluded. Then, using the preset ashy brown reference hue range obtained through calibration as a reference, the hue of each pixel is converted to its closeness to that ashy brown range, with values between 0 and 1, and the closer to ashy brown, the larger the value. The same principle applies when taking the CIE Lab a* component. First, white balance correction is performed, and then a* is converted to the degree of withering in the same direction using a calibrated linear transformation. In one implementation, the a* representative values of the white-balance-corrected cyan reference sample and the ashy brown reference sample are used as the cyan reference value a. green Reference value a for dull brown brown , and a brown Greater than a green ; pixel a* saturation level C a =(a*-a green ) / (a brown -a green ), and set results less than 0 to 0 and results greater than 1 to 1. For example... Figure 5 As shown, the degree of withering of a strip is taken as the median of the calculated value of all effective spike pixels within that strip.
[0031] For example, a bunch of ears of fruit is divided into 20 equal bands starting from the point of decay. The representative values of the degree of decay in each band along the ear axis are roughly as follows: the first few bands near the beginning of decay fluctuate slightly between 0.82 and 0.90, the middle section shows a faster drop, and the last few bands near the green end are between 0.11 and 0.20. Figure 6 As shown, the sequence exhibits a clear drop in the middle section, with the steepest drop corresponding to the withering front. The original sequence of a real ear of fruit is not naturally monotonous; local insect spots and reflections can cause shaking. Therefore, the monotony of the sequence is obtained through the monotonization process in subsequent step 104, rather than assuming that the original components are naturally monotonous.
[0032] Step 103: First, correct the abnormal bands in the withering degree sequence. Then, using the color component of at least one band at the cyan end as a reference, normalize the corrected withering degree sequence to obtain the normalized withering degree sequence. The correction must be completed before normalization because the denominator of the normalization is the difference between the maximum value of the sequence and the cyan reference: if there is a band in the sequence that is artificially high due to reflection and it happens to be the maximum value of the sequence, the denominator will be enlarged by this outlier, causing the entire sequence to be systematically suppressed.
[0033] When correcting abnormal bands, each band is examined individually: if the absolute value of the difference between the withering degree of a certain band and the withering degree of its two adjacent bands exceeds the preset fluctuation range, it is determined to be an abnormal band, and corrected by the average of the withering degree of its two adjacent bands. The requirement that the difference between the band and its two adjacent bands both exceed the limit is to distinguish between "local isolated shaking" and "normal drop at the front": a band at the front only has a large difference with one adjacent band and is close to the other, and will not be misjudged as abnormal. The preset fluctuation range represents the upper limit of the normal withering degree difference between adjacent bands. Since the color component described in step 102 has been calibrated and its value falls on a fixed scale of 0 to 1, this range is taken on this calibration scale, and has a uniform meaning for different ears of fruit and different batches. Its value range is generally 0.15 to 0.35, typically 0.25. During calibration, the distribution of the differences between adjacent bands on the calibration scale of a batch of normal-looking ears can be statistically analyzed, and the highest quantile is taken as the preset fluctuation range; the rougher the ear surface and the stronger the reflection, the larger the preset fluctuation range value.
[0034] The necessity of normalization lies in the fact that different batches of light exposure and different individual ear colors will cause the overall hue of the same withering state to shift. If a fixed threshold is used directly for judgment, the same threshold will not correspond to the same withering state on different ear. Therefore, the average of the representative values of one or more bands located at the cyan end of the sequence is taken as the cyan benchmark for that ear. Then, each element of the sequence is subtracted from the cyan benchmark and divided by the variation range of the sequence, i.e., the difference between the maximum value of the sequence and the cyan benchmark, so that the cyan benchmark is mapped to 0 and the maximum value of the sequence is mapped to 1. The cyan benchmark is taken as the average of the representative values of several bands at the cyan end, so these bands only fluctuate slightly around 0 after normalization, and are not exactly 0. Some bands may even be slightly less than 0; the maximum value of the sequence may not fall exactly on the first band at the beginning of withering. If individual elements exceed the 0 to 1 range after normalization, elements less than 0 are taken as 0 and elements greater than 1 are taken as 1, thus truncating it to the 0 to 1 range.
[0035] Continuing with the previous example, if we take the average of the last two band values at the cyan end, 0.115, as the cyan baseline, and the maximum value of the sequence is 0.90, then the normalized value of the original representative value of a certain band in the middle section, 0.50, is (0.50 - 0.115) / (0.90 - 0.115) ≈ 0.49; the normalized value of the bands at the cyan end is close to 0, and the normalized value of the bands at the beginning of the withering is close to 1. For example... Figure 8 As shown, two ears of fruit in the same mature state, photographed under different lighting conditions and with different background colors, have different overall levels of their original withering degree sequences. After normalization at the cyan end, the two sequences basically overlap, and the values of each band fall into the same scale.
[0036] It's important to distinguish the roles of these two thresholds: the preset fluctuation amplitude, lower limit of dynamic range, upper limit of full green, and lower limit of full withering are all used before normalization or when no normalization is performed. The fluctuation amplitude is used to determine abnormal bands before normalization, the dynamic range determines whether to proceed with normalization, and the upper limit of full green and the lower limit of full withering are used for absolute color discrimination when the dynamic range is insufficient. The reason they can obtain uniform values across different ears and batches is because step 102 uses a color chart and white balance correction to convert the color components to a fixed calibration scale of 0 to 1, rather than the normalization of the single-plant sequence in step 103. The normalization in step 103 aims to unify the sequences entering the frontal positioning to a scale where the green end of the ear itself is 0 and its maximum value is 1, allowing the withering degree sequence morphology of different ears to be compared with each other.
[0037] Normalization is a monotonically increasing affine transformation. After this transformation, each adjacent difference in the sequence is multiplied by a positive coefficient. Therefore, the position where the adjacent difference reaches its maximum value does not change due to normalization. In other words, the axial position of the front is not sensitive to the overall brightness shift and the depth of the background color. This is precisely the robustness of using the axial position rather than the absolute value of color as the maturity criterion. The role of normalization is to give the adjacent differences, tolerances, and sequence morphology after entering the front positioning a unified scale with the ear itself as a reference, which is convenient for cross-ear comparison. It is not responsible for unifying the fluctuation amplitude, lower limit of dynamic range, and thresholds such as all green and all withered used before normalization. The comparability of the latter comes from the color labeling in step 102 and is unrelated to the normalization in this step. When only the above positive affine transformation is performed and no over-limit truncation is triggered, normalization does not change the position of the maximum adjacent difference. The final front position is based on the sequence after anomaly correction, over-limit truncation, and monotonicization.
[0038] Step 104: The normalized withering degree sequence is monotonicized to obtain a monotonic withering degree sequence that does not increase along the ear axis. The boundary between the two bands that have the maximum difference in withering degree between adjacent bands in this sequence is determined as the withering front of the ear. The presence of insect spots, reflections, and residual bracts on the surface of the actual ear can cause the withering degree of some bands to deviate significantly from that of their adjacent bands, forming non-monotonic tremors. If the steepest drop is found directly on the original sequence, the tremors are easily misjudged as fronts. The isolated tremors with larger amplitudes have been corrected as abnormal bands in step 103, and the remaining small tremors are eliminated in this step.
[0039] After correction and normalization, order-preserving regression is performed on the sequence along the ear axis to obtain a sequence that does not increase monotonically along the ear axis. Order-preserving regression refers to finding a fitted sequence that does not increase along the ear axis while minimizing the sum of squared deviations between the fitted sequence and the input sequence. The solution can be obtained using a conventional adjacent violation merging algorithm. Order-preserving regression only merges adjacent pairs that violate monotony into a common weighted average, without altering segments that are already monotonically non-increasing: when the sequence is already monotonically non-increasing from the beginning of the withering phase, order-preserving regression does not change its value, and the drop position at the front remains unchanged; when there are disordered adjacent pairs in the front's neighborhood, merging may incorporate several bands on one side of the front into the same platform, thus changing the front's position. Therefore, the role of order-preserving regression is to suppress local upward fluctuations by merging disordered adjacent blocks, rather than to prevent the front from moving under any input; its impact on the position and magnitude of the maximum adjacent difference must be evaluated in conjunction with the maximum difference significance quality control described later.
[0040] It should be noted that it is not advisable to perform a moving average first and then an ordinal regression here. Although the moving average can smooth out minor fluctuations, it replaces the value of the central strip with the average value of each strip within the window. This will spread the steep drop that is concentrated in one place at the front across several strips within the width of the window: the amplitude of the drop is flattened, and the location of the drop also shifts towards the cyan end.
[0041] Taking the sequence after abnormal band correction and normalization in Example 1 below as an example: the adjacent difference at the front of this sequence is 0.408, and the second largest adjacent difference is 0.153, with a ratio of approximately 2.7. If a moving average with a window of 3, centered and with both ends contracted according to the available bands, is first applied to this sequence, and then order-preserving regression is performed, the maximum value of the adjacent difference drops to approximately 0.22, and its position shifts from between the 12th and 13th bands to between the 13th and 14th bands. Furthermore, the difference between the adjacent differences of this sequence and its neighboring bands is significantly reduced, and the ratio of the maximum to the second largest value falls near or below the discrimination factor required by the significance criterion. The distinguishability of the front is significantly reduced. Therefore, the monotonicity of this invention is mainly based on order-preserving regression. Only when the amplitude of the sequence's fluctuations is close to the amplitude of the front's drop, resulting in multiple similar adjacent differences after order-preserving regression, can a moving average with a window no larger than 3 be applied first, accepting the cost of the front's position potentially shifting by one band.
[0042] Locating the drying front on a monotonically decreasing drying sequence: Starting from the beginning of drying, calculate the difference in drying degree between adjacent bands, i.e., subtract the drying degree of the next band from the drying degree of the previous band. When the maximum value of this difference satisfies the significance condition described later, the boundary between the two adjacent bands that achieve this maximum value is taken as the drying front. This is because the monotonically non-increasing sequence drops from a high-value region to a low-value region at the front, with the steepest drop, so the adjacent difference reaches its maximum value at this point; while within the dried-up and cyan regions, the drying degrees of adjacent bands are close, and the adjacent difference is very small. When this maximum value does not satisfy the significance condition, the front is not located and is determined to be undeterminable, as detailed later.
[0043] The front is taken as the boundary between two bands rather than a single band itself because the adjacent difference characterizes the drop at the intersection of the two bands, and its axial position is the intersection. If adjacent differences that differ from the maximum value by no more than a preset tolerance are axially adjacent to each other and form a single candidate cluster, then the boundary position corresponding to the adjacent difference that achieves the maximum value is taken as the withering front in this candidate cluster. When there are two or more adjacent differences that achieve the maximum value, the one closest to the midpoint of the ear region in the direction of the ear axis is taken from the corresponding boundary positions. If the distances from the two boundary positions to the midpoint are the same, then the one closer to the beginning of withering is taken. If these near-maximum differences form two or more axially separated candidate clusters, they are determined as undeterminable as described later. The preset tolerance is an absolute value on the normalization scale, generally between 0.02 and 0.05, used to group adjacent differences that are approximately equal after order-preserving regression at the same drop point into one cluster, rather than mixing two spatially separated drops into one. Continuing with the above example and as... Figure 6 As shown, after monotonication, the sequence shows the largest drop between the 12th band (approximately 0.898 after normalization) and the 13th band (approximately 0.490 after normalization), with an adjacent difference of approximately 0.408, which is significantly larger than the adjacent differences at other locations (the second largest being approximately 0.153). Therefore, the withering front is located at the boundary between the 12th and 13th bands.
[0044] It should be noted that it is not advisable to locate the front by using the "point of maximum slope of the cumulative drying curve": the first difference of the cumulative curve at the k-th strip is exactly equal to the degree of drying of the k-th strip itself. For a monotonically non-increasing sequence, its maximum value must fall in the already dried-up segment near the beginning of drying, not at the front. Therefore, this approach cannot obtain the correct front location. If the cumulative curve is to be used, the point where the absolute value of its second difference is maximum should be taken, and the result is consistent with the above-mentioned point where the adjacent difference is maximum.
[0045] Step 105: Calculate the ratio of the axial distance from the withering front to the withering initiation point to the ear length, as the axial withering progress. The ear length and axial distance are determined according to the ear axis scheme used in Step 101: When using the straight-line scheme with the minimum bounding rectangle, the ear length is the length of the longer side of the rectangle, and the axial distance is measured along the longer side; when using the curved scheme with the skeleton, the ear length is the total arc length of the skeleton from the withering initiation point to the other end, and the axial distance is the arc length along the skeleton. In both schemes, the strips are equally divided according to the corresponding length coordinates. Therefore, when the withering front is the boundary between the i-th strip and the i+1-th strip, there are exactly i complete strips between this boundary and the withering initiation point. The axial distance from the front to the initiation point is equal to the product of i and the strip length. The axial withering progress can be directly calculated as the ratio of i to the total number of strips N, which is consistent with the ratio obtained by measuring according to the corresponding length coordinates.
[0046] For curved ears of fruit, the arc length of the skeleton is greater than the straight-line distance between the two endpoints; these two are not interchangeable. If the strips are divided according to the curved pattern but the ear length is calculated using the straight-line distance between the two endpoints, the resulting progress will be systematically overestimated. Continuing with the previous example, if the withering front is located at the boundary between the 12th and 13th strips from the starting point of withering, and the total number of strips is 20, then the axial withering progress is 12 ÷ 20 = 0.60. This means that the section that has already withered and browned accounts for approximately 60% of the ear length, and withering has progressed from the starting point to approximately 60% of the total ear length. The greater the axial withering progress, the longer the withered section and the more mature the ear.
[0047] Step 106: Determine the harvest period of *Prunella vulgaris* spikelets based on the progress of axial dieback. For example... Figure 7 As shown, the axial withering progress is compared with the pre-defined suitable harvesting range: when the axial withering progress falls within the suitable harvesting range, it is determined to be in the harvesting period; when it falls below the suitable harvesting range, it is determined to be not yet in the harvesting period; when it rises above the suitable harvesting range, it is determined to be past the harvesting period. The suitable harvesting range is determined according to the agronomical requirements for harvesting Prunella vulgaris, generally ranging from 0.45 to 0.75, that is, when the withering front has advanced to the withered side of the middle section of the ear, it is advisable to harvest; the suitable harvesting range can be adjusted accordingly for ear of different origins and uses. Using the previous example, the axial withering progress of 0.60 falls within the suitable harvesting range of 0.45 to 0.75, therefore the ear is determined to be in the harvesting period.
[0048] When determining the axial withering progress based on the sampling area, steps 101 to 105 can be performed separately for multiple ears within the same sampling area to obtain the axial withering progress of each ear. The statistical value of this progress is then taken as the overall axial withering progress of the sampling area. The median value can be used to reduce the impact of individual ears that are harvested too early or too late. For example, if 30 ears are collected from a sampling area and the median axial withering progress is 0.62, falling within the suitable harvesting range, then the entire sampling area is determined to be in the harvesting period and harvesting can be arranged.
[0049] Steps 101 to 106 above provide one implementation of this method. Those skilled in the art can adopt different implementations for each step depending on the ear variety and imaging conditions. For ear region segmentation in step 101, in addition to threshold segmentation based on hue and saturation differences in HSV space, segmentation based on region growing, graph cut, or lightweight semantic segmentation networks can also be used. When the image background is complex, morphological opening operations can be used to remove small background noise first, and then the largest connected component can be taken as the ear region. For determining the ear axis direction, in addition to the direction of the long side of the minimum bounding rectangle and the main extension direction of the skeleton, principal component analysis can be performed on the pixel coordinates of the ear region, and the direction of the first principal component can be taken as the ear axis direction. This direction is particularly stable for ears with a small degree of curvature.
[0050] For the strip division in step 102, the selection of the number of strips N needs to be balanced between axial resolution and noise resistance: N can be a larger value when the ear is longer and the imaging resolution is higher, and N can be a smaller value when the ear is shorter or the imaging resolution is lower. Equal spacing of each strip along the ear axis is a prerequisite for calculating the axial withering progress by the ratio of strip number to the total number of strips; if an unequal spacing division is used, the strip number and axial distance are no longer proportional, and this ratio is no longer equal to the ratio of the distance from the front to the starting end to the ear length. Therefore, this method does not use non-equidistant division. To improve the positioning accuracy near the front, the total number of strips N should be increased, rather than locally increasing the density. Regarding the selection of color components, the hue component is sensitive to green-brown changes, the a* component is sensitive to red-green changes, and the proportion of withered brown pixels is sensitive to the withered area. One of these components can be selected based on the actual coloring pattern of the ear variety; alternatively, the above components can be normalized and weighted to obtain a comprehensive measure of withering degree, taking into account different coloring characteristics. To reduce the impact of highlights on the ear of fruit on the representative value, invalid color pixels with saturation below the preset lower limit within the band can be removed first when extracting the representative value, and then the median value can be taken from the remaining pixels.
[0051] For the normalization in step 103, in addition to averaging the representative values of one or more bands at the cyan end, the lower quantile of a segment of representative values at the cyan end can also be taken as the cyan reference to further suppress the influence of individual yellowish pixels. The denominator of the normalization is the difference between the maximum value of the sequence and the cyan reference, which is the dynamic range of the sequence. When the dynamic range is lower than the preset lower limit, it indicates that there are no two segments on the ear of fruit: withered and still green. In this case, the previous state discrimination is performed without normalization to avoid amplifying noise. If individual elements exceed the 0 to 1 range after normalization, they are truncated to the 0 to 1 range according to the aforementioned rules. When the same batch of ears of fruit are collected under the same imaging conditions, the overall distribution of the representative values at the cyan end of the batch of ears of fruit can also be statistically analyzed first, and used as a common reference for unified normalization within the batch, making the degree of withering between different ears of fruit in the same batch more comparable.
[0052] For the monotonicization in step 104, besides order-preserving regression, a cumulative minimum value method can also be used. That is, starting from the beginning of the withering, the withering degree of each band is taken as the smaller of its own degree and the withering degree of the previous band, thus directly obtaining a monotonically non-increasing sequence along the ear axis. This method is simple to calculate, but it will solidify the first downward tremor in the sequence into a permanent decline: once a band takes a low value due to reflection or other reasons, all subsequent bands will be pressed down to that low value, and the actual drop at the front will be weakened or even disappear. The maximum value of the adjacent difference will appear at the tremor rather than at the front. Therefore, this method is only used when the tremor of the sequence itself is very small, or when the correction of abnormal bands has been completed in advance. In addition to determining whether the difference between the abnormal band and the adjacent bands on both sides exceeds the preset fluctuation range, robust statistical rules can also be used to identify abnormal bands. For example, the median within the local window can be used as the center and the absolute deviation of the median can be used as the scale to identify bands that deviate from the absolute deviation of the median by more than a certain number of times. This rule is more robust for the case where multiple consecutive bands are abnormal at the same time.
[0053] Frontal location is not executed unconditionally; its prerequisite is that the maximum value of the adjacent difference satisfies the significance condition, meaning that the maximum value has both sufficient absolute magnitude and is significantly greater than the adjacent differences at other drops. Specifically, the adjacent difference that differs from the maximum value of the adjacent difference by no more than a preset tolerance is first selected, called the nearest maximum difference. Since the same drop may manifest as two or three approximately equal adjacent differences along the axial direction after ordinal regression, the nearest maximum differences that are adjacent along the axial direction are grouped into the same candidate cluster, with one candidate cluster corresponding to one drop. If these nearest maximum differences form two or more separate candidate clusters along the axial direction, it indicates that there are two or more drops with similar magnitudes but different locations on the ear, which are directly determined as undeterminable; this is precisely the multi-frontal situation that this criterion aims to screen out. Only when the nearest maximum difference forms a single candidate cluster is the largest of the adjacent differences that do not belong to that candidate cluster taken as the second largest value.
[0054] The significance condition is satisfied only if the maximum value is not lower than the preset minimum drop amplitude, and further satisfies the following conditions: the second largest value is nonexistent or zero, or the ratio of the maximum value to the second largest value is not lower than one of the preset discrimination multiples. Then, the boundary position corresponding to the adjacent difference that yields the maximum value in the candidate cluster is taken as the front. If there are two or more adjacent differences that yield the maximum value, the boundary position closest to the midpoint of the ear region along the ear axis is taken. If the distances from the two boundary positions to the midpoint are the same, the one closer to the beginning of withering is taken; otherwise, it is determined as undeterminable. Taking the minimum drop amplitude as the absolute lower limit is to avoid sequences with a small maximum drop but a compliant dynamic range, obtaining a high ratio only because the second largest value is smaller. When there are no other adjacent differences outside the candidate cluster, i.e., the second largest value is nonexistent, the condition is considered satisfied as long as the maximum value is not lower than the minimum drop amplitude.
[0055] The withering of *Prunella vulgaris* spikelets typically progresses unidirectionally from one end along the spike axis, forming a single front. When multiple spikelets fall in close proximity, they may exhibit patchy withering, simultaneous withering from both ends, or the presence of multiple fronts. In such cases, while order-preserving regression will still output a monotonically non-increasing sequence and obtain a maximum value for adjacent differences, this maximum value does not correspond to a unique physical front. The significance conditions described above—whether the candidate cluster is unique and whether the maximum value satisfies the minimum drop amplitude and the distinguishing factor—are used to identify individual spikelets deviating from this unidirectional progression pattern. These spikelets are then deemed undeterminable, prompting for re-collection or manual verification, thus avoiding the artificial determination of a single front within a multi-front sequence.
[0056] The discrimination factor is generally taken as 2 to 3, typically 2. During calibration, a batch of known single-end advancing ears of fruit can be selected, and the distribution of the ratio of the maximum to the second-largest adjacent difference can be statistically analyzed. The lower quantile of this distribution is taken as the discrimination factor. The minimum drop amplitude, on a normalized scale, is generally taken as 0.2 to 0.4, typically 0.3. During calibration, the aforementioned single-end advancing ears of fruit can be selected, and the distribution of the adjacent differences at the front can be statistically analyzed. The lower quantile of this distribution is taken as the minimum drop amplitude. Continuing with the previous example, in Example 1, the adjacent difference at the front is approximately 0.408, not less than the minimum drop amplitude of 0.3, and its ratio to the second-largest value is 0.408 ÷ 0.153 ≈ 2.7, not less than the discrimination factor 2. Therefore, the significance condition is met, and the frontal location is established.
[0057] For the frontal positioning in step 104, in addition to directly taking the point with the maximum difference in withering degree between two adjacent bands, a single-variable-point segmented fitting can be performed on the monotonic withering degree sequence. That is, the sequence is divided into two segments with a variable point, each segment is fitted with a constant, and the variable point that minimizes the sum of squared fitting residuals is taken as the withering front. This method is more stable in positioning when the sequence is short or the decline is slow. For the ear length in step 105, the straight-line scheme takes the length of the long side of the smallest bounding rectangle of the ear area and measures the axial distance along the long side. The curved scheme takes the total arc length of the skeleton and measures the arc length along the skeleton. Since the bands are numbered equally according to the corresponding length coordinates from the withering start end, the axial withering progress can also be calculated directly by the ratio of the number of complete bands in front of the front to the total number of bands. This ratio is consistent with the ratio obtained by measuring according to the corresponding length coordinates, both of which are ratios between 0 and 1. For the suitable collection range in step 106, the upper and lower boundaries of the suitable collection range can be adjusted according to the different origins and uses of Prunella vulgaris, focusing on the effective components and yield. For example, when focusing on the accumulation of effective components, the suitable collection range can be moved upward as a whole.
[0058] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the methods described in steps 101 to 106 above. The computer-readable storage medium may be a read-only memory, random access memory, magnetic disk, or optical disk, or any other medium capable of storing program code.
[0059] This invention also provides an image determination device for the harvesting period of Prunella vulgaris spikelets, comprising a processor and a memory. The memory stores a computer program, and the processor executes the computer program to implement the methods described in steps 101 to 106 above. This device can be a portable terminal deployed at a sampling point, a field image acquisition device, or a back-end server. The processor can be a central processing unit, a graphics processing unit, or other chips with data processing capabilities. Example
[0060] For ease of understanding, the following is as follows: Figure 9 As shown, a complete end-to-end implementation is presented. This implementation determines the harvest period of a *Prunella vulgaris* spike from a certain production area. First, an image of the spike is captured using a mobile phone under natural light. During capture, a standard gray card is placed in a corner of the image for white balance correction. The spike is roughly centered in the image, and the background is a light-colored cardboard. Thresholding is performed on the image in HSV space, and the maximum connected component is obtained to obtain the spike region. The minimum bounding rectangle of the spike region is calculated, and its long side is taken as the spike axis direction. The proportion of withered brown pixels in the section occupying one-tenth of the spike length at both ends of the spike is compared. The left end is approximately 0.86, and the right end is approximately 0.07. Therefore, the left end is taken as the starting point of withering, and the right end is taken as the blue end.
[0061] Next, starting from the beginning of the withering, the ear region is divided into 20 equal strips along the ear axis, numbered sequentially from strip 1 to strip 20. For each strip, invalid color pixels with saturation below a preset lower limit are excluded, and the median of the withering degree calculated from the hue of the effective ear pixels within that strip is taken to obtain the withering degree sequence. In this embodiment, the withering degree of strips 1 to 9 is approximately 0.90, 0.89, 0.89, 0.88, 0.88, 0.87, 0.86, 0.85, and 0.84, respectively; the withering degree of strip 10 is lower than 0.55 due to a reflection in one area; strips 11 and 12 are approximately 0.83 and 0.82, respectively; strip 13 drops to 0.50; and strips 14 to 20 are approximately 0.42, 0.30, 0.20, 0.15, 0.13, 0.12, and 0.11, respectively.
[0062] An anomaly assessment was made for the 10th band: its absolute difference from the 9th band on the left was 0.29, and its absolute difference from the 11th band on the right was 0.28. Both exceeded the preset fluctuation range of 0.25, so it was judged as an abnormal band, and corrected for it by the average of the withering degree of the 9th and 11th bands on both sides, which was 0.835. As a contrast, the 13th band had a difference of 0.32 from the 12th band on the left, exceeding 0.25, but its difference from the 14th band on the right was only 0.08, not exceeding 0.25, so it was not judged as an abnormal band; this is a normal drop at the front, which can be distinguished from local isolated tremors.
[0063] Then, the average of the withering degree of the 19th and 20th bands, 0.115, was taken as the blue baseline, with a maximum value of 0.90. Each element of the sequence was normalized according to this baseline and the maximum value. After normalization, the blue end was close to 0, and the withering start end was close to 1. Order-preserving regression was performed on the normalized sequence to obtain a monotonically increasing withering degree sequence along the ear axis. In this embodiment, the normalized sequence was already monotonically increasing from the withering start end, so order-preserving regression did not change its value. The difference in withering degree between adjacent bands was calculated band by band starting from the withering start end: the normalized value for the 12th band was approximately 0.898, and for the 13th band, it was approximately 0.490, with a difference of approximately 0.408, the largest in the entire sequence. The differences between adjacent bands at other locations were relatively small, with the second largest being approximately 0.153, about 37.5% of the largest. Therefore, the withering front is located at the boundary between the 12th and 13th bands, that is, at the end of the 12th band starting from the withering beginning.
[0064] Finally, the axial withering progress was calculated as 12 divided by 20, which equals 0.60, meaning the withered section accounts for approximately 60% of the ear length. Comparing 0.60 with the suitable harvesting range of 0.45 to 0.75, 0.60 falls within this range. Therefore, the harvesting period determination result for the ear in this embodiment is that it is within the harvesting period. As a control, such as Figure 7 As shown, when determining the average color value of the entire ear, the average value of the entire ear in this embodiment is approximately 0.52. An early-maturing ear with a withering front between the 6th and 7th bands and only about 30% of its section is withered has an average value of approximately 0.49; a late-maturing ear with a withering front between the 16th and 17th bands and about 80% of its section is withered has an average value of approximately 0.55. The average values of the entire ear at adjacent maturity stages differ by approximately 0.03, and the range of the three is 0.06. Considering the fluctuations caused by imaging conditions and individual background color, it is difficult to distinguish the three states based on this alone. However, the axial withering progress of the three is 0.60, 0.30, and 0.80, respectively, with a range of 0.50; both are values between 0 and 1, but the latter's range is more than eight times that of the former, making the distinction obvious. The above values are illustrative examples, demonstrating that this invention has better separability at the critical harvest period.
[0065] Example 2: In this example, the harvesting period of Prunella vulgaris spikelets from another production area was determined. The spikelets were collected on a cloudy day with diffused light and a darker background color. Considering that the spikelets were relatively short, the spikelet area was divided into 16 strips along the spikelet axis from the beginning of withering. The degree of withering was calculated by calibrating and converting the a* component of the spikelet pixels in the CIE Lab color space, and its value increased as the withering worsened. Starting from the point of decay, the decay degree of the 1st to 7th bands is approximately 0.911, 0.902, 0.898, 0.889, 0.871, 0.852, and 0.844, respectively; the decay degree of the 8th band increases to 0.845 due to a small piece of dead leaf attached to its surface; the 9th band drops to 0.508; and the decay degree of the 10th to 16th bands is approximately 0.435, 0.317, 0.208, 0.149, 0.106, 0.095, and 0.083, respectively.
[0066] Anomaly assessment was performed on each band: the difference between the 8th band (0.845) and its adjacent 7th band (0.844) and 9th band (0.508) was 0.001 and 0.337, respectively. Since the difference with the left side did not exceed the preset fluctuation range of 0.25, it was not judged as an abnormal band. There were no bands in the entire sequence whose differences with both adjacent bands exceeded 0.25, so there were no abnormal bands in this embodiment. The average of the withering degree of the 15th and 16th bands (0.089) was taken as the cyan benchmark. The maximum value of the sequence was 0.911. The sequence was normalized according to this benchmark and the maximum value. The cyan end was close to 0, and the withering start end was close to 1. Order-preserving regression was performed on the normalized sequence: In this embodiment, the normalized value of the 8th band is approximately 0.920, which is slightly higher than the 0.919 value of the 7th band. This violates the principle of monotonic non-increase. Order-preserving regression merges these two bands into their average value of approximately 0.919, while the remaining bands remain unchanged. This yields the monotonic desiccation degree sequence along the direction of the ear axis.
[0067] Starting from the point of decay, the difference in decay degree between adjacent bands is calculated: after the above treatment, the 8th band has a decay rate of approximately 0.919, and the 9th band has a decay rate of approximately 0.510. The difference between the two is approximately 0.409, which is the largest in the entire sequence, and the second largest is approximately 0.144. Therefore, the decay front is located at the boundary between the 8th and 9th bands. The axial decay progress is calculated as 8 divided by 16, which equals 0.50, meaning that the decayed section accounts for exactly half of the ear length, falling into the suitable harvesting range of 0.45 to 0.75, and the ear is determined to be at the harvesting period. This embodiment illustrates that even when using the a* component, changing the number of bands, and encountering localized leaf decay interference, this method can still stably locate the decay front and provide a reasonable harvesting period determination.
[0068] Example 3: This example illustrates the specificity of the method and the preconditioning for harvesting, representing a boundary situation that should not be considered as being in the harvesting period. The collected ears of fruit are generally still green and have not yet begun to wither: After dividing the ear area into 20 equal strips, the degree of withering in each strip fluctuates slightly between 0.08 and 0.19. The proportions of withered brown pixels at both ends, which occupy one-tenth of the ear length, are 0.06 and 0.05 respectively, with a difference of only 0.01, which is lower than the preset confidence limit of 0.15. Therefore, the beginning of withering is not discernible.
[0069] At this point, this method does not proceed to frontal localization of the band sequence, but first performs preliminary state discrimination: calculating the dynamic range of the sequence. Since the difference in the proportion of withered brown at both ends is insufficient in this example, the starting point of withering is indistinguishable, and the axial positive direction and the green end are not yet determined, the green end band is not used as the benchmark. Instead, the low-value region of the entire sequence, independent of direction, is used as the benchmark: the lower quantile of the withering degree of all bands, approximately 0.09, is taken as the benchmark, and the maximum value of the sequence is approximately 0.19. The difference between the two is approximately 0.10, which is lower than the preset lower limit of the dynamic range of 0.30. This indicates that there is no boundary between the withered and still-green sections on the ear. If normalization is forcibly performed at this point, the denominator will only be approximately 0.10, amplifying the noise to an order of magnitude comparable to the signal, and the obtained frontal position will have no physical basis. Therefore, this method instead uses the absolute color index calibrated by the color card to determine the overall state: in this embodiment, the degree of withering of all strips is lower than the preset upper limit of 0.25 for full green, indicating that the whole ear of fruit is still green and has not yet reached the harvest period, which is consistent with its actual state, and the axial withering progress is not output.
[0070] Conversely, if the withering degree of all stripes on a certain ear of fruit is higher than the preset lower limit of total withering (0.75), and the difference between its maximum value and the baseline of the low value area of the entire sequence is also lower than the lower limit of the dynamic range (0.30), then the ear of fruit is determined to be withered and past the harvest period. If the dynamic range is lower than the lower limit, but the withering degree of each strip is neither lower than the upper limit of whole green nor higher than the lower limit of total withering, then it is determined to be undeterminable and a re-harvesting is prompted. The above-mentioned pre-state discrimination enables this method to provide conclusions consistent with reality in the two boundary cases of overall whole green and overall whole withering where there is no frontal location, without fabricating frontal positions.
[0071] The whole green ear of fruit involved in this embodiment, as well as the whole withered ear of fruit mentioned above, do not have both withered brown and green sections in their images at the same time, so they are not the ear of fruit targeted by this method. This method is based on the premise that there are two sections, withered and green, along the ear axis, and the difference in the proportion of withered brown pixels at both ends of the preset section is not lower than the confidence lower limit. As for whether a distinguishable single front is formed, this method does not make any prior assumptions, but judges whether the ratio of the maximum and the second largest adjacent difference is not lower than the discrimination multiple when locating the front. If the ratio is insufficient, it is judged as undeterminable and the axial withering progress is not output.
[0072] The aforementioned cases where the difference between the two ends is insufficient to reach the lower confidence limit, and the cases where the ratio of the maximum to the second largest value is insufficient to distinguish multiples of multiple fronts, as described later, are also not applicable to the ear of fruit targeted by this method. These cases are screened out by the pre-state discrimination and front quality control when entering or completing front positioning, and the axial withering progress is not output. The pre-state discrimination here is the qualification screening performed on the input image when this method is put into use, to prevent entry into front positioning in cases where there is no withering front. For ear of fruit that simultaneously has both brown and blue sections with sufficient color difference, its dynamic range is usually higher than the aforementioned lower limit, and the pre-state discrimination allows it to proceed to steps 102 to 106; if the color difference between the two sections is weak, or if the dynamic range is still lower than the lower limit due to imaging, calibration, or occlusion, then even if two sections are visually suspected to exist, they are treated as undeterminable.
[0073] Example 4: This example describes the assessment of a Prunella vulgaris spike at the critical harvest stage with high imaging resolution to illustrate the handling when the number of bands is large. The spike area is divided into 32 bands along the spike axis starting from the point of decay. The median of the decay degree calculated by hue is taken for each band. The sequence gradually decreases from around 0.90 at the beginning of decay, dropping from 0.81 to 0.46 between the 20th and 21st bands, a decrease of 0.35, and then to around 0.09 at the cyan end. During this period, the 25th band's decay degree increases to 0.62 due to a reflection, and the difference between it and the 24th band (0.21) and the 26th band (0.19) on both sides is 0.41 and 0.43 respectively, both exceeding the preset fluctuation range of 0.25. It is judged as an abnormal band and corrected by the average of 0.20 on both sides.
[0074] After normalizing the sequence using the average of 0.10 from the last three bands at the blue end as the blue baseline, order-preserving regression was performed to obtain a monotonically non-increasing sequence. The difference between adjacent bands was calculated band by band starting from the point of decay: the normalized difference for the 20th band was approximately 0.888, and for the 21st band, it was approximately 0.450, with a difference of approximately 0.438, the largest in the entire sequence. Therefore, the decay front was located at the boundary between the 20th and 21st bands. The axial decay progress was calculated as 20 ÷ 32 = 0.625, falling within the suitable harvesting range of 0.45 to 0.75, indicating that the ear of fruit was at harvest time. Compared to Example 1, this example has denser bands, higher axial resolution, and more precise front location: in Example 1, each band corresponds to 5% of the ear length, while in this example, each band corresponds to only about 3.1%, thus the quantification step size for the front position is smaller. This embodiment illustrates that the method can be implemented with different numbers of stripes. Increasing the number of stripes mainly improves the accuracy of frontal positioning without changing the overall conclusion of the judgment.
[0075] Comparative Example 1, as a contrast to Example 1, used the existing whole-ear color mean method to determine the maturity of ears of fruit at the same critical harvest period in Example 1. Because the whole-ear color mean method treats the ear as a uniformly colored whole and only calculates the single mean value of the whole-ear color as a maturity criterion, it does not depict the spatial process of withering along the ear axis. This results in the whole-ear mean value of ears with half green and half withered at the critical harvest period being approximately 0.52. This is very close to the whole-ear mean value of 0.49 for an early ear where the withering front is still between the 6th and 7th bands, and the whole-ear mean value of 0.55 for a late ear where the withering front has reached between the 16th and 17th bands. The pairwise differences between the three whole-ear mean values are only about 0.03, and the range is only 0.06.
[0076] Therefore, Comparative Example 1 cannot reliably distinguish between the three states of early, critical, and late harvest at the critical harvest period, easily misjudging ears that have not yet reached the harvest period or have already passed the harvest period as being at the harvest period. In contrast, Example 1, using the method of the present invention, obtained axial withering progress of 0.30, 0.60, and 0.80 for ears in the above three states, respectively, with a range of 0.50, which is more than eight times the average range of the whole ear, thus correctly distinguishing the three states. It can be seen that the present invention has better distinguishability at the critical harvest period compared with the average color of the whole ear method. The above values are all illustrative examples.
[0077] In practical applications, this method also needs to handle several boundary and abnormal situations. First, when the number of pixels obtained from the initial segmentation of the ear region is too small to support the stable calculation of the representative value within the strip, the ear is marked as pending evaluation and skipped, and the harvest period determination result is not output. Processing is then carried out after a clearer image is reacquired. Second, when all the ear pixels in a non-end strip fall into extremely bright or extremely dark areas and the representative value reaches the boundary value, the average of the representative values of the adjacent strips on both sides is used to replace the representative value of that strip to avoid the boundary value contaminating the withering degree sequence.
[0078] Third, when a sudden change in light intensity during continuous sampling causes an overall shift in the withering degree sequence of two consecutive samplings of the same ear, since this method uses the green end of the ear itself as the normalization benchmark, the normalized withering front position is not sensitive to the overall shift, and therefore no additional correction is required. Fourth, when there are patches of reflection or large areas of bract residue on the ear surface, causing the number of abnormal bands to exceed a preset proportion of the total number of bands, the current sampling is deemed unreliable and a re-sampling is prompted, rather than forcibly correcting excessive bands. Fifth, when the system recovers from a power outage or restart and loads previously saved parameters such as the appropriate sampling interval, a check is first performed using a batch of ears in known states to confirm that the parameters are correct before proceeding with the judgment. The above boundary and anomaly handling further ensures the robustness of this method under real field conditions.
[0079] As can be seen from the above embodiments and comparative examples, the core of this invention lies in explicitly extracting the spatial process of the ear turning from green to withered along the ear axis from the state masked by the average color of the entire ear. Since the distance from the withering front to the starting point of withering directly corresponds to where the withering has progressed along the entire length of the ear, the fact that the withering front is located in the middle of the ear is still clearly distinguishable during the period when the average color of the entire ear is least sensitive at the critical harvest period. Normalization based on the green end of the ear itself makes the criterion not dependent on a fixed absolute color threshold, thus adapting to different batches of light and different ear background colors; abnormal band correction and monotonicity processing suppress the shaking caused by local insect spots and reflections, improving the identifiability of the main drops at the front; when the maximum difference is tied or its relative second largest value is not significant enough, one is selected according to preset rules or an undetermined value is output. All of the above technical effects are directly brought about by the technical means of this method, without the need for additional imaging hardware or reliance on complex deep network models, making it easy to deploy at low cost at field sampling points.
[0080] Example 5 illustrates the process of determining the harvest period based on the sampling area. For example... Figure 10 As shown, within a sampling area of a *Prunella vulgaris* planting area, images of several fruit spikes were randomly collected. Steps 101 to 105 were performed on each fruit spike to obtain the axial withering progress of each spike. In this embodiment, the axial withering progress of each spike ranged from 0.20 to 0.95, with most concentrated between 0.55 and 0.70. Individual spikes showed earlier or later rates due to differences in microclimate. The median of the axial withering progress of each spike was taken as the population axial withering progress for the sampling area, yielding approximately 0.64. Because the median was used instead of the average, the axial withering progress of individual spikes that were too early or too late did not significantly affect the population value, making the population determination robust to a few abnormal plants.
[0081] Comparing the canopy axial dieback progress of 0.64 with the suitable sampling range of 0.45 to 0.75, 0.64 falls within this range, therefore the sampling area is determined to be in the harvesting period and harvesting can be arranged. If the canopy axial dieback progress is lower than the suitable sampling range, the sampling area is determined to be not yet in the harvesting period, and harvesting should be postponed, with images re-collected and reassessed several days later; if it is higher than the suitable sampling range, the sampling area is determined to be past the harvesting period, and harvesting should be carried out as soon as possible to reduce the loss of effective components and yield. This method of determining harvesting based on sampling area avoids frequent changes in harvesting decisions due to differences in the maturity progress of individual plants, facilitating unified harvesting arrangements during large-scale planting.
[0082] The calibration of several preset parameters in this method is further explained below. The preset fluctuation amplitude is used to determine abnormal bands, and its value range is generally 0.15 to 0.35, typically 0.25. During calibration, a batch of ears with normal surfaces, no obvious insect spots or reflections can be collected. The distribution of the difference in withering degree between adjacent bands is statistically analyzed on the 0 to 1 scale calculated in step 102. The high quantile of this distribution is taken as the preset fluctuation amplitude. The rougher the ear surface and the stronger the reflection during imaging, the larger the preset fluctuation amplitude value. The suitable harvesting interval is used to map the axial withering progress to the harvest period determination result, and its value is generally 0.45 to 0.75. During calibration, images of a batch of ears with known optimal harvest periods can be collected and their axial withering progress calculated. The range of these progress values is taken as the suitable harvesting interval. The upper and lower boundaries of the suitable harvesting interval can be adjusted accordingly for ears from different origins and for different uses.
[0083] The aforementioned preset parameters belong to different scales and should be distinguished during use. The preset fluctuation amplitude, lower limit of dynamic range, upper limit of full green, and lower limit of full withering are all taken on a fixed calibration scale of 0 to 1, as described in step 102 after correction using the color chart and white balance. These values are used for judgment before normalization or when no normalization is performed. The preset tolerance and minimum drop amplitude are taken on the scale after normalization of the single-plant sequence in step 103. The discrimination factor is the ratio of the largest to the second largest adjacent difference, and is a dimensionless quantity. The appropriate range is taken on the scale of axial withering progress, i.e., the proportion. The distinction between these scales ensures that the same value is not misused for different criteria.
[0084] Furthermore, this method can be used in conjunction with harvesting equipment. When a sampling area is determined to be in the harvesting period, the system can automatically issue a harvesting prompt to harvesters or harvesting machinery; when it is determined that the harvesting period has not yet arrived, the determination result can be recorded and the time for the next re-harvest can be scheduled. This method can also be repeated at multiple growth points of the same ear to obtain a curve of axial withering progress over time, which can be used to predict when the ear will reach the suitable harvesting range, thereby allowing for more precise harvesting planning. All of the above extended applications are based on the axial withering progress given by this method and do not change the core process of this method of locating the withering front and calculating the axial withering progress.
[0085] The withering front, upon which this method is based, is a direct spatial manifestation of the phenological process of the ear turning from green to withered. Therefore, compared with existing detection methods based on the overall ear color, ear size, or near-infrared spectral composition, this method characterizes the ripening state of the ear from a new dimension. Regarding image acquisition, to ensure the reliability of the withering degree sequence, the length direction of the ear should be roughly aligned with a certain coordinate axis of the image, and the ear should fill the frame as much as possible without being obstructed by other objects. When multiple ears appear in the same frame, each ear region can be segmented first, and then this method can be applied independently to each ear region. When there are differences in the color response of the imaging equipment between different batches, a standard color chart can be photographed during acquisition to perform color correction on the image before extracting color components, thereby further improving the comparability of withering degrees between different devices and different batches.
[0086] For *Prunella vulgaris* varieties where withering progresses along the rachis from one end, forming a single, identifiable front between the withered and still-green sections, this method can be applied by recalibrating the color components and thresholds. The correspondence between the selected color components and the green and withered ends may vary depending on the variety's coloration; simply select a color component that monotonically changes with the withering process of that variety as a measure of the degree of withering, while the remaining steps of this method remain unchanged. Varieties whose withering morphology does not meet the above criteria, such as those exhibiting patchy withering or withering simultaneously from both ends, are not applicable to this method. In this method, they will be deemed undeterminable because the difference in the proportions at both ends is insufficient to reach a reliable lower limit, or the ratio of the maximum to the second-largest value is insufficient to distinguish the multiple. Therefore, this method can serve as an objective and low-cost means to assist in determining the harvesting timing of *Prunella vulgaris* in actual harvesting.
[0087] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for determining the harvest period using images of the withering front of Prunella vulgaris spikelets, characterized in that, include: Obtain an image of the *Prunella vulgaris* spikelet to be judged. The image contains a complete single spikelet, on which brownish-yellow and bluish-green sections are distributed sequentially along the axis. The image is segmented to obtain the ear region. The direction of the ear axis in the ear region is determined. The proportion of withered brown pixels in the two preset segments at the two ends of the ear region along the ear axis is counted. The end with the higher proportion is determined as the withering start end. The difference between the two proportions is not lower than the preset confidence lower limit; otherwise, it is determined as undeterminable. Starting from the point of decay, the ear region is divided into N strips arranged sequentially along the ear axis, where N is an integer not less than 3. Extract the color components from each band that represent the degree of fruit ear turning from green to withered, and calibrate them so that their values increase as the fruit ear withers more severely, to obtain a sequence of withering degree from the beginning of withering to the other end. Using the color component of at least one band located at the cyan end as a reference, the ashes degree sequence is normalized, wherein the difference between the maximum value of the sequence and the reference is not lower than a preset lower limit of the dynamic range; otherwise, it is determined as undeterminable. The normalized withering degree sequence was monotonicized to obtain a monotonic withering degree sequence that does not increase along the ear axis. Calculate the difference in the degree of withering between two adjacent bands in the monotonic withering degree sequence. When the maximum value of the difference satisfies the preset significance condition, the boundary position between the two adjacent bands that obtain the maximum value is determined as the withering front of the ear of fruit. Otherwise, it is determined as undeterminable. Calculate the ratio of the axial distance from the withering front to the withering initiation point to the ear length of the ear region, as the axial withering progress; The harvesting period of the *Prunella vulgaris* spikelets is determined based on the axial decay progress. The harvesting period determination result is one of the following: not yet harvesting, in the harvesting period, or past the harvesting period.
2. The method according to claim 1, characterized in that, Dividing the ear region equally to obtain multiple stripes arranged sequentially includes: determining the two endpoints of the ear region along the axis of the ear; Divide the ear region between the two endpoints into N strips along the ear axis, where N is an integer not less than 8 and not greater than 40. Each strip covers the entire width of the ear region at the corresponding axial position in the direction perpendicular to the ear axis.
3. The method according to claim 1, characterized in that, The color component characterizing the degree of change of the fruit bunch from green to withered is one of the following: the representative value of the closeness of the withered brown color of each fruit bunch pixel in the band, wherein the closeness of the withered brown color is obtained by monotonically decreasing the hue circle distance between the hue of the pixel and the preset withered brown reference hue range. The representative value of the withering degree of the spike pixels in this band, obtained by calibration mapping of the a* component in the CIE Lab color space; The proportion of brownish-yellow pixels to the ears of fruit pixels within this band; The representative value is the mean or median of all ear pixels within the band for the corresponding component.
4. The method according to claim 1, characterized in that, The significance condition is that the maximum value is significantly greater than the adjacent difference at the other drop points. Determining the significance condition and identifying the withering front includes: taking the adjacent difference whose maximum difference with the difference between the withering degree of the two adjacent bands does not exceed a preset tolerance as the near maximum difference, and grouping the near maximum differences that are adjacent to each other in the axial direction into the same candidate cluster. When the near maximum difference constitutes two or more candidate clusters that are axially separated from each other, it is determined to be undeterminable, which indicates that there are two or more drops with similar amplitudes on the ear of fruit. When the near maximum difference constitutes only one candidate cluster, the largest of the adjacent differences that do not belong to the candidate cluster is taken as the second largest value. The significance condition is satisfied only if the maximum value is not lower than the preset minimum drop range and one of the following conditions is met: the second largest value does not exist, or the second largest value is zero. The second largest value is greater than zero and the ratio of the maximum value to the second largest value is not less than the preset discrimination multiple; When the condition is met, the boundary position corresponding to the adjacent difference that achieves the maximum value is taken as the withering front in the candidate cluster; when there are more than two adjacent differences that achieve the maximum value, the one that is closest to the midpoint of the ear region in the direction of the ear axis is taken from the corresponding boundary position; if the distance from the two boundary positions to the midpoint is the same, the one that is closer to the beginning of the withering is taken.
5. The method according to claim 1, characterized in that, Before normalization, the bands in the withering degree sequence whose absolute values of the difference between the withering degree and the bands on both sides exceed the preset fluctuation range are identified as abnormal bands, and the withering degree of the abnormal band is corrected by the average value of the withering degree of the bands on both sides. The monotonicity processing includes: performing order-preserving regression on the normalized withering degree sequence along the ear axis to obtain a monotonic withering degree sequence that does not increase along the ear axis.
6. The method according to claim 1, characterized in that, The steps to determine the harvest period include: comparing the axial decay progress with the pre-defined suitable harvesting range; When the axial drying progress falls into the suitable mining range, it is determined to be in the harvesting period; When the axial withering progress is lower than the suitable mining range, it is determined that the harvesting period has not yet arrived; When the axial drying progress is higher than the suitable mining range, it is determined that the harvesting period has passed.
7. The method according to claim 1, characterized in that, Also includes: The axial dieback rate of multiple *Prunella vulgaris* spikelets within the same sampling area was determined, and the statistical value of the axial dieback rate of each spikelet was taken as the population axial dieback rate of the sampling area. The harvesting period for the sampling area was determined based on the axial decay progress of the population.
8. The method according to claim 1, characterized in that, The direction of the ear axis in the ear region can be determined by one of the following methods: find the minimum bounding rectangle of the ear region, determine the direction of the long side of the minimum bounding rectangle as the direction of the ear axis, take the length of the long side of the minimum bounding rectangle as the length of the ear length, and divide the ear region into equal parts along the long side direction. The skeleton is extracted from the ear region, and the skeleton is parameterized by the arc length. The tangent direction of the skeleton at each point is determined as the direction of the ear axis at that point. The ear length is the total arc length of the skeleton from the beginning of withering to the other end. The equal division is divided along the skeleton by equal arc lengths. Each band covers the entire width of the ear region in the normal direction at the corresponding point of the skeleton.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 8.
10. A device for determining the harvesting period of Prunella vulgaris spikelets using images, characterized in that, It includes a processor and a memory, the memory storing a computer program that, when executed by the processor, implements the method as described in any one of claims 1 to 8.
