A multi-view angle tomato seedling branch angle analysis method and system
By using multi-view image acquisition and machine learning technology, the problem of low efficiency and large error in traditional tomato seedling branch angle detection has been solved. It has achieved accurate quantification of three-dimensional angles and scientific assessment of growth status, meeting the precision seedling needs of modern agriculture.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN GREENPHENO SCI & TECH CO LTD
- Filing Date
- 2026-03-30
- Publication Date
- 2026-05-29
AI Technical Summary
Traditional methods for detecting the branch angle of tomato seedlings are inefficient, have large errors, lack three-dimensional accuracy and comprehensive growth assessment capabilities, and cannot meet the needs of modern agriculture for efficient, accurate and comprehensive growth status assessment.
Using multi-view image acquisition, computer vision and machine learning technologies, orthogonal projection images are acquired through a high-definition camera, and instance segmentation is performed using the YOLO v8-seg model. Combined with morphological skeletonization and corner detection, the three-dimensional angle is calculated, and growth environment parameters are integrated to establish a growth evaluation model.
It enables precise quantification of branch angles and scientific assessment of growth status, improves the automation level of detection and data accuracy, provides a scientific basis for refined seedling management, and adapts to the flexibility and practicality of large-scale seedling scenarios.
Smart Images

Figure CN122116144A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of crop phenotypic analysis technology, and more specifically, relates to a method and system for analyzing the branch angle of tomato seedlings from multiple perspectives. Background Technology
[0002] As a widely cultivated economic crop, the growth status of tomatoes during the seedling stage directly determines their later yield and quality. The branch-stem angle is a core morphological indicator reflecting seedling growth. A suitable branch-stem angle ensures even ventilation and light penetration, promotes efficient nutrient transport, and reduces pests and diseases. An angle that is too large or too small can lead to excessive vegetative growth, increased risk of lodging, and negatively impact photosynthetic efficiency and fruit set. Therefore, accurately obtaining branch-stem angle data and relating it to growth status is of significant practical importance for the refined management of tomato seedlings.
[0003] Currently, the detection of branch angles in tomato seedlings mainly relies on manual measurement and traditional two-dimensional detection methods, which have many prominent problems. Manual measurement requires operators to measure each seedling individually using tools such as protractors. This is not only time-consuming and labor-intensive, but also extremely inefficient, making it difficult to meet the detection needs of large-scale seedling production scenarios. Furthermore, it is prone to significant measurement errors due to differences in human judgment, and the measurement process may cause mechanical damage to the seedlings, affecting their growth. Traditional two-dimensional detection is mostly based on angle calculations from a single-view image, which cannot capture the true extension of the branches in three-dimensional space. It can only obtain the planar projection angle, which deviates significantly from the actual angle and cannot provide accurate morphological data support.
[0004] Furthermore, most existing detection technologies focus only on the angle value itself, lacking effective integration with growth environment parameters. Seedling growth is affected by a combination of environmental factors such as light, temperature, water, and nutrients. A single angle value cannot fully reflect the growth status, let alone make it difficult to scientifically predict growth trends. This makes it difficult for growers to formulate targeted management measures based on the test results, thus restricting the level of precision and intelligence in seedling management.
[0005] As modern agriculture develops towards precision and large-scale operations, traditional testing methods can no longer meet the needs of the tomato seedling industry for efficient, accurate, and comprehensive growth status assessment. Solving the problems of low efficiency, large errors, and lack of comprehensive assessment capabilities in existing technologies, and constructing a scientific branch angle detection and growth assessment system, has become key to improving the quality and efficiency of the tomato seedling industry. Summary of the Invention
[0006] This invention aims to solve the problems of low efficiency, large error, lack of three-dimensional accuracy and comprehensive growth assessment capability in traditional tomato seedling branch angle detection. By using multi-view image acquisition, computer vision and machine learning technology, it achieves accurate quantification of the three-dimensional branch angle. Combined with environmental parameters, it constructs a growth assessment model, providing a scientific basis for refined seedling management and promoting the quality and efficiency improvement of the tomato seedling industry.
[0007] To address the aforementioned deficiencies or improvement needs of existing technologies, as a first aspect of this invention, the present invention provides a method for analyzing the branch-trunk angle of tomato seedlings from multiple perspectives, comprising: S1. Use at least one set of imaging devices to acquire orthogonal projection images of tomato seedlings; use unique identifiers to associate and match images of the same tomato seedling from different perspectives and store them in the same storage directory; S2. Use a labeling tool to label the branch outlines in the collected tomato seedling images and generate label data; build an instance segmentation model based on YOLO v8-seg and complete the model training to obtain the branch segmentation model; use the trained branch segmentation model to perform instance segmentation on the branches of tomato seedlings in multi-view images and output the branch segmentation results. S3. Perform morphological skeletonization processing on the branch segmentation results to obtain the branch centerline skeleton diagram; use the corner detection method to identify the branch points in the skeleton diagram, and use the branch points as the vertices of the included angle; establish a circular search area with the branch points as the center and a preset radius, and filter out the endpoints of the two sides of the included angle; calculate the plane projection angle value under each viewpoint based on the coordinates of the branch points and the endpoints. S4. Based on the angle values of the plane projections corresponding to the front view and side view, construct the branch direction vector in three-dimensional space, and calculate the actual angle of the tomato seedling branches in three-dimensional space using the vector dot product formula; integrate the actual angle data in three-dimensional space with the growth environment parameters of the tomato seedlings, and use machine learning methods to establish a growth evaluation model to complete the quantitative evaluation of the growth status of tomato seedlings and the prediction of growth trends.
[0008] Furthermore, the orthographic projection image in S1 includes at least a front view and a side view.
[0009] Furthermore, the imaging device in S1 is a high-definition camera, which completes multi-view image acquisition through a dual-camera vertical configuration or a single camera in conjunction with a turntable.
[0010] Furthermore, the specific process of using a labeling tool to label the branch outlines in the collected tomato seedling images in step S2 is as follows: Let the angle between the projections of the tomato seedling branches onto the XY plane in the front view be . The included angle of the projection in the XZ plane of the side view is , and The range of values is , respectively characterizing the angle relationship between the projection directions of the branches in the XY plane and the XZ plane; A three-dimensional coordinate system is constructed with the extension direction of the tomato seedling's main stem as the positive X-axis. The unit direction vector of the branches in the front view is defined as... ,in Let be the projection component of the vector onto the X-axis. The vector is projected onto the Y-axis, and the Z-axis projection component is 0 because the front view only reflects XY plane information; the unit direction vector of the branch in the side view is defined as... ,in Let be the projection component of the vector onto the X-axis. The vector is projected onto the Z-axis, and the Y-axis projection component is 0 because the side view only reflects information from the XZ plane. Based on the direction vector information from the front and side views, the actual direction vector of the branch in 3D space is obtained by fusing them. ,in Let X be the composite projection component of the vector on the X-axis. , By keeping its projection components on the Y-axis and Z-axis unchanged, the two-dimensional projection information is transformed into three-dimensional spatial information. Let the actual direction vectors of the two branches of the tomato seedling in three-dimensional space be respectively and According to the dot product principle, the actual three-dimensional angle between the two branches is... Satisfy the formula ,in The dot product of two vectors. , Let be the magnitudes of the two vectors, which can be directly calculated using this formula. The specific value, its range is: , representing the angular relationship between the branches in three-dimensional space.
[0011] Furthermore, the corner detection method in S3 is specifically as follows: Let the coordinates of any pixel in the branch centerline skeleton diagram be... Construct a structure with this pixel as the center, and the size is... The rectangular neighborhood, where If the value is odd, the neighborhood size is adapted to the pixel width feature of the branch skeleton line, ensuring complete coverage of the local structural information around the pixel, and matching the branch center line feature obtained after morphological skeletonization. Calculate the autocorrelation matrix of pixel grayscale values within the rectangular neighborhood. Its expression is In the formula This represents the grayscale gradient of a pixel in the horizontal direction. This represents the grayscale gradient of a pixel in the vertical direction. This represents the summation of corresponding terms for all pixels within a rectangular neighborhood, quantizing the distribution characteristics of grayscale changes around the pixels using gradient information; Solve the autocorrelation matrix Two eigenvalues and ,in and The values of are all greater than or equal to 0, representing the intensity of grayscale change of the pixel in two vertical directions respectively. The dual judgment logic of feature values avoids the limitations of single-dimensional judgment. Simultaneously, eigenvalue determination conditions are set, when... and When the pixel is determined to be a candidate corner point, then... The grayscale change intensity threshold is used as the basis for adaptive matching based on the grayscale distribution characteristics of the skeleton map, which effectively filters out false corner points caused by image noise and fluctuations in the surface texture of the branches. Furthermore, considering the geometric structural characteristics of the branches of tomato seedlings, spatial correlation verification is performed on candidate corner points. By calculating the connectivity between candidate corner points and surrounding skeleton line segments, and taking advantage of the actual growth morphology characteristic that branches must be intersections of multiple skeleton line segments, when the connectivity is greater than 2, the candidate corner point is confirmed as a branch point.
[0012] Furthermore, the selection process for the endpoints of the two sides of the included angle in S3 is as follows: Let the coordinates of the branch point be... ,by Center of the circle Establish a circular search region with radius, where Adapts to the pixel scale of the backbone skeleton lines, covering skeleton line segments within a reasonable range around the branch points; Iterate through the pixels of the skeleton image of the branch centerline within the circular area, filter out all intersections between the skeleton line and the circumference, and form a candidate set of endpoints. ,in The number of candidate points; For candidate set Any two distinct candidate points and Construct vectors respectively and Calculate the angle between two vectors using the vector angle formula. The expression is ,in The dot product of two vectors. Let be the magnitudes of the two vectors, respectively. Simultaneously, calculate candidate points , with branch point The degree of fit between the connecting lines and the corresponding branch skeleton lines Fit This is obtained by statistically analyzing the distribution density of skeleton pixels within a preset range on both sides of the connection line. The higher the distribution density, the better the fit. The larger; Filter out those that meet the requirements It conforms to the natural growth angle characteristics of branches and twigs, and Reaching the largest set of candidate points They are defined as the endpoints of the two sides of the included angle, while ensuring that the endpoints represent the actual opening direction of the included angle.
[0013] Furthermore, the calculation process for the included angle values of the planar projections under each viewpoint in S3 is as follows: Let the coordinates of the branch points obtained from each viewpoint be... The coordinates of the endpoints of the two sides of the included angle are respectively and First, construct vectors representing the two sides of the included angle. and , where vector , The direction of extension of the corresponding branch in the projection plane of the current viewpoint solves the problem that the direction vector is easily affected by the endpoint deviation in traditional statistical calculations. Based on the principle of vector dot product, we first calculate the dot product of the two vectors. This reflects the degree of directional correlation between the two vectors; then, the vectors are solved separately. Length of the module sum vector Length of the module , representing the actual distance from the endpoint to the vertex; To avoid errors in single-vector dot product calculations under slightly bent branch conditions, a vector direction consistency verification mechanism is introduced: The calculated vector... , Similarity of direction cosine to the corresponding branch skeleton line segment ,in , These are the unit direction vectors of the branch skeleton line segments where endpoints A and B are located, respectively. The similarity measure is used to measure the degree of fit between the vector and the actual extension direction of the branch. Let the angle between the plane projections at the current viewpoint be . The calculation logic is optimized by combining the direction consistency verification results, and its expression is as follows: when When the value approaches 1, it indicates that the vector is highly consistent with the direction of the branch, and the original dot product calculation result is used; when When the value is small, the influence of directional deviation caused by branch bending is reduced by similarity weighting correction; The solution is obtained by inverse cosine operation. Based on the actual growth morphological characteristics of tomato seedling branches, the effective range of the included angle of the plane projection is: If the calculation result exceeds this range, the supplementary angle is taken as the final plane projection angle value.
[0014] Furthermore, the calculation process for the actual included angle of the tomato seedling branches in three-dimensional space in S4 is as follows: Let the angle between the projections of the front view plane and the plane be . The angle between the side view plane projection and the plane projection is Both have a range of values. These correspond to the projection directions of the branches in the XY and XZ planes, respectively. Construct a three-dimensional coordinate system with the main stem extension direction of the tomato seedling as the positive X-axis. Based on the geometric transfer characteristics of orthogonal projection, derive the unit direction vector of the branches in the front view as follows: ,in Let be the projection component of the vector onto the X-axis. The vector is projected onto the Y-axis, and the Z-axis projection component is 0 to match the characteristic that the front view only reflects information from the XY plane. The unit direction vector of the branch in the side view is ,in Let be the projection component of the vector onto the X-axis. The vector is projected onto the Z-axis, and the Y-axis projection component is 0 to match the characteristic that the side view only reflects information from the XZ plane. To address the core issue of converting two-dimensional projection information into three-dimensional spatial information, an orthogonal component fusion logic is used to construct the actual direction vectors of the branches in three-dimensional space, i.e. The X-axis component adopts a dual-view cosine product form, which not only preserves the collaborative relationship features of the two branches in the X-axis direction, but also avoids the one-sidedness of information from a single viewpoint. The Y-axis and Z-axis components continue the projection features of the corresponding viewpoints, ensuring that the three-dimensional vector can fully represent the spatial extension of the branches. Let the actual direction vectors of the two branches of the tomato seedling in three-dimensional space be respectively and The actual three-dimensional angle between the two is calculated based on the vector dot product principle. Its core formula is ,in It is the dot product of two vectors, used to quantify the degree of directional coordination; Let be the magnitudes of the two vectors, used for... Uniform processing is used to eliminate interference from distance factors; The solution is obtained by inverse cosine operation. Its value range is , representing the actual angle relationship between the branches in three-dimensional space.
[0015] As a second aspect of the present invention, a multi-view tomato seedling branch angle analysis system is also provided, comprising: A multi-view image acquisition and association unit is used to acquire orthogonal projection images of tomato seedlings using at least one set of imaging devices; and to associate and match images of the same tomato seedling from different viewpoints using a unique identifier and store them in the same storage directory. The branch segmentation model training application unit is used to annotate the branch outlines in the collected tomato seedling images using an annotation tool to generate label data; to build an instance segmentation model based on YOLOv8-seg and complete the model training to obtain the branch segmentation model; and to use the trained branch segmentation model to perform instance segmentation of tomato seedling branches in multi-view images and output the branch segmentation results. The planar projection angle calculation unit is used to perform morphological skeletonization processing on the branch segmentation results to obtain the branch centerline skeleton diagram; to identify branch points in the skeleton diagram using a corner detection method, with the branch points serving as the vertices of the angle; to establish a circular search area with the branch points as the center and a preset radius, and to filter out the endpoints of the two sides of the angle; and to calculate the planar projection angle values from each viewpoint based on the coordinates of the branch points and endpoints. The three-dimensional angle calculation and growth assessment unit is used to construct the branch direction vector in three-dimensional space based on the plane projection angle values corresponding to the front view and side view. The actual angle of the tomato seedling branches in three-dimensional space is calculated by the vector dot product formula. The actual angle data in three-dimensional space is integrated with the growth environment parameters of the tomato seedling, and a growth assessment model is established by using machine learning methods to complete the quantitative evaluation of the growth status of the tomato seedling and the prediction of the growth trend.
[0016] As a third aspect of the present invention, a computer-readable storage medium is also provided, on which a computer program is stored, which is executed by a processor as described in any one of the claims, a method for analyzing the branch angle of tomato seedlings from multiple perspectives.
[0017] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects: 1. The present invention relates to a multi-view tomato seedling branch angle analysis method. This method uses a high-definition camera to acquire orthogonal projection images of tomato seedlings, including front and side views. Different view images of the same seedling are linked, matched, and centrally stored using a unique identifier. This multi-view acquisition method overcomes the information limitations of a single viewpoint, fully capturing the extension state of the branches in different planes. This provides comprehensive and relevant basic data for subsequent three-dimensional angle calculations, effectively avoiding the problem that traditional single-view images cannot reflect the true spatial form of the branches, ensuring the integrity and relevance of subsequent analysis data. Furthermore, the method employs a dual-camera vertical configuration or a single camera with a turntable acquisition mode to adapt to the needs of different seedling cultivation scenarios, ensuring the flexibility and practicality of image acquisition.
[0018] 2. The present invention provides a multi-view tomato seedling branch angle analysis method. Based on labeled branch contour data, a YOLO v8-seg instance segmentation model is trained to segment tomato seedling branches in multi-view images. Then, through morphological skeletonization, corner detection, and endpoint filtering, the planar projection angles under each viewpoint are calculated. This technical process achieves efficient separation of the branch target from the background, eliminates irrelevant interference, accurately extracts the geometric features of the branches through skeletonization and feature point recognition, and obtains reliable planar projection angle data through vector calculation. This solves the problems of low efficiency and large errors in traditional manual measurement, and improves the automation and data accuracy of angle detection.
[0019] 3. The present invention provides a multi-view tomato seedling branch angle analysis method. This method integrates the planar projection angle data from the front and side views to construct a three-dimensional direction vector. The actual three-dimensional branch angle is calculated using the vector dot product formula. Combined with this data and growth environment parameters, a growth assessment model is established using machine learning methods. This technical approach realizes the transformation from two-dimensional projection information to three-dimensional spatial angles, restoring the true spatial morphology of the branches. Simultaneously, by combining geometric data with environmental factors, it not only achieves a quantitative evaluation of growth status but also enables growth trend prediction, providing a scientific basis for refined seedling management and compensating for the shortcomings of traditional techniques in lacking comprehensive growth assessment capabilities. Attached Figure Description
[0020] Figure 1 This is a flowchart of the method for analyzing the branch-trunk angle of tomato seedlings based on multiple perspectives, according to an embodiment of the present invention. Figure 2 This is a schematic diagram of multi-view tomato seedling image acquisition and association matching according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the system units in an embodiment of the present invention. Detailed Implementation
[0021] 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. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0022] Example 1 Please refer to Figure 1 Example 1 provides a multi-view method for analyzing the branch angle of tomato seedlings, including: S1. Use at least one set of imaging devices to acquire orthogonal projection images of tomato seedlings; use unique identifiers to associate and match images of the same tomato seedling from different perspectives and store them in the same storage directory; S2. Use a labeling tool to label the branch outlines in the collected tomato seedling images and generate label data; build an instance segmentation model based on YOLO v8-seg and complete the model training to obtain the branch segmentation model; use the trained branch segmentation model to perform instance segmentation on the branches of tomato seedlings in multi-view images and output the branch segmentation results. S3. Perform morphological skeletonization processing on the branch segmentation results to obtain the branch centerline skeleton diagram; use the corner detection method to identify the branch points in the skeleton diagram, and use the branch points as the vertices of the included angle; establish a circular search area with the branch points as the center and a preset radius, and filter out the endpoints of the two sides of the included angle; calculate the plane projection angle value under each viewpoint based on the coordinates of the branch points and the endpoints. S4. Based on the angle values of the plane projections corresponding to the front view and side view, construct the branch direction vector in three-dimensional space, and calculate the actual angle of the tomato seedling branches in three-dimensional space using the vector dot product formula; integrate the actual angle data in three-dimensional space with the growth environment parameters of the tomato seedlings, and use machine learning methods to establish a growth evaluation model to complete the quantitative evaluation of the growth status of tomato seedlings and the prediction of growth trends.
[0023] This embodiment 1 further elaborates on the above steps.
[0024] (1) Multi-view image acquisition and association Please refer to Figure 2 In the detection of the branch angle of tomato seedlings, image acquisition is a crucial step in obtaining basic data, directly affecting the accuracy and comprehensiveness of subsequent analysis results. Considering that traditional single-view acquisition cannot capture the extension of the branches in three-dimensional space, easily leading to errors in angle calculation, this method employs orthogonal projection image acquisition. The acquired images include at least a front view and a side view. The front view clearly presents the projection shape of the branches in the horizontal and vertical directions, while the side view reflects the distribution characteristics of the branches in the depth and vertical directions. These two views complement each other, jointly forming complete data support for the spatial morphology of the branches, providing comprehensive basic information for subsequent calculation of the three-dimensional angle.
[0025] This method uses a high-definition camera as the imaging device. Its high resolution ensures that the acquired images clearly reveal the fine contours and structural features of the tomato seedling branches, avoiding errors in subsequent branch segmentation and feature recognition due to image blur. To meet the actual needs of different seedling cultivation scenarios, the imaging device offers two flexible configuration options: The dual-camera vertical configuration, by deploying two cameras in a vertical direction, can simultaneously capture the front and side views of the same tomato seedling, improving image acquisition efficiency. The single-camera-with-turntable method uses the turntable to rotate the tomato seedlings, allowing a single camera to acquire multi-view images from different angles, thus reducing equipment deployment costs.
[0026] Both configuration methods can stably acquire multi-view orthogonal projection images that meet the requirements, adapting to different application needs in large-scale and small-scale seedling cultivation scenarios, and ensuring the practicality and reliability of the image acquisition process.
[0027] To ensure accurate association between multi-view images and corresponding tomato seedlings and avoid data confusion that could affect analysis results, a unique identifier is assigned to each tomato seedling during the data acquisition process. After acquisition, this identifier is used to match and associate images of the same tomato seedling from different perspectives, such as front and side views, and the associated images are stored in the same directory. This associated storage method not only facilitates quick retrieval of complete image data for the same seedling during subsequent processing, reducing the time spent on data retrieval and matching, but also effectively avoids cross-contamination of image data from different seedlings, ensuring that each set of analysis data accurately corresponds to a specific detection object, providing a fundamental guarantee for the accuracy of the entire branch angle analysis process.
[0028] (2) Application of branch segmentation model training In the multi-view analysis process of the branch and stem angle of tomato seedlings, the branch and stem outline annotation is a fundamental step connecting image acquisition with subsequent instance segmentation and angle calculation. Its core purpose is not only to outline the branch and stem shape, but also to provide annotation basis with spatial attributes for subsequent accurate analysis by defining the associated three-dimensional spatial relationship, so as to ensure that the label data contains both pixel-level outline information and the association logic between the branch and stem spatial direction and the angle.
[0029] The specific annotation process is as follows: Let the angle between the projections of the tomato seedling branches onto the XY plane in the front view be θ. The included angle of the projection in the XZ plane of the side view is , and The range of values is , respectively characterizing the angle relationship between the projection directions of the branches in the XY plane and the XZ plane; A three-dimensional coordinate system is constructed with the extension direction of the tomato seedling's main stem as the positive X-axis. The unit direction vector of the branches in the front view is defined as... ,in Let be the projection component of the vector onto the X-axis. The vector is projected onto the Y-axis, and the Z-axis projection component is 0 because the front view only reflects XY plane information; the unit direction vector of the branch in the side view is defined as... ,in Let be the projection component of the vector onto the X-axis. The vector is projected onto the Z-axis, and the Y-axis projection component is 0 because the side view only reflects information from the XZ plane. Based on the direction vector information from the front and side views, the actual direction vector of the branch in 3D space is obtained by fusing them. ,in Let X be the composite projection component of the vector on the X-axis. , By keeping its projection components on the Y-axis and Z-axis unchanged, the two-dimensional projection information is transformed into three-dimensional spatial information. Let the actual direction vectors of the two branches of the tomato seedling in three-dimensional space be respectively and According to the dot product principle, the actual three-dimensional angle between the two branches is... Satisfy the formula ,in The dot product of two vectors. , Let be the magnitudes of the two vectors, which can be directly calculated using this formula. The specific value, its range is: , representing the angular relationship between the branches in three-dimensional space.
[0030] After defining the spatial relationships and deriving the angles as described above, pixel-level outlines of the branches and trunks were drawn using professional annotation tools on the collected tomato seedling images. During the drawing process, the spatial extension direction and morphological characteristics of the branches and trunks as defined above were strictly followed to ensure that the drawn outlines accurately match the actual shapes of the branches and trunks, avoiding omissions, multiple markings, or outline offsets.
[0031] Once the outline of each image is completed, the annotation tool automatically generates corresponding label data. This label data not only records the pixel coordinate information of the branch outline, but also associates it with the aforementioned three-dimensional spatial relationship and angle derivation logic, ultimately forming a one-to-one annotation dataset of "original image - label data", providing a supervisory basis with both morphological and spatial attributes for the subsequent construction of a branch instance segmentation model based on YOLO v8-seg.
[0032] After constructing the labeled dataset, a branch segmentation model was built and trained based on the YOLO v8-seg model. The YOLO v8-seg model was chosen because it combines the efficiency of object detection with pixel-level accuracy in instance segmentation, meeting the requirement for accurate separation of branch regions in multi-view tomato seedling images. The labeled dataset was divided into a training set and a validation set according to a preset ratio. The training set was used for the model to learn the morphology, texture, and associated spatial features of the branches, while the validation set was used to monitor model performance during training and avoid overfitting. Through multiple rounds of iterative optimization of model parameters, the trained branch segmentation model was obtained when the model's segmentation accuracy on the validation set reached a preset standard.
[0033] Finally, the trained branch segmentation model was used to perform instance segmentation on multi-view tomato seedling images. First, the images to be segmented were preprocessed according to the model's training standards to ensure consistency between the input and training data. Then, the preprocessed images were input into the model, which automatically distinguished between branch and non-branch pixels, completely separating the branch region from the complex background and outputting a segmentation result containing only the branch outline. This result provides a clean target region for subsequent branch skeleton extraction, branch point identification, and angle verification.
[0034] (3) Calculation of the included angle of the plane projection In the calculation of the angle between the branches and ends of tomato seedlings, the identification of branch points and endpoints and the accurate calculation of the angle are the core steps, which directly affect the reliability of the subsequent three-dimensional angle calculation. Traditional methods are prone to errors due to feature point identification deviations or simple calculation logic. Therefore, it is necessary to establish a systematic processing flow.
[0035] First, branch point identification is performed. Let the coordinates of any pixel in the branch centerline skeleton diagram be... Construct a structure with this pixel as the center, and the size is... The rectangular neighborhood, where If the value is odd, the neighborhood size is adapted to the pixel width feature of the branch skeleton line, ensuring complete coverage of the local structural information around the pixel, and matching the branch center line feature obtained after morphological skeletonization. Calculate the autocorrelation matrix of pixel grayscale values within the rectangular neighborhood. Its expression is In the formula This represents the grayscale gradient of a pixel in the horizontal direction. This represents the grayscale gradient of a pixel in the vertical direction. This represents the summation of corresponding terms for all pixels within a rectangular neighborhood, quantizing the distribution characteristics of grayscale changes around the pixels using gradient information; Solve the autocorrelation matrix Two eigenvalues and ,in and The values of are all greater than or equal to 0, representing the intensity of grayscale change of the pixel in two vertical directions respectively. The dual judgment logic of feature values avoids the limitations of single-dimensional judgment. Simultaneously, eigenvalue determination conditions are set, when... and When the pixel is determined to be a candidate corner point, then... The grayscale change intensity threshold is used as the basis for adaptive matching based on the grayscale distribution characteristics of the skeleton map, which effectively filters out false corner points caused by image noise and fluctuations in the surface texture of the branches. Furthermore, considering the geometric structural characteristics of the branches of tomato seedlings, spatial correlation verification is performed on candidate corner points. By calculating the connectivity between candidate corner points and surrounding skeleton line segments, and taking advantage of the actual growth morphology characteristic that branches must be intersections of multiple skeleton line segments, when the connectivity is greater than 2, the candidate corner point is confirmed as a branch point.
[0036] Once the branch point is determined, the process of filtering the endpoints on both sides of the included angle begins, as follows: Let the coordinates of the branch point be... ,by Center of the circle Establish a circular search region with radius, where Adapts to the pixel scale of the backbone skeleton lines, covering skeleton line segments within a reasonable range around the branch points; Iterate through the pixels of the skeleton image of the branch centerline within the circular area, filter out all intersections between the skeleton line and the circumference, and form a candidate set of endpoints. ,in The number of candidate points; For candidate set Any two distinct candidate points and Construct vectors respectively and Calculate the angle between two vectors using the vector angle formula. The expression is ,in The dot product of two vectors. Let be the magnitudes of the two vectors, respectively. Simultaneously, calculate candidate points , with branch point The degree of fit between the connecting lines and the corresponding branch skeleton lines Fit This is obtained by statistically analyzing the distribution density of skeleton pixels within a preset range on both sides of the connection line. The higher the distribution density, the better the fit. The larger; Filter out those that meet the requirements It conforms to the natural growth angle characteristics of branches and twigs, and Reaching the largest set of candidate points They are defined as the endpoints of the two sides of the included angle, while ensuring that the endpoints represent the actual opening direction of the included angle.
[0037] Once the endpoints are determined, the angles of the plane projection under each viewpoint are calculated. The specific process is as follows.
[0038] Let the coordinates of the branch points obtained from each viewpoint be... The coordinates of the endpoints of the two sides of the included angle are respectively and First, construct vectors representing the two sides of the included angle. and , where vector , The direction of extension of the corresponding branch in the projection plane of the current viewpoint solves the problem that the direction vector is easily affected by the endpoint deviation in traditional statistical calculations. Based on the principle of vector dot product, we first calculate the dot product of the two vectors. This reflects the degree of directional correlation between the two vectors; then, the vectors are solved separately. Length of the module sum vector Length of the module , representing the actual distance from the endpoint to the vertex; To avoid errors in single-vector dot product calculations under slightly bent branch conditions, a vector direction consistency verification mechanism is introduced: The calculated vector... , Similarity of direction cosine to the corresponding branch skeleton line segment ,in , These are the unit direction vectors of the branch skeleton line segments where endpoints A and B are located, respectively. The similarity measure is used to measure the degree of fit between the vector and the actual extension direction of the branch. Let the angle between the plane projections at the current viewpoint be . The calculation logic is optimized by combining the direction consistency verification results, and its expression is as follows: when When the value approaches 1, it indicates that the vector is highly consistent with the direction of the branch, and the original dot product calculation result is used; when When the value is small, the influence of directional deviation caused by branch bending is reduced by similarity weighting correction; The solution is obtained by inverse cosine operation. Based on the actual growth morphological characteristics of tomato seedling branches, the effective range of the included angle of the plane projection is: If the calculation result exceeds this range, the supplementary angle is taken as the final plane projection angle value.
[0039] (4) Calculation of three-dimensional included angle and growth assessment In the quantitative analysis of tomato seedling growth status, relying solely on the angles of a single-view planar projection is insufficient to fully reflect the true growth posture of the branches in space. The actual angles in three-dimensional space more accurately characterize the relative positional relationships between branches and are a core quantitative indicator for assessing seedling growth status. Therefore, it is necessary to obtain the actual angles of the branches in three-dimensional space based on the planar projection angles of the front and side views through spatial geometric transformation and calculation. This model, combined with growth environment parameters, enables accurate evaluation and trend prediction of seedling growth status.
[0040] The specific calculation process for the actual included angle in three-dimensional space is as follows: Let the included angle of the projection of the front view plane be θ. The angle between the side view plane projection and the plane projection is Both have a range of values. These correspond to the projection directions of the branches in the XY and XZ planes, respectively. Construct a three-dimensional coordinate system with the main stem extension direction of the tomato seedling as the positive X-axis. Based on the geometric transfer characteristics of orthogonal projection, derive the unit direction vector of the branches in the front view as follows: ,in Let be the projection component of the vector onto the X-axis. The vector is projected onto the Y-axis, and the Z-axis projection component is 0 to match the characteristic that the front view only reflects information from the XY plane. The unit direction vector of the branch in the side view is ,in Let be the projection component of the vector onto the X-axis. The vector is projected onto the Z-axis, and the Y-axis projection component is 0 to match the characteristic that the side view only reflects information from the XZ plane. To address the core issue of converting two-dimensional projection information into three-dimensional spatial information, an orthogonal component fusion logic is used to construct the actual direction vectors of the branches in three-dimensional space, i.e. The X-axis component adopts a dual-view cosine product form, which not only preserves the collaborative relationship features of the two branches in the X-axis direction, but also avoids the one-sidedness of information from a single viewpoint. The Y-axis and Z-axis components continue the projection features of the corresponding viewpoints, ensuring that the three-dimensional vector can fully represent the spatial extension of the branches. Let the actual direction vectors of the two branches of the tomato seedling in three-dimensional space be respectively and The actual three-dimensional angle between the two is calculated based on the vector dot product principle. Its core formula is ,in It is the dot product of two vectors, used to quantify the degree of directional coordination; Let be the magnitudes of the two vectors, used for... Uniform processing is used to eliminate interference from distance factors; The solution is obtained by inverse cosine operation. Its value range is , representing the actual angle relationship between the branches in three-dimensional space.
[0041] After calculating the actual angles in three-dimensional space, the acquired three-dimensional angle data needs to be systematically integrated with the growth environment parameters of tomato seedlings to form a standardized dataset for adapting the model. Specifically, the three-dimensional angle data needs to be associated with corresponding individual seedling identifiers and measurement time points to ensure that each set of angle data accurately matches the state of a specific seedling at a specific growth stage. The growth environment parameters need to cover key factors such as light intensity, soil moisture, ambient temperature, soil nutrient content (including core elements such as nitrogen, phosphorus, and potassium), and air humidity. These parameters need to be collected synchronously at the same time point during angle measurement using high-precision sensors to avoid data correlation deviations due to time differences.
[0042] During the integration process, rigorous data preprocessing is also required: for missing values in the dataset, interpolation methods are used to supplement or directly delete samples containing missing values based on the proportion of missing data to ensure the integrity of the dataset; for outliers, through... The principle or box plot method is used to identify data that deviates from the normal distribution range. Combined with the actual planting scenario, it is determined whether the error is due to measurement error or extreme environment. Measurement error outliers are corrected, while extreme environment outliers are retained and labeled to provide a basis for subsequent model analysis of seedling growth under extreme conditions. At the same time, all data are normalized to map parameters of different dimensions to a fixed interval, eliminating the interference of dimension differences on model training. This ensures that the three-dimensional angle data and environmental parameters have equal weight and influence in model training, ultimately forming a multi-dimensional input feature set of "three-dimensional angle + multiple environmental factors".
[0043] Subsequently, based on the integrated standardized dataset, a growth assessment model is constructed using appropriate machine learning methods tailored to the specific application requirements. If the focus is on precise grading of growth status, ensemble learning algorithms such as random forests and gradient boosting trees can be used. These algorithms possess strong feature interaction capture capabilities, effectively uncovering the synergistic influence of three-dimensional angles and environmental parameters, and exhibit better anti-overfitting capabilities than traditional single algorithms. If model interpretability is also considered to clarify the influence weights of each parameter on growth status and provide clear guidance for agricultural regulation, logistic regression or decision tree algorithms can be used, with key influencing factors output through feature importance analysis. If deployment on lightweight equipment is required for rapid prediction, support vector machines or lightweight neural network models can be used to improve model efficiency while ensuring prediction accuracy.
[0044] During the model training phase, the constructed multi-dimensional input feature set is divided into training, validation, and test sets according to a preset ratio. The training set is used for the model to learn the feature association patterns in the data; the validation set is used for parameter optimization during training, adjusting the model's hyperparameters by monitoring the prediction error of the validation set to avoid overfitting or underfitting; and the test set is used to finally evaluate the model's performance, judging its generalization ability through metrics such as accuracy, recall, and F1 score. After training, the model has the ability to quantitatively evaluate the growth status of tomato seedlings, and can output the corresponding growth status level (such as excellent, normal, weak, abnormal, etc.) based on the input three-dimensional angle data and environmental parameters.
[0045] In practical applications, by utilizing a trained growth assessment model and combining it with continuous monitoring of the three-dimensional angle data of tomato seedlings with real-time growth environment parameters, it is possible to predict the growth trend of seedlings. For example, by inputting data over multiple consecutive time periods, the model can predict the direction of changes in the seedling's growth status over a future period. If a weak or abnormal trend in growth is predicted, it can promptly remind growers to adjust planting strategies accordingly, such as optimizing light, controlling humidity, and supplementing nutrients. This provides a scientific basis for precise control in agricultural production and helps improve the cultivation quality and survival rate of tomato seedlings.
[0046] The branch-trunk angle analysis method proposed in this embodiment aligns with the needs of modern precision planting and smart agriculture development, and has broad application prospects. In facility agriculture scenarios, this method can be integrated into seedling cultivation monitoring systems. By automatically acquiring multi-view images, calculating three-dimensional branch-trunk angles, and combining environmental parameters to assess growth status, it replaces the traditional extensive management model of manual observation. This enables refined and digital monitoring of tomato seedling growth, helping growers to promptly grasp differences in plant growth, providing precise data support for field management measures such as water and fertilizer regulation and light optimization, effectively improving seedling cultivation quality and survival rate, and reducing planting costs.
[0047] In the field of crop breeding and phenotypic research, this method can efficiently quantify the key phenotypic trait of tomato seedling branch-stem angle. The predictive model constructed by combining this method with growth environment parameters can assist in screening superior varieties with strong stress resistance and excellent growth performance, shortening the breeding cycle and improving breeding efficiency. Furthermore, the core technical logic of this method can be transferred to the seedling growth monitoring of other herbaceous crops such as cucumbers and peppers, demonstrating strong versatility and scalability. This provides core technical support for the development of a large-scale, intelligent crop seedling cultivation industry, promoting the transformation of agricultural production from "experience-driven" to "data-driven."
[0048] Example 2 Please refer to Figure 3 This embodiment 2 provides a multi-view tomato seedling branch angle analysis system, including: A multi-view image acquisition and association unit is used to acquire orthogonal projection images of tomato seedlings using at least one set of imaging devices; and to associate and match images of the same tomato seedling from different viewpoints using a unique identifier and store them in the same storage directory. The branch segmentation model training application unit is used to annotate the branch outlines in the collected tomato seedling images using an annotation tool to generate label data; it constructs an instance segmentation model based on YOLO v8-seg and completes model training to obtain the branch segmentation model; it uses the trained branch segmentation model to perform instance segmentation of tomato seedling branches in multi-view images and outputs the branch segmentation results. The planar projection angle calculation unit is used to perform morphological skeletonization processing on the branch segmentation results to obtain the branch centerline skeleton diagram; to identify branch points in the skeleton diagram using a corner detection method, with the branch points serving as the vertices of the angle; to establish a circular search area with the branch points as the center and a preset radius, and to filter out the endpoints of the two sides of the angle; and to calculate the planar projection angle values from each viewpoint based on the coordinates of the branch points and endpoints. The three-dimensional angle calculation and growth assessment unit is used to construct the branch direction vector in three-dimensional space based on the plane projection angle values corresponding to the front view and side view. The actual angle of the tomato seedling branches in three-dimensional space is calculated by the vector dot product formula. The actual angle data in three-dimensional space is integrated with the growth environment parameters of the tomato seedling, and a growth assessment model is established by using machine learning methods to complete the quantitative evaluation of the growth status of the tomato seedling and the prediction of the growth trend.
[0049] Example 3 This embodiment 3 also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement any step of a multi-view tomato seedling branch angle analysis method.
[0050] The computer-readable storage medium may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0051] For a description of the computer-readable storage medium provided in this application, please refer to the above method embodiments; further details will not be repeated here.
[0052] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for analyzing the branch angle of tomato seedlings from multiple perspectives, characterized in that, include: S1. Use at least one set of imaging devices to acquire orthogonal projection images of tomato seedlings; use unique identifiers to associate and match images of the same tomato seedling from different perspectives and store them in the same storage directory; S2. Use a labeling tool to label the branch outlines in the collected tomato seedling images and generate label data; build an instance segmentation model based on YOLO v8-seg and complete the model training to obtain the branch segmentation model; use the trained branch segmentation model to perform instance segmentation on the branches of tomato seedlings in multi-view images and output the branch segmentation results. S3. Perform morphological skeletonization processing on the branch segmentation results to obtain the branch centerline skeleton diagram; use the corner detection method to identify the branch points in the skeleton diagram, and use the branch points as the vertices of the included angle; establish a circular search area with the branch points as the center and a preset radius, and filter out the endpoints of the two sides of the included angle; calculate the plane projection angle value under each viewpoint based on the coordinates of the branch points and the endpoints. S4. Based on the angle values of the plane projections corresponding to the front view and side view, construct the branch direction vector in three-dimensional space, and calculate the actual angle of the tomato seedling branches in three-dimensional space using the vector dot product formula; integrate the actual angle data in three-dimensional space with the growth environment parameters of the tomato seedlings, and use machine learning methods to establish a growth evaluation model to complete the quantitative evaluation of the growth status of tomato seedlings and the prediction of growth trends.
2. The method for analyzing the branch angle of tomato seedlings from multiple perspectives according to claim 1, characterized in that, The orthographic projection image in S1 includes at least a front view and a side view.
3. The method for analyzing the branch angle of tomato seedlings from multiple perspectives according to claim 1, characterized in that, The imaging device in S1 is a high-definition camera, which completes multi-view image acquisition through a dual-camera vertical configuration or a single camera with a turntable.
4. The method for analyzing the branch angle of tomato seedlings from multiple perspectives according to claim 1, characterized in that, The specific process of using a labeling tool to label the branch outlines in the collected tomato seedling images in S2 is as follows: Let the angle between the projections of the tomato seedling branches onto the XY plane in the front view be . The included angle of the projection in the XZ plane of the side view is , and The range of values is , respectively characterizing the angle relationship between the projection directions of the branches in the XY plane and the XZ plane; A three-dimensional coordinate system is constructed with the extension direction of the tomato seedling's main stem as the positive X-axis. The unit direction vector of the branches in the front view is defined as... ,in Let be the projection component of the vector onto the X-axis. The vector is projected onto the Y-axis, and the Z-axis projection component is 0 because the front view only reflects XY plane information; the unit direction vector of the branch in the side view is defined as... ,in Let be the projection component of the vector onto the X-axis. The vector is projected onto the Z-axis, and the Y-axis projection component is 0 because the side view only reflects information from the XZ plane. Based on the direction vector information from the front and side views, the actual direction vector of the branch in 3D space is obtained by fusing them. ,in Let X be the composite projection component of the vector on the X-axis. , By keeping its projection components on the Y-axis and Z-axis unchanged, the two-dimensional projection information is transformed into three-dimensional spatial information. Let the actual direction vectors of the two branches of the tomato seedling in three-dimensional space be respectively and According to the dot product principle, the actual three-dimensional angle between the two branches is... Satisfy the formula ,in The dot product of two vectors. , Let be the magnitudes of the two vectors, which can be directly calculated using this formula. The specific value, its range is: , representing the angular relationship between the branches in three-dimensional space.
5. The method for analyzing the branch angle of tomato seedlings from multiple perspectives according to claim 1, characterized in that, The corner detection method in S3 is specifically as follows: Let the coordinates of any pixel in the branch centerline skeleton diagram be... Construct a structure with this pixel as the center, and the size is... The rectangular neighborhood, where If the value is odd, the neighborhood size is adapted to the pixel width feature of the branch skeleton line, ensuring complete coverage of the local structural information around the pixel, and matching the branch center line feature obtained after morphological skeletonization. Calculate the autocorrelation matrix of pixel grayscale values within the rectangular neighborhood. Its expression is In the formula This represents the grayscale gradient of a pixel in the horizontal direction. This represents the grayscale gradient of a pixel in the vertical direction. This represents the summation of corresponding terms for all pixels within a rectangular neighborhood, quantizing the distribution characteristics of grayscale changes around the pixels using gradient information; Solve the autocorrelation matrix Two eigenvalues and ,in and The values of are all greater than or equal to 0, representing the intensity of grayscale change of the pixel in two vertical directions respectively. The dual judgment logic of feature values avoids the limitations of single-dimensional judgment. Simultaneously, eigenvalue determination conditions are set, when... and When the pixel is determined to be a candidate corner point, then... The grayscale change intensity threshold is used as the basis for adaptive matching based on the grayscale distribution characteristics of the skeleton map, which effectively filters out false corner points caused by image noise and fluctuations in the surface texture of the branches. Furthermore, considering the geometric structural characteristics of the branches of tomato seedlings, spatial correlation verification is performed on candidate corner points. By calculating the connectivity between candidate corner points and surrounding skeleton line segments, and taking advantage of the actual growth morphology characteristic that branches must be intersections of multiple skeleton line segments, when the connectivity is greater than 2, the candidate corner point is confirmed as a branch point.
6. The method for analyzing the branch angle of tomato seedlings from multiple perspectives according to claim 1, characterized in that, The selection process for the endpoints of the two sides of the included angle in S3 is as follows: Let the coordinates of the branch point be... ,by Center of the circle Establish a circular search region with radius, where Adapts to the pixel scale of the backbone skeleton lines, covering skeleton line segments within a reasonable range around the branch points; Iterate through the pixels of the skeleton image of the branch centerline within the circular area, filter out all intersections between the skeleton line and the circumference, and form a candidate set of endpoints. ,in The number of candidate points; For candidate set Any two distinct candidate points and Construct vectors respectively and Calculate the angle between two vectors using the vector angle formula. The expression is ,in The dot product of two vectors. Let be the magnitudes of the two vectors, respectively. Simultaneously, calculate candidate points , with branch point The degree of fit between the connecting lines and the corresponding branch skeleton lines Fit This is obtained by statistically analyzing the distribution density of skeleton pixels within a preset range on both sides of the connection line. The higher the distribution density, the better the fit. The larger; Filter out those that meet the requirements It conforms to the natural growth angle characteristics of branches and twigs, and Reaching the largest set of candidate points They are defined as the endpoints of the two sides of the included angle, while ensuring that the endpoints represent the actual opening direction of the included angle.
7. The method for analyzing the branch angle of tomato seedlings from multiple perspectives according to claim 1, characterized in that, The calculation process for the included angle values of the planar projection under each viewpoint in S3 is as follows: Let the coordinates of the branch points obtained from each viewpoint be... The coordinates of the endpoints of the two sides of the included angle are respectively and First, construct vectors representing the two sides of the included angle. and , where vector , The direction of extension of the corresponding branch in the projection plane of the current viewpoint solves the problem that the direction vector is easily affected by the endpoint deviation in traditional statistical calculations. Based on the principle of vector dot product, we first calculate the dot product of the two vectors. This reflects the degree of directional correlation between the two vectors; then, the vectors are solved separately. Length of the module sum vector Length of the module , representing the actual distance from the endpoint to the vertex; To avoid errors in single-vector dot product calculations under slightly bent branch conditions, a vector direction consistency verification mechanism is introduced: The calculated vector... , Similarity of direction cosine to the corresponding branch skeleton line segment ,in , These are the unit direction vectors of the branch skeleton line segments where endpoints A and B are located, respectively. The similarity measure is used to measure the degree of fit between the vector and the actual extension direction of the branch. Let the angle between the plane projections at the current viewpoint be . The calculation logic is optimized by combining the direction consistency verification results, and its expression is as follows: when When the value approaches 1, it indicates that the vector is highly consistent with the direction of the branch, and the original dot product calculation result is used; when When the value is small, the influence of directional deviation caused by branch bending is reduced by similarity weighting correction; The solution is obtained by inverse cosine operation. Based on the actual growth morphological characteristics of tomato seedling branches, the effective range of the included angle of the plane projection is: If the calculation result exceeds this range, the supplementary angle is taken as the final plane projection angle value.
8. The method for analyzing the branch angle of tomato seedlings from multiple perspectives according to claim 1, characterized in that, The calculation process for the actual included angle between the branches of the tomato seedling in three-dimensional space in S4 is as follows: Let the angle between the projections of the front view plane and the plane be . The angle between the side view plane projection and the plane projection is Both have a range of values. These correspond to the projection directions of the branches in the XY and XZ planes, respectively. Construct a three-dimensional coordinate system with the main stem extension direction of the tomato seedling as the positive X-axis. Based on the geometric transfer characteristics of orthogonal projection, derive the unit direction vector of the branches in the front view as follows: ,in Let be the projection component of the vector onto the X-axis. The vector is projected onto the Y-axis, and the Z-axis projection component is 0 to match the characteristic that the front view only reflects information from the XY plane. The unit direction vector of the branch in the side view is ,in Let be the projection component of the vector onto the X-axis. The vector is projected onto the Z-axis, and the Y-axis projection component is 0 to match the characteristic that the side view only reflects information from the XZ plane. To address the core issue of converting two-dimensional projection information into three-dimensional spatial information, an orthogonal component fusion logic is used to construct the actual direction vectors of the branches in three-dimensional space, i.e. The X-axis component adopts a dual-view cosine product form, which not only preserves the collaborative relationship features of the two branches in the X-axis direction, but also avoids the one-sidedness of information from a single viewpoint. The Y-axis and Z-axis components continue the projection features of the corresponding viewpoints, ensuring that the three-dimensional vector can fully represent the spatial extension of the branches. Let the actual direction vectors of the two branches of the tomato seedling in three-dimensional space be respectively and The actual three-dimensional angle between the two is calculated based on the vector dot product principle. Its core formula is ,in It is the dot product of two vectors, used to quantify the degree of directional coordination; Let be the magnitudes of the two vectors, used for... Uniform processing is used to eliminate interference from distance factors; The solution is obtained by inverse cosine operation. Its value range is , representing the actual angle relationship between the branches in three-dimensional space.
9. A multi-view tomato seedling branch angle analysis system, characterized in that, include: A multi-view image acquisition and association unit is used to acquire orthogonal projection images of tomato seedlings using at least one set of imaging devices; Images of the same tomato seedling from different perspectives are associated and matched using a unique identifier and stored in the same storage directory; The branch segmentation model training application unit is used to annotate the branch outlines in the collected tomato seedling images using an annotation tool to generate label data; to build an instance segmentation model based on YOLOv8-seg and complete the model training to obtain the branch segmentation model; and to use the trained branch segmentation model to perform instance segmentation of tomato seedling branches in multi-view images and output the branch segmentation results. The planar projection angle calculation unit is used to perform morphological skeletonization processing on the branch segmentation results to obtain the branch centerline skeleton diagram; to identify branch points in the skeleton diagram using a corner detection method, with the branch points serving as the vertices of the angle; to establish a circular search area with the branch points as the center and a preset radius, and to filter out the endpoints of the two sides of the angle; and to calculate the planar projection angle values from each viewpoint based on the coordinates of the branch points and endpoints. The three-dimensional angle calculation and growth assessment unit is used to construct the branch direction vector in three-dimensional space based on the plane projection angle values corresponding to the front view and side view. The actual angle of the tomato seedling branches in three-dimensional space is calculated by the vector dot product formula. The actual angle data in three-dimensional space is integrated with the growth environment parameters of the tomato seedling, and a growth assessment model is established by using machine learning methods to complete the quantitative evaluation of the growth status of the tomato seedling and the prediction of the growth trend.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program is executed by a processor as described in any one of claims 1-8: a method for analyzing the branch angle of tomato seedlings from multiple perspectives.