Seedling shoot length detection method and system based on image processing

CN123015585APending Publication Date: 2026-10-30YUNNAN FORESTRY TECHNOLOGICAL COLLEGE +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611035997.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-13
Publication Date
2026-10-30

AI Technical Summary

Benefits of technology

本发明中,通过基于轮廓切向与法向夹角的跳变检测获取种子胚芽起点候选区域,避免对整幅图像进行全局灰度梯度计算带来的干扰,提高胚芽识别的定位精度,通过在候选点邻域构建灰度梯度方向与切向方向的夹角一致性评分,增强起点筛选的稳定性与针对性,在主轴路径跟踪过程中引入局部轮廓像素灰度梯度方向分析,并依据夹角一致性动态修正扭曲段路径,有效提高主轴追踪路径的几何稳定性及连续性,基于各时间帧主轴点坐标集合构建芽长序列,并结合生长速率的差值趋势分析提取变动频次与区间映射,能够反映种子在不同生长阶段的活性变化趋势,实现在时间维度上对种子个体生长活力的量化评估。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015585A_ABST
    Figure CN123015585A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of seed detection, in particular to a seed sprout length detection method and system based on image processing, which comprises the following steps: extracting seed outer contour pixels, calculating tangent and normal vectors, screening embryo sprout starting point coordinates, screening consistent candidate points based on gray gradient directions, generating positioning information, analyzing sprout body twisted sections, correcting main shaft paths, calculating time sequence sprout length sequences, obtaining growth rate variation characteristics, encoding, generating sprout length gradient vitality evaluation index set, in the application, the starting point candidate area of the seed embryo is obtained through jump detection based on the included angle of the contour tangent and the normal, the included angle consistency score of the gray gradient direction and the tangent direction is constructed in the neighborhood of the candidate point, the stability and pertinence of the starting point screening are enhanced, the sprout length sequence is constructed based on the main shaft point coordinate set of each time frame, the variation frequency and interval mapping are extracted in combination with the difference trend analysis of the growth rate, and quantitative evaluation of the growth vitality of the seed individual in the time dimension is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of seed detection technology, and in particular to a seed bud length detection method and system based on image processing. Background Technology

[0002] The field of seed testing technology involves non-destructive identification and evaluation of seed quality, physiological characteristics, and growth potential. Core aspects include seed vigor analysis, seed germination rate determination, seed morphological feature extraction, and seed growth process monitoring. This technology typically combines computer image processing, bioinformatics detection, and statistical modeling to acquire data and analyze characteristics of seed changes under natural or artificially induced conditions. In particular, it has developed systematic processing workflows for automated image acquisition, image segmentation, feature extraction, and parameter measurement to support various applications such as seed breeding, germplasm screening, and agricultural production quality control.

[0003] Traditional seed sprout length detection methods involve acquiring images of seeds during germination and then analyzing the length of the seed sprouts within those images. These methods typically rely on single or multiple frames of image data. First, basic preprocessing operations such as image grayscale conversion and binarization are used to define the image contour boundaries. Then, edge detection algorithms based on pixel grayscale gradients, such as the Sobel or Canny operators, are used to identify the sprout outline. Geometric analysis methods, such as connected component analysis or skeleton extraction, are then used to extract the main axis path of the sprout. Finally, the length of the seed sprout is calculated by pixel counting or image coordinate difference. Summary of the Invention

[0004] To address the technical problems existing in the prior art, embodiments of the present invention provide a seed sprout length detection method based on image processing, comprising the following steps: To achieve the above objectives, the present invention adopts the following technical solution: a seed bud length detection method based on image processing, comprising the following steps: S1: Obtain the pixel sequence of the outer contour of each seed in the seed germination image in the petri dish, calculate the tangential direction vector and the corresponding normal direction vector between adjacent positions of each boundary pixel, filter out regions whose jump amplitude exceeds the edge abrupt change angle threshold, and generate a candidate coordinate set of the embryonic origin. S2: Based on the candidate coordinate set of the germ starting point, obtain the gray-level gradient direction vector of each pixel in the neighborhood of the candidate point and the corresponding contour tangential direction vector, construct the direction consistency score of the candidate point, filter the candidate points whose direction consistency score is greater than the direction consistency threshold, and generate germ starting point positioning information. S3: Based on the germ starting point positioning information, obtain the corresponding local pixel set of the germ outline according to each path unit, analyze and identify the twisted segment, perform average offset vector superposition operation on the coordinates of the main axis points in each twisted segment, update the main axis point coordinate sequence, and generate the corrected germ main axis path sequence. S4: Call the corrected embryo spindle path sequence, accumulate the spindle path of each time frame according to the Euclidean distance between adjacent points, sort all length values ​​according to the time frame shooting timestamp, construct a single seed sprout length array arranged by time, and generate a seed individual temporal sprout length sequence. As a further aspect of the present invention, the candidate coordinate set of the germinal origin includes a boundary angle difference jump point coordinate group, a starting point structural abrupt change region label, and a candidate point pixel index list; the germinal origin positioning information includes the precise location of the positioning point coordinates, the direction consistency score result, and the gradient matching vector set; the corrected germinal axis path sequence includes a continuous principal axis pixel coordinate sequence, a path point offset correction record, and a twist segment identifier index set; and the seed individual temporal bud length sequence includes a time frame index sequence, a principal axis length value for each frame, and a length change sorting record.

[0005] As a further aspect of the present invention, the specific steps of S1 are as follows: S101: Obtain the pixel sequence of the outer contour of each seed in the seed germination image in the petri dish, construct a set of seed outer contour pixels according to the edge pixel arrangement order, perform differential processing on the coordinates of adjacent positions of each pixel in the contour set, extract the direction vector between continuous pixels, and generate a sequence of contour tangential direction vectors. S102: Call the direction information of each pixel in the contour tangential direction vector sequence, construct a unit normal vector in the direction perpendicular to the tangential direction in the normal direction of each pixel, and perform cosine calculation on the angle between each pair of tangential direction vectors and normal direction vectors to obtain a continuous boundary point angle sequence. Perform coordinate mapping rearrangement on the sequence to obtain a boundary angle difference change value sequence. S103: Compare the magnitude of each value in the boundary angle difference change value sequence with the edge mutation angle threshold, aggregate the positions where the continuous angle mutation exceeds the edge mutation angle threshold, mark the corresponding pixel coordinates, and arrange the coordinate regions that meet the mutation criteria in order to generate a candidate coordinate set for the germinator.

[0006] As a further aspect of the present invention, the specific steps of S2 are as follows: S201: Based on the candidate coordinate set of the germination starting point, extract the candidate point positions in the original seed germination image, construct a fixed window region with the center pixel as the core in the neighborhood of each candidate point, calculate the derivative difference of the gray value of the pixel in the window along the X and Y directions respectively, and perform arctangent operation on the derivative to obtain the set of gradient directions of the candidate neighborhood. S202: Call the gradient direction vector corresponding to each pixel in the candidate neighborhood gradient direction set, and calculate the angle between the gradient direction vector and the tangential direction vector of the contour boundary in the neighborhood of the candidate point. Construct a direction consistency index based on the mean cosine value of the angle, and generate a candidate point direction consistency score list. S203: Based on the comparison between the score value of each candidate point in the candidate point orientation consistency score list and the set orientation consistency threshold, candidate points with score values ​​greater than the orientation consistency threshold are extracted, and the spatial coordinates are aggregated and arranged to form an index structure to generate germ starting point positioning information.

[0007] As a further aspect of the present invention, the specific steps of S3 are as follows: S301: Based on the germ starting point positioning information, extract the corresponding bud region in the seed germination image, retrieve connected pixels for the region pixel by pixel along the foreground direction of the image starting from the starting point coordinates, stitch the paths of continuous foreground pixels and construct an ordered point sequence to obtain a directional path point index set from the starting point to the end of the germ, and generate an initial main axis path point sequence. S302: Call the coordinates of the two endpoints corresponding to each path unit in the initial main axis path point sequence, construct the path direction vector, extract the local pixel set within the edge of the bud contour in the neighborhood of each path unit, perform derivative difference calculation on the gray gradient direction of the pixel and construct the direction vector, calculate the angle between each group of path direction vectors and the corresponding local pixel direction vector, and output the angle value distribution to generate the path unit angle difference distribution group. S303: Based on the angle distribution data of the path units in the path unit angle difference distribution group, compare them item by item with the gray-level gradient-direction consistency threshold, add a distortion mark to the path units that do not meet the angle distribution concentration requirements, perform position vector offset operation on the path points in the distortion path segment, update the coordinates of the main axis points in each segment according to the average offset value, and generate the corrected germ main axis path sequence.

[0008] As a further aspect of the present invention, the gray-level gradient-direction consistency threshold is set by using the average value and standard deviation of the cosine value of the angle between the local pixel gray-level gradient direction vector and the path direction vector in all path units, and using the sum of the average value and standard deviation of the cosine value of the angle as the gray-level gradient-direction consistency threshold. A distortion mark is added to the path units whose cosine value of the angle is lower than the gray-level gradient-direction consistency threshold.

[0009] As a further aspect of the present invention, the specific steps of S4 are as follows: S401: Call the set of coordinates of the main axis points corresponding to each time frame in the corrected bud main axis path sequence, perform two-dimensional Euclidean distance calculation between adjacent coordinate points, and accumulate the distance values ​​between all adjacent points in the same time frame to form a length value. Record the length data corresponding to each time point according to the frame sequence number to generate a set of time frame bud length measurement values. S402: Based on the frame number corresponding to each group of length values ​​in the time frame bud length measurement value set, extract the timestamp information of the shooting frame, and sort the measurement values ​​in ascending order based on the timestamp, construct a one-to-one mapping relationship between the time series and the corresponding length values, and generate a shooting time sequence bud length mapping table. S403: Based on the length data arranged in time sequence in the shooting time sequence bud length mapping table, each data group is assigned to an independent sequence set according to its seed number, and the bud length changes under continuous time frames are recorded in the same sequence to construct a time sequence length array structure for single seeds and generate a seed individual time sequence bud length sequence.

[0010] As a further aspect of the present invention, the method further includes the following steps: S5: Based on the individual seed bud length sequence, calculate the average growth rate value over the time period, count the number of changes and interval differences in the seed's growth rate throughout the germination stage, and combine the maximum range of changes and the length of the most frequent interval to record the mapping results of each seed in the time period and rate interval as coded entries, thereby generating a set of bud length gradient vitality evaluation indicators. The set of indicators for assessing shoot length gradient vigor includes the average growth rate distribution range, vigor level coding value, and shoot length fluctuation frequency index.

[0011] As a further aspect of the present invention, the specific steps of S5 are as follows: S501: Based on the shoot length values ​​and corresponding timestamps recorded in adjacent time frames in the seed individual temporal shoot length sequence, calculate the shoot length difference for each pair of adjacent time frames and divide it by the time interval length. Arrange the growth rate scalar obtained in the time interval into one-dimensional sequence data in chronological order to generate the average growth rate sequence of the time interval. S502: Based on the growth rate scalar of each time period in the average growth rate sequence of the time period, the change in the sign and the dispersion of the growth rate during the entire germination process are statistically analyzed. The number of times the rate increases or decreases is recorded and the frequency of occurrence of each rate interval is calculated. The difference between the upper and lower bounds of the rate interval is calculated to obtain the statistical parameters of the change in bud length rate. S503: Based on the maximum rate interval span, the highest frequency rate interval and the corresponding time period index recorded in the statistical parameters of the sprout growth rate change, establish a coding mapping relationship between the time period number and the rate interval number for each seed, aggregate and organize the coding mapping records and write them into the same index set structure to generate a sprout growth gradient vitality evaluation index set.

[0012] A seed sprout length detection system based on image processing, the system comprising: The candidate starting point screening module obtains the pixel sequence of the outer contour of each seed in the seed germination image in the petri dish, calculates the tangential direction vector and the corresponding normal direction vector between adjacent positions of each boundary pixel, filters regions whose jump amplitude exceeds the edge abrupt change angle threshold, and generates a set of candidate coordinates for the starting point of the germ. The starting point positioning and recognition module obtains the gray-level gradient direction vector of each pixel in the neighborhood of the candidate point and the corresponding contour tangential direction vector according to the candidate starting point candidate coordinate set, constructs the candidate point direction consistency score, filters candidate points with direction consistency scores greater than the direction consistency threshold, and generates the starting point positioning information of the germ. The bud main axis correction module, based on the bud starting point positioning information, obtains the corresponding bud contour local pixel set according to each path unit, analyzes and identifies the twisted segment, performs average offset vector superposition operation on the main axis point coordinates in each twisted segment, and updates the main axis point coordinate sequence to generate the corrected bud main axis path sequence. The temporal bud length construction module calls the modified bud main axis path sequence, accumulates the main axis path of each time frame according to the Euclidean distance between adjacent points of the path, sorts all length values ​​according to the time frame shooting timestamp, constructs a single seed bud length array arranged by time, and generates a seed individual temporal bud length sequence. The seed vigor analysis module calculates the average growth rate over a time period based on the individual seed's temporal bud length sequence, counts the number of changes and interval differences in the seed's growth rate throughout the germination stage, and records the mapping results of each seed in the time period and rate interval as coded entries, combining the maximum range of changes and the length of the most frequent interval, to generate a set of bud length gradient vigor assessment indicators.

[0013] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, candidate regions for seed germ starting points are obtained by jump detection based on the angle between the contour tangent and the normal, avoiding interference caused by global gray-level gradient calculation of the entire image and improving the positioning accuracy of germ identification. By constructing a consistency score of the angle between the gray-level gradient direction and the tangent direction in the neighborhood of the candidate point, the stability and specificity of the starting point selection are enhanced. Local contour pixel gray-level gradient direction analysis is introduced during the main axis path tracking process, and the twisted segment path is dynamically corrected based on the consistency of the angle, which effectively improves the geometric stability and continuity of the main axis tracking path. A germ length sequence is constructed based on the set of main axis point coordinates of each time frame, and the frequency of change and interval mapping are extracted by combining the difference trend analysis of the growth rate, which can reflect the activity change trend of the seed at different growth stages and realize the quantitative evaluation of the growth vitality of individual seeds in the time dimension. Attached Figure Description

[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1 This is a schematic diagram of the steps of the present invention; Figure 2 This is a detailed schematic diagram of S1 of the present invention; Figure 3 This is a detailed schematic diagram of S2 of the present invention; Figure 4 This is a detailed schematic diagram of S3 of the present invention; Figure 5 This is a detailed schematic diagram of S4 of the present invention; Figure 6 This is a detailed schematic diagram of S5 of the present invention; Figure 7 This is a system module diagram of the present invention. Detailed Implementation

[0016] The technical solution of the present invention will now be described with reference to the accompanying drawings.

[0017] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.

[0018] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.

[0019] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.

[0020] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0021] Please see Figure 1 This invention provides a seed bud length detection method based on image processing, comprising the following steps: S1: Obtain the pixel sequence of the outer contour of each seed in the seed germination image in the petri dish, calculate the tangential direction vector and the corresponding normal direction vector between adjacent positions of each boundary pixel, obtain the difference sequence of the tangential and normal angles along the contour, filter the regions in the difference sequence whose jump amplitude exceeds the edge abrupt change angle threshold, and generate a candidate coordinate set of the germinator. The edge abrupt change angle threshold refers to the criterion for determining when the tangential and normal angles of a boundary curve change abruptly at consecutive boundary pixels. It is often used for boundary breakpoint or inflection point detection and for identifying areas of abrupt angle changes in geometric structures. S2: Based on the candidate coordinate set of the germinal origin, locate the neighborhood of the candidate point on the original seed germination image, obtain the gray-level gradient direction vector of each pixel in the neighborhood of the candidate point and the corresponding contour tangential direction vector, calculate the angle between the two types of vectors, construct the direction consistency score of the candidate point, compare it with the direction consistency threshold, filter the candidate points with the direction consistency score greater than the direction consistency threshold, and generate germinal origin positioning information. The orientation consistency score refers to the average cosine of the angle between the gray-level gradient directions of all pixels in a local region of the image and the reference direction (such as the edge tangent). The value ranges from [-1, 1], and the closer it is to 1, the more consistent the orientation is. S3: Based on the germ origin location information, track the foreground connected pixels pixel by pixel along the germ extension direction in the germ region, connect the initial main axis path point sequence from the origin to the germ tip, obtain the corresponding local pixel set of the germ outline for each path unit, calculate the local pixel gray-level gradient direction vector and form a vector pair with the path direction vector, count the angle distribution in the path unit and compare it with the gray-level gradient-direction consistency threshold, mark the path unit with consistency below the threshold as a twisted segment, perform the average offset vector superposition operation on the main axis point coordinates in each twisted segment, update the main axis point coordinate sequence, and generate the corrected germ main axis path sequence; The gray-level gradient-direction consistency threshold is a discrimination parameter used to determine whether the deviation between the gradient direction and the path direction exceeds the acceptable range. It is usually set to 0.75, which is the mean cosine similarity. S4: Call the set of coordinates of the main axis points corresponding to the corrected embryo main axis path sequence in multiple shooting time frames, accumulate the main axis path of each time frame according to the Euclidean distance between adjacent points of the path, obtain the bud length value of the time frame, sort all length values ​​according to the shooting timestamp of the time frame, construct the single seed bud length array arranged by time, and generate the seed individual temporal bud length sequence. S5: Based on the individual seed bud length sequence, perform difference operation on the bud length values ​​between adjacent time frames and divide by the corresponding time interval to obtain the average growth rate value of the time period. Count the number of changes and interval differences in the seed growth rate throughout the germination stage. Combine the maximum range of change and the length of the most frequent interval to record the mapping results of each seed in the time period and rate interval as a coding entry and generate a set of bud length gradient vitality evaluation indicators. The average growth rate value is the ratio obtained by using the difference in bud length growth per unit time as the numerator and the difference in shooting time as the denominator. The candidate coordinate set for the starting point of the plumule includes the coordinate set of boundary angle difference jump points, the label of the starting point structural mutation region, and the list of candidate point pixel indices. The plumule starting point positioning information includes the precise location of the positioning point coordinates, the direction consistency score result, and the gradient matching vector set. The corrected plumule main axis path sequence includes the continuous main axis pixel coordinate sequence, the path point offset correction record, and the tortuous segment identifier index set. The seed individual temporal shoot length sequence includes the time frame index sequence, the main axis length value for each frame, and the length change sorting record. The shoot length gradient vitality evaluation index set includes the average growth rate distribution range, the vitality level coding value, and the shoot length fluctuation frequency index.

[0022] Please see Figure 2 The specific steps of S1 are as follows: S101: Obtain the pixel sequence of the outer contour of each seed in the seed germination image in the petri dish, construct a set of seed outer contour pixels according to the edge pixel arrangement order, perform differential processing on the coordinates of adjacent positions of each pixel in the contour set, extract the direction vector between continuous pixels, and generate a sequence of contour tangential direction vectors. After acquiring a binarized image of a single wheat seed germinating in a petri dish with a resolution of 1920x1080 pixels, the process begins by scanning pixels line by line, starting from the top-left corner (0,0). When the first foreground pixel is detected (a white pixel with a value of 255, at coordinates (350, 480), this point is recorded as the starting point of the seed's outer contour. Subsequently, using the current pixel (350, 480) as the center, pixels within its 8-neighborhood are searched clockwise to find the next foreground pixel adjacent to a background pixel (a black pixel with a value of 0). Assuming the next contour point's coordinates are (351, 480), these coordinates are stored in an ordered set of pixels. This process of searching for the next contour point in its 8-neighborhood clockwise is repeated until the coordinates of the next contour point coincide with the starting point (350, 480). At this point, the acquisition of the seed's outer contour pixel sequence ends. This creates an ordered set containing the coordinates of all edge pixels, for example, the initial part of the set might be [(350,480),(351,480),(352,481),(352,482),...]. Next, the coordinates of each pair of consecutive pixels in this contour set are subtracted. Taking the second point (351,480) and the first point (350,480) in the sequence as an example, the coordinates are subtracted: the difference in the X direction is 351 minus 350, resulting in 1; the difference in the Y direction is 480 minus 480, resulting in 0. This yields a vector representing the direction from the first point to the second point. Similarly, for the third point (352,481) and the second point (351,480), the coordinates are subtracted: the difference in the X direction is 352 minus 351, resulting in 1; the difference in the Y direction is 481 minus 480, resulting in 1, thus obtaining the direction vector. This process traverses the entire set of contour pixels, performs a coordinate difference operation on every two adjacent pixels, and finally generates a sequence of contour tangential direction vectors consisting of a series of direction vectors. This sequence accurately describes the local orientation of the seed contour at each point.

[0023] S102: Call the direction information of each pixel in the contour tangential direction vector sequence, construct a unit normal vector in the direction perpendicular to the tangential direction in the normal direction of each pixel, and perform cosine calculation on the angle between each pair of tangential direction vectors and normal direction vectors to obtain a continuous boundary point angle sequence. Perform coordinate mapping and rearrangement on the sequence to obtain a boundary angle difference change value sequence. For the first tangential vector in the sequence, its normal direction is perpendicular to the tangential direction. This is obtained by swapping the X and Y components of the original vector and inverting the sign of one of the components, resulting in a normal vector [0, -1]. In this embodiment, a 90-degree counter-clockwise rotation is uniformly adopted; that is, for a vector [x, y], its normal vector is [-y, x], so the normal vector is [-y, x]. Since the magnitude of this normal vector is 1, it is itself a unit normal vector. For the second tangential vector, its normal vector is [-1, 1]. Subsequently, the cosine of the included angle is calculated for each pair of consecutive vectors in the contour tangential vector sequence. Taking the first and second vectors in the sequence as an example, their dot product is calculated as (1*1) + (0*1), resulting in 1. The magnitudes of the two vectors are then calculated separately: the magnitude of vector 1 is 1, and the magnitude of vector 0 is 1.414. Dividing the dot product result 1 by the product of the two magnitudes (1*1.414), the cosine of the included angle is approximately 0.707. The same calculation is performed on the second and third vectors in the sequence to obtain another cosine value of the included angle. This calculation process is carried out along the entire vector sequence, thus obtaining a sequence of cosine values ​​of the included angles of continuous boundary points. Finally, this sequence of included angle cosine values ​​is rearranged by coordinate mapping, that is, each calculated cosine value is mapped one-to-one with its position in the original contour pixel sequence, and these cosine values ​​are arranged according to the order of the original contour, ultimately obtaining a sequence of boundary angle difference values.

[0024] S103: Compare the magnitude of each value in the boundary angle difference change value sequence with the edge mutation angle threshold, aggregate the positions where the continuous angle mutation exceeds the edge mutation angle threshold, mark the corresponding pixel coordinates, arrange the coordinate regions that meet the mutation criteria in order, and generate a set of candidate coordinates for the germinator. The threshold for the edge mutation angle was determined through preliminary experiments using 500 images of seeds of different varieties and germination stages. In these experimental images, the starting positions of the embryos were precisely marked manually, and the corresponding boundary angle difference changes were extracted. Statistical analysis of these 500 sample values ​​revealed that these values ​​were concentrated between 0 and 0.3, with a mean of 0.15 and a standard deviation of 0.08. To ensure the accuracy of the selection, the edge mutation angle threshold was set as the mean minus one standard deviation, i.e., 0.15 minus 0.08, resulting in 0.07. Therefore, the edge mutation angle threshold was determined to be 0.07. In the actual implementation, each value in the boundary angle difference change value sequence was compared with the set edge mutation angle threshold of 0.07. Assume a segment in the sequence has values ​​of [0.85, 0.71, 0.06, 0.05, 0.06, 0.72, 0.91], where the three consecutive values ​​of 0.06, 0.05, and 0.06 are all less than 0.07. In this case, these three consecutive points, numerically below a threshold, are considered a potential germinal origin region. The index positions of these three values ​​in the sequence are mapped back to the seed outer contour pixel set constructed in S101, thus marking the corresponding pixel coordinates. For example, the pixel coordinates corresponding to these three values ​​are (510, 620), (511, 621), and (512, 622), respectively. All positions that meet the criteria of continuous angle abrupt changes exceeding the edge abrupt change angle threshold are aggregated to form one or more coordinate regions. All identified coordinate regions are arranged according to their order of appearance on the contour, generating a candidate coordinate set for germinal origins, such as {[coordinate region 1], [coordinate region 2],...}.

[0025] Please see Figure 3 The specific steps of S2 are as follows: S201: Based on the candidate coordinate set of the germinator, extract the candidate point positions in the original seed germination image, construct a fixed window region with the center pixel as the core in the neighborhood of each candidate point, calculate the derivative difference of the gray value of the pixel in the window along the X and Y directions respectively, and perform arctangent operation on the derivative to obtain the set of gradient directions of the candidate neighborhood. Taking the first candidate point (511, 621) in the candidate coordinate set as an example, a fixed 5x5 pixel window region centered on this candidate point is constructed in its neighborhood. The coordinate range covered by the window is from (509, 619) to (513, 623). Next, for each pixel within this 5x5 window, the derivative difference is calculated along both the X and Y directions. Specifically, for any pixel within the window, the derivative difference in the X direction is approximated by subtracting the gray value of its left neighbor from the gray value of its right neighbor; the derivative difference in the Y direction is approximated by subtracting the gray value of its upper neighbor from the gray value of its lower neighbor. For example, for pixel (510, 620), its grayscale value is 180. The grayscale value of its left pixel (509, 620) is 175, and the grayscale value of its right pixel (511, 620) is 188. Therefore, the difference in the X-direction derivative is 188 minus 175, which equals 13. Similarly, the difference in the Y-direction derivative is calculated. After performing this operation on all 25 pixels within the window, 25 differences in the X-direction derivative and 25 differences in the Y-direction derivative are obtained. Then, the arctangent of these two derivative differences is performed on each pixel, i.e., the arctangent of the ratio of the Y-direction derivative difference to the X-direction derivative difference is calculated, thus obtaining the gradient direction of that pixel. The gradient direction values ​​calculated for all 25 pixels within the window are combined to finally generate the set of candidate neighborhood gradient directions corresponding to the candidate point (511, 621).

[0026] S202: Call the gradient direction vector corresponding to each pixel in the candidate neighborhood gradient direction set, and calculate the angle between it and the tangential direction vector of the contour boundary in the candidate point neighborhood. Construct a direction consistency index based on the mean of the cosine value of the angle, and generate a candidate point direction consistency score list. Taking candidate point (511, 621) as an example, its neighborhood gradient direction set contains the gradient direction vectors of the 25 pixels within the window. Simultaneously, it is necessary to obtain the tangential direction vector of this candidate point (511, 621) on the seed contour boundary. This tangential direction vector can be directly obtained from the contour tangential direction vector sequence generated by S101 by the position of index (511, 621) in the contour pixel set; assuming the obtained tangential direction vector is . Next, the angle between each gradient direction vector in the candidate neighborhood gradient direction set and the tangential direction vector of this contour boundary is calculated. For example, if the gradient direction vector of a pixel in the neighborhood is , then the cosine of the angle between vector and vector is calculated. The calculation process is as follows: First, calculate the dot product (2*1+4*2), which equals 10; then calculate the magnitudes of the two vectors, which are 4.472 and 2.236 respectively; finally, divide the dot product 10 by the product of the magnitudes (4.472*2.236) to obtain a cosine value of 1.0. This angle calculation process is repeated for all 25 gradient direction vectors in the neighborhood, resulting in 25 cosine values. Finally, the arithmetic mean of these 25 cosine values ​​is calculated. This mean is used as the directional consistency index for the candidate point (511, 621). For each candidate point in the germinal origin candidate coordinate set, the entire process of constructing a fixed window, calculating the gradient direction, and calculating the mean of the cosine of the angle with the tangent vector is repeated, ultimately generating a list containing the directional consistency scores of all candidate points.

[0027] S203: Compare the score of each candidate point in the candidate point orientation consistency score list with the set orientation consistency threshold, extract candidate points with a score greater than the orientation consistency threshold, and aggregate and arrange the spatial coordinates to form an index structure to generate germinary origin positioning information; The orientation consistency threshold is set dynamically based on the dataset of all candidate point orientation consistency scores in the candidate point orientation consistency score list. The score list is set as [0.85, 0.42, 0.88, 0.79, 0.35]. First, the arithmetic mean of this dataset is calculated: (0.85 + 0.42 + 0.88 + 0.79 + 0.35) divided by 5, resulting in a mean of 0.658. Then, the standard deviation is calculated, resulting in a standard deviation of 0.235. The mean of 0.658 is added to the standard deviation of 0.235, resulting in 0.893. This sum is set as the orientation consistency threshold for the current image. The specific process for setting the threshold involves first collecting orientation consistency scores from 1000 confirmed germinal points and their neighborhoods to form a baseline dataset. Statistical analysis of the benchmark dataset revealed that setting the threshold to the sum of the mean and standard deviation effectively distinguished true germinal points from non-germinal points with 98% accuracy. Next, each score in the candidate point orientation consistency score list was compared to the calculated orientation consistency threshold of 0.893. In the example list [0.85, 0.42, 0.88, 0.79, 0.35], no score was greater than 0.893. However, when the list was adjusted to [0.91, 0.42, 0.93, 0.79, 0.35], scores of 0.91 and 0.93 exceeded the threshold of 0.893. Candidate points with scores greater than the orientation consistency threshold were extracted, and their spatial coordinates were aggregated and arranged to form an index structure. This structure clearly indicates the pixel location ultimately confirmed as the germinal point origin, thus generating germinal point origin localization information.

[0028] Please see Figure 4 The specific steps of S3 are as follows: S301: Based on the germinator location information, extract the corresponding bud region in the seed germination image, retrieve connected pixels for the region pixel by pixel along the foreground direction of the image starting from the starting coordinates, stitch the paths of continuous foreground pixels and construct an ordered point sequence to obtain the directional path point index set from the starting point to the end of the germinator, and generate the initial main axis path point sequence. Starting at coordinates (511, 621), the system searches for connected pixels within their 8-neighborhood along the foreground direction of the image (i.e., the area with a pixel value of 255). During the search, pixels closest to the current pixel's direction of movement are prioritized to ensure path extension. For example, if the previous step was from (510, 620) to (511, 621), roughly in the lower right direction, pixels to the right, lower right, and lower down in the neighborhood of (511, 621) will be searched first. Assuming the next found connected foreground pixel is (512, 622), this new coordinate point is added to an ordered list of points. The process of searching for the next connected foreground pixel in its neighborhood is repeated for the newly added point (512, 622), and the found points are appended to the end of the ordered list. This process continues until the search path reaches the end of the bud, meaning no unvisited foreground pixels are found in the neighborhood of the current pixel. In this way, all consecutive foreground pixels are concatenated to construct an ordered sequence of points from the starting point (511, 621) to the end coordinates of the sprout (e.g., (530, 645)). This sequence of points is the set of directional path point indices from the starting point to the end of the sprout, ultimately generating the initial main axis path point sequence.

[0029] S302: Call the coordinates of the two endpoints corresponding to each path unit in the initial main axis path point sequence, construct the path direction vector, extract the local pixel set within the edge of the bud contour in the neighborhood of each path unit, perform derivative difference calculation on the gray-level gradient direction of the pixel and construct the direction vector, calculate the angle between each group of path direction vectors and the corresponding local pixel direction vector, and output the angle value distribution to generate the path unit angle difference distribution group. Each pair of adjacent path points in the sequence is considered a path unit. Taking the first path unit as an example, its endpoints are (511, 621) and (512, 622). By subtracting the coordinates, the direction vector of this path unit is constructed, i.e., the difference in the X direction is 1, and the difference in the Y direction is 1, thus obtaining the path direction vector. Next, in the neighborhood of each path unit, a set of local pixels within the bud outline edge is extracted. For the path unit [(511, 621), (512, 622)], its neighborhood can be defined as a circular area with a radius of 5 pixels centered at the midpoint of the path. Within this area, all pixels belonging to the bud foreground and located on the outline boundary are selected to form a set of local pixels. For each pixel in this set, its grayscale gradient direction is calculated. By calculating the difference between the derivatives in the X and Y directions and performing an arctangent operation, the direction vector of each local pixel is obtained. The angle between each set of path direction vectors and the direction vectors of all local pixels extracted in the corresponding neighborhood area is calculated one by one. For example, if a local pixel set contains three pixels with direction vectors [1, 1.2], [0.9, 1], and [1.1, 0.9], then the angles between these three pixels and the direction vectors are calculated, and three angle values ​​are output. All angle values ​​calculated for each path unit are combined into a distribution to generate a path unit angle difference distribution set.

[0030] S303: Based on the angle distribution data of the path units in the path unit angle difference distribution group, compare them item by item with the gray gradient-direction consistency threshold. Add a distortion mark to the path units that do not meet the angle distribution concentration requirements. Perform position vector offset calculation on the path points in the distortion path segment. Update the coordinates of the main axis points in each segment according to the average offset value to generate the corrected germ main axis path sequence. The specific method for setting the gray-level gradient-direction consistency threshold is as follows: the average value and standard deviation of the cosine value of the angle between the local pixel gray-level gradient direction vector and the path direction vector in all path units are used, and the sum of the average value and standard deviation of the cosine value of the angle is used as the gray-level gradient-direction consistency threshold. A distortion mark is added to the path units whose cosine value of the angle is lower than the gray-level gradient-direction consistency threshold.

[0031] The grayscale gradient-direction consistency threshold is set based on statistical analysis of data from all path units along the entire initial main axis path. Specifically, the average and standard deviation of the cosine values ​​of the angle between the local pixel grayscale gradient direction vector and the path direction vector are calculated for all path units. Assuming the calculated average cosine value is 0.95 and the standard deviation is 0.04, these two are added together (0.95 + 0.04 = 0.99), and this sum is set as the grayscale gradient-direction consistency threshold. The rationality of this threshold was verified through testing on 100 known twisted and non-twisted germinal main axis paths. It was found that using the sum of the average and standard deviation as the threshold effectively identifies over 96% of truly twisted segments. Next, the angle distribution data in each path unit's angle difference distribution group is converted into cosine values ​​and compared item by item with the threshold of 0.99. If the average cosine of the angle between the local pixel direction vector and the path direction vector within a path unit is less than 0.99 (e.g., 0.92), then this path unit is deemed not to meet the requirement of angular distribution concentration, and a distortion marker is added to it. For all continuous path segments marked as distorted, a position vector offset operation is performed. Specifically, the position vectors between all path points within the distorted segment and their corresponding projection points on a straight line formed by the start and end points of the segment are calculated, and then the average offset value of these position vectors is obtained. Finally, the coordinates of each principal axis point within the distorted segment are updated according to the calculated average offset value, thereby straightening the distorted path segment and ultimately generating the corrected germ principal axis path sequence.

[0032] Please see Figure 5 The specific steps of S4 are as follows: S401: Call the set of coordinates of the main axis points corresponding to each time frame in the corrected bud main axis path sequence, perform two-dimensional Euclidean distance calculation between adjacent coordinate points, and accumulate the distance values ​​between all adjacent points in the same time frame to form a length value. Record the length data corresponding to each time point according to the frame sequence number to generate a set of bud length measurement values ​​for time frames. For a specific time frame (e.g., the 10th frame image), the corrected principal axis path is a set of precise coordinate points, such as P_t10={[x1,y1],[x2,y2],...,[xn,yn]}. First, a two-dimensional Euclidean distance is calculated between adjacent coordinate points. Taking the first two points [x1,y1] and [x2,y2] in the sequence as an example, the distance between them is calculated as the square root of the sum of the squares of (x2-x1) and (y2-y1). Assume the calculated distance is 1.25 pixels. Next, the same distance calculation is performed on the second point [x2,y2] and the third point [x3,y3], yielding another distance value, for example, 1.28 pixels. This process continues along the entire principal axis path point set until the distance between the second-to-last point and the last point is calculated. Subsequently, the distance values ​​between all adjacent points calculated in this time frame, such as [1.25, 1.28, 1.22, ...], are sequentially accumulated. The sum of all these distance values ​​is the principal axis length of the germ in the 10th frame image. For example, the total length after accumulation is 55.4 pixels. This length data is recorded according to the frame number of the image, corresponding to frame number 10. For each acquired time frame image, the above process of extracting the principal axis path, calculating the Euclidean distance segment by segment, and accumulating the total length is repeated, and the length data corresponding to each time point is recorded according to the frame number, finally generating a set of time frame germ length measurement values.

[0033] Timestamp information is typically recorded in the metadata of the image file, or provided by a log file generated synchronously by the image acquisition device during shooting. For example, the timestamp corresponding to frame number 10 is "2025-11-11 08:30:00", and the timestamp corresponding to frame number 11 is "2025-11-11 08:40:00". Based on the timestamps, all measurements recorded in S401 are sorted in ascending order. Even if the acquisition order of the frames is disordered, their correct temporal relationship can be restored through the timestamps. For example, the original record may be [(frame 10, 55.4), (frame 12, 58.2), (frame 11, 56.8)], which, after being reordered according to the timestamp information, becomes [(frame 10, 55.4, '08:30:00'), (frame 11, 56.8, '08:40:00'), (frame 12, 58.2, '08:50:00')]. After sorting, a one-to-one mapping relationship is established between the time series and the corresponding bud length measurements. This mapping relationship explicitly associates each specific shooting time point with the bud length value at that time. For example, the mapping relationship can be expressed as:

[0034] {'2025-11-11 08:30:00':55.4,'2025-11-11 08:40:00':56.8,'2025-11-11 08:50:00':58.2,...};

[0035] By integrating the mapping relationships of all time points, a complete bud length mapping table based on shooting time sequence is generated.

[0036] S402: Based on the frame number corresponding to each group of length values ​​in the time frame bud length measurement value set, extract the timestamp information of the shooting frame, and sort the measurement values ​​in ascending order based on the timestamp, construct a one-to-one mapping relationship between the time series and the corresponding length values, and generate a shooting time sequence bud length mapping table. S403: Based on the length data arranged in time sequence in the shooting time sequence bud length mapping table, each data group is assigned to an independent sequence set according to its seed number, and the bud length changes under continuous time frames are recorded in the same sequence to construct a time sequence length array structure for single seeds and generate individual seed time sequence bud length sequences. Each data record (containing a timestamp, length value, and seed number) is grouped according to its seed number. For example, all data with seed number "Seed_01" is grouped into one set, and all data with seed number "Seed_02" is grouped into another set. Within the sequence set of the same seed number, the records are the sprout length changes arranged consecutively according to the timestamp. For example, for "Seed_01", its data is [('08:30:00',55.4),('08:40:00',56.8),('08:50:00',58.2),...]. In this way, a time-series length array structure for individual seeds is constructed. This structure is an array, where each element represents a time point, and the value of the element is the sprout length at that time point. For “Seed_01”, its length array structure is [55.4, 56.8, 58.2, ...], and it also has a corresponding timestamp array ['08:30:00', '08:40:00', '08:50:00', ...]. Ultimately, this generates an independent, time-evolving bud length data sequence for each monitored seed, i.e., an individual seed bud length time sequence.

[0037] Please see Figure 6 The specific steps of S5 are as follows: S501: Based on the shoot length values ​​and corresponding timestamps recorded in adjacent time frames in the seed individual time sequence shoot length sequence, calculate the shoot length difference for each pair of adjacent time frames and divide it by the time interval length. Arrange the growth rate scalar obtained in time intervals into one-dimensional sequence data in time order to generate the average growth rate sequence of time intervals. Taking the sequence of seed "Seed_01" as an example, we take the first pair of adjacent time frame data: timestamps '08:30:00' and '08:40:00', corresponding to sprout length values ​​of 55.4 and 56.8. First, we calculate the sprout length difference between these two time points, i.e., 56.8 minus 55.4, which gives 1.4 pixels. Then, we calculate the time interval between these two timestamps, i.e., '08:40:00' minus '08:30:00', which gives 10 minutes. Dividing the sprout length difference of 1.4 by the time interval length of 10 minutes, we get the average growth rate for this time period as 0.14 pixels / minute. Next, we take the second pair of adjacent time frame data: timestamps '08:40:00' and '08:50:00', corresponding to sprout lengths of 56.8 and 58.2. The sprout length difference is calculated to be 1.4, and the time interval is still 10 minutes, resulting in an average growth rate of 0.14 pixels / minute. For each pair of consecutive time frames in the seed's individual shoot length sequence, this difference and division operation is repeated to obtain a series of scalar values ​​representing the average growth rate over different time periods. These calculated growth rate scalars are then arranged in chronological order according to their corresponding time periods to form a one-dimensional sequence of data, ultimately generating a time-based average growth rate sequence, such as [0.14, 0.14, 0.15, 0.13, ...].

[0038] S502: Based on the growth rate scalar of each time period in the average growth rate sequence, statistically analyze the change in the sign and the dispersion of the growth rate throughout the germination process, record the number of increases and decreases in the rate and calculate the frequency of occurrence of each rate interval, perform calculations on the difference between the upper and lower bounds of the rate interval, and obtain statistical parameters of the change in bud length rate. Based on the average growth rate sequence [0.14, 0.14, 0.15, 0.13, 0.13, 0.16], the changes in the sign and amplitude of the growth rate throughout the germination process were statistically analyzed. First, the number of increases and decreases in the rate was counted. Comparing from the second value in the sequence: from the first 0.14 to the second 0.14, there was no change; from the second 0.14 to the third 0.15, there was an increase of 1; from 0.15 to 0.13, there was a decrease of 1; from 0.13 to 0.13, there was no change; from 0.13 to 0.16, there was an increase of 1. A total of 3 increases and decreases occurred. Next, the frequency of occurrence for each rate interval was calculated. To perform frequency statistics, rate intervals need to be defined first. Based on preliminary analysis of a large amount of similar seed growth data, the growth rate was divided into multiple intervals, such as: low-speed interval (0.00, 0.10], medium-speed interval (0.10, 0.15], and high-speed interval (0.15, 0.20). For the sequence [0.14, 0.14, 0.15, 0.13, 0.13, 0.16], 5 values ​​fall into the medium-speed interval, and 1 value falls into the high-speed interval. Therefore, the frequency of occurrence of the medium-speed interval is 5, and the frequency of occurrence of the high-speed interval is 1. Finally, the difference between the upper and lower bounds of the rate intervals was calculated. In this sequence, the minimum rate value is 0.13, and the maximum rate value is 0.16. The maximum rate interval span is 0.16 minus 0.13, which equals 0.03. These statistical results—the number of increases and decreases (3), the frequency of occurrence of each interval {medium-speed: 5, high-speed: 1}, and the maximum rate interval span of 0.03—are integrated to obtain the statistical parameters for the change in shoot growth rate.

[0039] S503: Based on the maximum rate interval span, the highest frequency rate interval and the corresponding time period index recorded in the statistical parameters of bud growth rate change, establish a coding mapping relationship between the time period number and the rate interval number for each seed, aggregate and organize the coding mapping records and write them into the same index set structure to generate a set of bud growth gradient vitality evaluation indicators. The most frequent rate interval is the medium-speed interval (0.10, 0.15], and its occurrence time intervals are indexed as the 1st, 2nd, 3rd, 4th, and 5th time intervals. An encoding mapping relationship is established for the rate interval numbers of each seed within a specific time interval. The rate interval numbers can be set as follows: low-speed interval is 1, medium-speed interval is 2, and high-speed interval is 3. For "Seed_01", its rate in the 1st time interval is 0.14, belonging to the medium-speed interval, encoded as 2; its rate in the 6th time interval is 0.16, belonging to the high-speed interval, encoded as 3. Therefore, an encoding mapping record can be generated for "Seed_01", for example, [time interval]. [Interval 1: Code 2, Time Period 2: Code 2, Time Period 3: Code 2, Time Period 4: Code 2, Time Period 5: Code 2, Time Period 6: Code 3]. This coding mapping process is performed on all monitored seeds. Then, the coding mapping records of all seeds are aggregated and written into a single index set structure. This set structure not only contains the rate interval code for each seed at each growth stage, but also comprehensively records other statistical parameters, such as the total number of rate increases and decreases and the maximum rate interval span. By structuring the data, a set of sprout length gradient vitality assessment indicators is generated that can comprehensively evaluate the dynamic characteristics of seed growth.

[0040] Please see Figure 7 A seed bud length detection system based on image processing includes: The candidate starting point screening module obtains the pixel sequence of the outer contour of each seed in the seed germination image in the petri dish, calculates the tangential direction vector and the corresponding normal direction vector between adjacent positions of each boundary pixel, filters regions whose jump amplitude exceeds the edge abrupt change angle threshold, and generates a set of candidate coordinates for the starting point of the germ. The starting point localization and recognition module obtains the gray-level gradient direction vector of each pixel in the neighborhood of the candidate point and the corresponding contour tangential direction vector based on the candidate coordinate set of the starting point of the germ, constructs the direction consistency score of the candidate point, filters the candidate points with the direction consistency score greater than the direction consistency threshold, and generates the germ starting point localization information. The bud main axis correction module, based on the bud starting point positioning information, obtains the corresponding bud contour local pixel set according to each path unit, analyzes and identifies the twisted segment, performs average offset vector superposition operation on the main axis point coordinates in each twisted segment, and updates the main axis point coordinate sequence to generate the corrected bud main axis path sequence. The temporal bud length construction module calls the corrected bud main axis path sequence, accumulates the main axis path of each time frame according to the Euclidean distance between adjacent points of the path, sorts all length values ​​according to the time frame shooting timestamp, constructs a single seed bud length array arranged by time, and generates a seed individual temporal bud length sequence. The seed vigor analysis module calculates the average growth rate over a time period based on the individual seed's temporal bud length sequence, counts the number of changes and interval differences in the seed's growth rate throughout the germination stage, and records the mapping results of each seed in the time period and rate interval as coded entries, combining the maximum range of change and the length of the most frequent interval, to generate a set of bud length gradient vigor assessment indicators.

[0041] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A seed bud length detection method based on image processing, characterized in that, Includes the following steps: S1: Obtain the pixel sequence of the outer contour of each seed in the seed germination image in the petri dish, calculate the tangential direction vector and the corresponding normal direction vector between adjacent positions of each boundary pixel, filter out regions whose jump amplitude exceeds the edge abrupt change angle threshold, and generate a candidate coordinate set of the embryonic origin. S2: Based on the candidate coordinate set of the germ starting point, obtain the gray-level gradient direction vector of each pixel in the neighborhood of the candidate point and the corresponding contour tangential direction vector, construct the direction consistency score of the candidate point, filter the candidate points whose direction consistency score is greater than the direction consistency threshold, and generate germ starting point positioning information. S3: Based on the germ starting point positioning information, obtain the corresponding local pixel set of the germ outline according to each path unit, analyze and identify the twisted segment, perform average offset vector superposition operation on the coordinates of the main axis points in each twisted segment, update the main axis point coordinate sequence, and generate the corrected germ main axis path sequence. S4: Call the modified embryo spindle path sequence, accumulate the spindle path of each time frame according to the Euclidean distance between adjacent points, sort all length values ​​according to the time frame shooting timestamp, construct a single seed sprout length array arranged by time, and generate a seed individual temporal sprout length sequence.

2. The seed bud length detection method based on image processing according to claim 1, characterized in that, The candidate coordinate set of the germinal origin includes a set of coordinates of boundary angle difference jump points, labels of the abrupt structural change region of the origin, and a list of candidate point pixel indices. The germinal origin positioning information includes the precise location of the positioning point coordinates, the direction consistency score result, and a set of gradient matching vectors. The corrected germinal axis path sequence includes a continuous principal axis pixel coordinate sequence, a path point offset correction record, and a set of twist segment identifier indices. The seed individual temporal germ length sequence includes a time frame index sequence, a principal axis length value for each frame, and a length change sorting record.

3. The seed bud length detection method based on image processing according to claim 1, characterized in that, The specific steps of S1 are as follows: S101: Obtain the pixel sequence of the outer contour of each seed in the seed germination image in the petri dish, construct a set of seed outer contour pixels according to the edge pixel arrangement order, perform differential processing on the coordinates of adjacent positions of each pixel in the contour set, extract the direction vector between continuous pixels, and generate a sequence of contour tangential direction vectors. S102: Call the direction information of each pixel in the contour tangential direction vector sequence, construct a unit normal vector in the direction perpendicular to the tangential direction in the normal direction of each pixel, and perform cosine calculation on the angle between each pair of tangential direction vectors and normal direction vectors to obtain a continuous boundary point angle sequence. Perform coordinate mapping rearrangement on the sequence to obtain a boundary angle difference change value sequence. S103: Compare the magnitude of each value in the boundary angle difference change value sequence with the edge mutation angle threshold, aggregate the positions where the continuous angle mutation exceeds the edge mutation angle threshold, mark the corresponding pixel coordinates, and arrange the coordinate regions that meet the mutation criteria in order to generate a candidate coordinate set for the germinator.

4. The seed bud length detection method based on image processing according to claim 1, characterized in that, The specific steps of S2 are as follows: S201: Based on the candidate coordinate set of the germination starting point, extract the candidate point positions in the original seed germination image, construct a fixed window region with the center pixel as the core in the neighborhood of each candidate point, calculate the derivative difference of the gray value of the pixel in the window along the X and Y directions respectively, and perform arctangent operation on the derivative to obtain the set of gradient directions of the candidate neighborhood. S202: Call the gradient direction vector corresponding to each pixel in the candidate neighborhood gradient direction set, and calculate the angle between the gradient direction vector and the tangential direction vector of the contour boundary in the neighborhood of the candidate point. Construct a direction consistency index based on the mean cosine value of the angle, and generate a candidate point direction consistency score list. S203: Based on the comparison between the score value of each candidate point in the candidate point orientation consistency score list and the set orientation consistency threshold, candidate points with score values ​​greater than the orientation consistency threshold are extracted, and the spatial coordinates are aggregated and arranged to form an index structure to generate germ starting point positioning information.

5. The seed bud length detection method based on image processing according to claim 1, characterized in that, The specific steps for S3 are as follows: S301: Based on the germ starting point positioning information, extract the corresponding bud region in the seed germination image, retrieve connected pixels for the region pixel by pixel along the foreground direction of the image starting from the starting point coordinates, stitch the paths of continuous foreground pixels and construct an ordered point sequence to obtain a directional path point index set from the starting point to the end of the germ, and generate an initial main axis path point sequence. S302: Call the coordinates of the two endpoints corresponding to each path unit in the initial main axis path point sequence, construct the path direction vector, extract the local pixel set within the edge of the bud contour in the neighborhood of each path unit, perform derivative difference calculation on the gray gradient direction of the pixel and construct the direction vector, calculate the angle between each group of path direction vectors and the corresponding local pixel direction vector, and output the angle value distribution to generate the path unit angle difference distribution group. S303: Based on the angle distribution data of the path units in the path unit angle difference distribution group, compare them item by item with the gray-level gradient-direction consistency threshold, add a distortion mark to the path units that do not meet the angle distribution concentration requirements, perform position vector offset operation on the path points in the distortion path segment, update the coordinates of the main axis points in each segment according to the average offset value, and generate the corrected germ main axis path sequence.

6. The seed bud length detection method based on image processing according to claim 5, characterized in that, The specific method for setting the gray-level gradient-direction consistency threshold is as follows: the average value and standard deviation of the cosine value of the angle between the local pixel gray-level gradient direction vector and the path direction vector in all path units are used, and the sum of the average value and standard deviation of the cosine value of the angle is used as the gray-level gradient-direction consistency threshold. A distortion mark is added to the path units whose cosine value of the angle is lower than the gray-level gradient-direction consistency threshold.

7. The seed bud length detection method based on image processing according to claim 1, characterized in that, The specific steps of S4 are as follows: S401: Call the set of coordinates of the main axis points corresponding to each time frame in the corrected bud main axis path sequence, perform two-dimensional Euclidean distance calculation between adjacent coordinate points, and accumulate the distance values ​​between all adjacent points in the same time frame to form a length value. Record the length data corresponding to each time point according to the frame sequence number to generate a set of time frame bud length measurement values. S402: Based on the frame number corresponding to each group of length values ​​in the time frame bud length measurement value set, extract the timestamp information of the shooting frame, and sort the measurement values ​​in ascending order based on the timestamp, construct a one-to-one mapping relationship between the time series and the corresponding length values, and generate a shooting time sequence bud length mapping table. S403: Based on the length data arranged in time sequence in the shooting time sequence bud length mapping table, each data group is assigned to an independent sequence set according to its seed number, and the bud length changes under continuous time frames are recorded in the same sequence to construct a time sequence length array structure for single seeds and generate a seed individual time sequence bud length sequence.

8. The seed bud length detection method based on image processing according to claim 1, characterized in that, The method further includes the following steps: S5: Based on the individual seed bud length sequence, calculate the average growth rate value over the time period, count the number of changes and interval differences in the seed's growth rate throughout the germination stage, and combine the maximum range of changes and the length of the most frequent interval to record the mapping results of each seed in the time period and rate interval as coded entries, thereby generating a set of bud length gradient vitality evaluation indicators. The set of indicators for assessing shoot length gradient vigor includes the average growth rate distribution range, vigor level coding value, and shoot length fluctuation frequency index.

9. The seed bud length detection method based on image processing according to claim 8, characterized in that, The specific steps of S5 are as follows: S501: Based on the shoot length values ​​and corresponding timestamps recorded in adjacent time frames in the seed individual temporal shoot length sequence, calculate the shoot length difference for each pair of adjacent time frames and divide it by the time interval length. Arrange the growth rate scalar obtained in the time interval into one-dimensional sequence data in chronological order to generate the average growth rate sequence of the time interval. S502: Based on the growth rate scalar of each time period in the average growth rate sequence of the time period, the change in the sign and the dispersion of the growth rate during the entire germination process are statistically analyzed. The number of times the rate increases or decreases is recorded and the frequency of occurrence of each rate interval is calculated. The difference between the upper and lower bounds of the rate interval is calculated to obtain the statistical parameters of the change in bud length rate. S503: Based on the maximum rate interval span, the highest frequency rate interval and the corresponding time period index recorded in the statistical parameters of the sprout growth rate change, establish a coding mapping relationship between the time period number and the rate interval number for each seed, aggregate and organize the coding mapping records and write them into the same index set structure to generate a sprout growth gradient vitality evaluation index set.

10. A seed bud length detection system based on image processing, characterized in that, The system is used to implement the image processing-based seed sprout length detection method according to any one of claims 1-9, the system comprising: The candidate starting point screening module obtains the pixel sequence of the outer contour of each seed in the seed germination image in the petri dish, calculates the tangential direction vector and the corresponding normal direction vector between adjacent positions of each boundary pixel, filters regions whose jump amplitude exceeds the edge abrupt change angle threshold, and generates a set of candidate coordinates for the starting point of the germ. The starting point positioning and recognition module obtains the gray-level gradient direction vector of each pixel in the neighborhood of the candidate point and the corresponding contour tangential direction vector according to the candidate starting point candidate coordinate set, constructs the candidate point direction consistency score, filters candidate points with direction consistency scores greater than the direction consistency threshold, and generates the starting point positioning information of the germ. The bud main axis correction module, based on the bud starting point positioning information, obtains the corresponding bud contour local pixel set according to each path unit, analyzes and identifies the twisted segment, performs average offset vector superposition operation on the main axis point coordinates in each twisted segment, and updates the main axis point coordinate sequence to generate the corrected bud main axis path sequence. The temporal bud length construction module calls the modified bud main axis path sequence, accumulates the main axis path of each time frame according to the Euclidean distance between adjacent points of the path, sorts all length values ​​according to the time frame shooting timestamp, constructs a single seed bud length array arranged by time, and generates a seed individual temporal bud length sequence. The seed vigor analysis module calculates the average growth rate over a time period based on the individual seed's temporal bud length sequence, counts the number of changes and interval differences in the seed's growth rate throughout the germination stage, and records the mapping results of each seed in the time period and rate interval as coded entries, combining the maximum range of changes and the length of the most frequent interval, to generate a set of bud length gradient vigor assessment indicators.