Three-dimensional point cloud-based taproot system main root point cloud extraction method, system and device
By slicing and binarizing the three-dimensional point cloud of the taproot system, identifying the center of the main root and fitting a cylinder, the occlusion and insufficient lighting problems in the extraction of the taproot point cloud of the taproot system were solved, and the accurate extraction of the taproot point cloud was achieved.
Patent Information
- Application Number
- CN202511203251.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-08-27
AI Technical Summary
Existing technologies cannot effectively extract the taproot point cloud of a taproot system, especially in the case of occlusion and insufficient lighting, where the taproot surface point cloud is not closed, resulting in extraction failure.
The three-dimensional point cloud of the taproot system is sliced, projected onto a two-dimensional plane and binarized, the outermost contour is identified and the center position of the main root is predicted. The main root point cloud is extracted by combining clustering and fitting cylinders.
Accurately identifying and extracting the taproot point cloud of the taproot system reduces errors caused by occlusion and insufficient lighting, and improves the accuracy of the taproot position.
Smart Images

Figure CN120708212A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of root system research, and in particular to a method, system and device for extracting taproot point clouds of a taproot system based on three-dimensional point clouds. Background Art
[0002] Plant root systems are divided into taproots and fibrous root systems. Taproots have a thicker main root and thinner lateral roots, with distinct taproots and lateral roots. In fibrous root systems, the main root is underdeveloped or stops growing early, and the root system consists of adventitious roots that originate at the base of the stem.
[0003] To analyze the three-dimensional phenotypic parameters of a taproot system, the taproot and lateral roots must be extracted first. However, due to occlusion and insufficient light, the taproot surface point cloud is not closed, typically appearing as a ring with holes or gaps. Furthermore, the most significant characteristic of the taproot is its continuity between adjacent slices. Existing methods for extracting plant root point clouds fail to account for these characteristics of the taproot, and therefore are unable to effectively extract the taproot point cloud. Summary of the Invention
[0004] In view of the shortcomings of the prior art, the present invention provides a method, system and device for extracting taproot point clouds of taproot systems based on three-dimensional point clouds.
[0005] In order to solve the above technical problems, the present invention is solved by the following technical solutions: A method for extracting taproot point clouds of a taproot system based on three-dimensional point clouds comprises the following steps: The original three-dimensional point cloud of the taproot is sliced along the root depth direction to obtain several layers of root slice point clouds; Projecting the root slice point clouds onto two-dimensional projection planes and performing binarization processing to obtain several root projection binary data sets; wherein the two-dimensional projection planes are perpendicular to the depth direction of the root system; Based on the root projection binary data set, the outermost contour of the root slice projection is extracted; if the outermost contour is a ring with a hole or a ring with a gap, the center of the ring cavity is the predicted value of the main root center position, and then the main root center position prediction value set is obtained; Clustering is performed on the root projection binary data set, and the root slice point cloud corresponding to the cluster whose center position is closest to the main root center position prediction value set is selected as the main root truncation point cloud; Points whose distances to the cylinder surface are less than a preset distance threshold are extracted from the taproot truncation point cloud to obtain the taproot point cloud of the taproot system; wherein the cylinder is fitted to the taproot through the taproot truncation point cloud.
[0006] As an implementable method, the method of extracting the outermost contour of the root slice projection based on the root projection binary data set includes the following steps: Use the contour detection algorithm to extract the outermost contour of the target root projection binary data set and obtain the outermost contour pixel sequence; When the difference between the coordinate value of the first pixel point and the coordinate value of the last pixel point in the outermost contour pixel point sequence is less than or equal to the preset coordinate difference threshold, the projection of the main root is a ring with a hole; When the difference between the coordinate value of the first pixel point and the coordinate value of the last pixel point in the outermost contour pixel point sequence is greater than a preset coordinate difference threshold, the projection of the main root is a ring with a gap.
[0007] As an implementable method, when the outermost contour is a ring with holes, obtaining the predicted value of the main root center coordinate includes the following steps: Based on the root projection binary data set, holes with hole rings are identified and filled to obtain a filled binary data set; Eliminate the two-dimensional points in the filling binary data set with the same coordinate values as those in the root projection binary data set to obtain the hole binary data set; The center coordinates of the calculated hole binary data set are the predicted values of the main root center position.
[0008] As an implementable method, when the outermost contour is a ring with a gap, obtaining the predicted value of the main root center coordinate includes the following steps: Based on the binary data set of the outermost contour of the gap ring, the concave boundary of the outermost contour is extracted to obtain multiple binary data sets of concave boundary projections; The maximum first distance value in the target concave area projection binary data set is used as the depth value of the target concave area projection binary data set; wherein the first distance value is the Euclidean distance transformation value from the two-dimensional point in the target concave area projection binary data set to the concave boundary; The concave area with the largest depth value that is greater than the preset depth threshold is taken as the main root cavity, and the center coordinate of the main root cavity is the predicted value of the main root center position.
[0009] As an implementable method, the method of extracting the concave boundary of the outermost contour based on the binary dataset of the outermost contour of the gap ring to obtain multiple concave boundary projection binary datasets includes the following steps: Based on the binary data set of the outermost contour of the gap ring, the convex hull of the outermost contour is extracted to obtain the binary data set of the outer contour convex hull projection; Based on the outer contour convex hull projection binary data set, the boundary of the outermost contour convex hull is extracted to obtain the outer contour convex hull boundary projection binary data set; Eliminate the two-dimensional points in the projected binary data set that belong to the outer contour convex hull projected binary data set to obtain the total concave area projected binary data set; Based on the total concave area projection binary dataset and combined with connected component analysis, multiple concave area projection binary datasets are obtained; The two-dimensional points belonging to the outer contour convex hull boundary projection binary data set in each concave area projection binary data set are eliminated to obtain multiple concave boundary projection binary data sets.
[0010] As an implementation method, extracting points whose distances from the taproot truncation point cloud to the cylinder surface are lower than a preset distance threshold to obtain the taproot point cloud of the taproot system includes the following steps: Randomly sample the main root truncation point cloud based on the preset sampling probability to obtain the main root truncation sampling point cloud; Fitting a preliminary cylinder of the main root based on the main root truncation sampling point cloud; Extracting points whose first main root cylinder distance is less than a first preset residual threshold in the main root truncation point cloud to obtain a first internal point cloud; wherein the first main root cylinder distance is the distance between the point in the main root truncation point cloud and the preliminary cylindrical surface; Based on the Euclidean distance between the midpoint of the first internal point cloud and the direction vector of the cylinder centerline, combined with the nonlinear least squares method, the optimal intermediate cylinder is obtained; Extracting points in the main root truncation point cloud whose second main root cylinder distance is less than a second preset residual threshold to obtain a second internal point cloud; wherein the second main root cylinder distance is the distance from the point in the main root truncation point cloud to the middle optimal cylinder surface; When the total number of points in the second internal point cloud is greater than a preset point threshold, the second point cloud is taken as the main root point cloud, and the preset point threshold is iterated to the total number of points in the second internal point cloud; wherein the initial preset point threshold is zero; Repeat the above process until the number of iterations reaches the preset maximum number of iterations.
[0011] As an implementable method, the method of fitting a preliminary cylinder of the main root based on the main root truncation sampling point cloud includes the following steps: Based on the preset number of sampling point cloud slices, the taproot truncation sampling point cloud is sliced along the root system depth direction to obtain several taproot truncation slice sampling point clouds; Extract the main root truncation slice sampling point cloud with the maximum value and the minimum value in the root system depth direction respectively, and obtain the maximum value main root truncation sampling point cloud and the minimum value main root truncation sampling point cloud; The minimum taproot truncation sampling point cloud and the maximum taproot truncation sampling point cloud are projected onto a two-dimensional projection plane to obtain a minimum taproot truncation projection dataset and a maximum taproot truncation projection dataset respectively. Performing two-dimensional plane circle fitting processing on the minimum main root truncation projection data set and the maximum main root truncation projection data set to obtain the coordinate value of the minimum projection circle center and the coordinate value of the maximum projection circle center; Expanding the minimum projected circle center coordinate value and the maximum projected circle center coordinate value to three dimensions to obtain the minimum three-dimensional circle center coordinate value and the maximum three-dimensional circle center coordinate value; The minimum three-dimensional circle center coordinate value and the maximum three-dimensional circle center coordinate value are averaged to obtain the cylinder center coordinate of the preliminary cylinder; Subtract the minimum three-dimensional circle center coordinate value and the maximum three-dimensional circle center coordinate value and convert them into unit vectors to obtain the direction vector of the center line of the preliminary cylinder; The distance from the point in the main root truncation sampling point cloud to the direction vector of the cylinder center line of the preliminary cylinder is calculated, and the distance is averaged to obtain the cylinder radius of the preliminary cylinder.
[0012] As an implementable method, the method of obtaining the intermediate optimal cylinder based on the Euclidean distance of the direction vector from the midpoint of the first internal point cloud to the center line of the cylinder, combined with a nonlinear least squares method, includes the following steps: Based on the center coordinates of the cylinder, the Euclidean distance of each point in the first internal point cloud to the direction vector of the cylinder center line is calculated to obtain the internal cylinder Euclidean distance set; Calculate the sum of the squares of the difference between the Euclidean distance in the internal cylinder Euclidean distance set and the cylinder radius to obtain the residual value of the cylinder surface; When the residual value of the cylindrical surface takes the minimum value, the coordinates of the cylinder center, the direction vector of the cylinder center line and the cylinder radius are obtained, which are the intermediate optimal cylinder parameters.
[0013] A taproot point cloud extraction system for a taproot system based on a three-dimensional point cloud, characterized in that it can implement any of the above methods, including a slicing module, a projection binarization module, a taproot center prediction module, a taproot truncation module, and a taproot cylinder fitting module; The slicing module is used to slice the original three-dimensional point cloud of the taproot along the root depth direction to obtain several layers of root slice point clouds; The projection binarization module is used to project the root slice point cloud onto a two-dimensional projection plane and perform binarization processing to obtain a plurality of root projection binary data sets; wherein the two-dimensional projection plane is perpendicular to the root system depth direction; The main root center prediction module is used to extract the outermost contour of the root slice projection based on the root projection binary data set; if the outermost contour is a ring with a hole or a ring with a gap, the center of the ring inner cavity is the main root center position prediction value, and then the main root center position prediction value set is obtained; The main root truncation module is used to perform clustering on the root projection binary data set, and select the root slice point cloud corresponding to the cluster whose center position is closest to the main root center position prediction value set as the main root truncation point cloud; The taproot cylinder fitting module is used to extract points in the taproot truncation point cloud whose distance to the cylinder surface is lower than a preset distance threshold, to obtain the taproot point cloud of the taproot system; wherein the cylinder is fitted to the taproot through the taproot truncation point cloud.
[0014] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.
[0015] A device includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the method described above when executing the computer program.
[0016] The present invention has significant technical effects due to the adoption of the above technical solutions: Based on the characteristics of the taproot system containing relatively thick main roots and relatively thin lateral roots, the present invention proposes a taproot point cloud extraction method based on a three-dimensional point cloud. After identifying the root projection as a ring with a hole or a ring with a gap, the center of the inner cavity of the ring is used as the predicted value of the taproot center position, the root projection is clustered, and the root slice point cloud corresponding to the cluster whose center position is closest to the set of predicted values of the taproot center position is selected as the taproot truncation point cloud. A cylinder is then fitted through the taproot truncation point cloud, and the obtained cylinder parameters are used to extract the taproot point cloud. The method of the present invention is suitable for taproot extraction of taproots of taproot systems. It takes into account the situation where the taproot surface point cloud is not closed due to occlusion, insufficient lighting, etc., filters out the interference of the truncation of the inner root of the slice on the taproot extraction, and the smoothing filtering of the taproot position between adjacent slices reduces the influence of the estimation error of the taproot position in a certain slice on the position of the entire taproot centerline. The method of the present invention is more targeted to the taproot system, and the extracted taproot position and taproot point cloud are more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 Schematic diagram of a process of an embodiment of the method of the present invention; Figure 2 Schematic diagram of slicing the original three-dimensional point cloud along the direction perpendicular to the root system depth in an embodiment of the present invention; Figure 3 Schematic diagram of the taproot (green part) in an embodiment of the present invention; Figure 4Schematic diagram of a main root projected onto a two-dimensional projection plane as a ring with a hole in an embodiment of the present invention; Figure 5 Schematic diagram of a main root projected onto a two-dimensional projection plane as a ring with a gap in an embodiment of the present invention; Figure 6 Schematic diagram of the predicted main root center line after filtering in continuous slices in an embodiment of the present invention; Figure 7 Schematic diagram of a point cloud of a taproot truncation sampling point cloud in an embodiment of the present invention; Figure 8 Schematic side view of a taproot truncation sampling point cloud according to an embodiment of the present invention; Figure 9 Schematic diagram of the projection of the maximum value main root truncation sampling point cloud and the minimum value main root truncation sampling point cloud on a two-dimensional projection plane and two fitted two-dimensional plane circles in an embodiment of the present invention; Figure 10 Schematic diagram of the first internal point cloud and the fitted intermediate optimal cylinder in an embodiment of the present invention; Figure 11 Schematic diagram of a point cloud of a main root point cloud (green part) in an embodiment of the present invention; Figure 12 Schematic diagram of the overall embodiment of the system of the present invention. DETAILED DESCRIPTION
[0019] The present invention will be further described in detail below with reference to the embodiments. The following embodiments are for explanation of the present invention and the present invention is not limited to the following embodiments. In the absence of conflict, the features in the following embodiments may be combined with each other.
[0020] Example 1: In one embodiment, a method for extracting taproot point clouds based on three-dimensional point clouds is provided. Figure 1 As shown, the following steps are included: S100: Slicing the original three-dimensional point cloud of the taproot along the root depth direction to obtain several layers of root slice point clouds; S200: Projecting the root slice point clouds onto two-dimensional projection planes and performing binarization processing to obtain a plurality of root projection binary data sets; wherein the two-dimensional projection planes are perpendicular to the depth direction of the root system; S300: Based on the root projection binary data set, extract the outermost contour of the root slice projection; if the outermost contour is a ring with a hole or a ring with a gap, the center of the ring inner cavity is the main root center position prediction value, and thus obtain the main root center position prediction value set; S400: performing clustering processing on the root projection binary data set, and selecting the root slice point cloud corresponding to the cluster whose center position is closest to the main root center position prediction value set as the main root truncation point cloud; S500: extracting points in the taproot truncation point cloud whose distance to the cylinder surface is less than a preset distance threshold, to obtain the taproot point cloud of the taproot system; wherein the cylinder is fitted to the taproot through the taproot truncation point cloud.
[0021] The root depth direction refers to the main growth direction of the taproot. The two-dimensional projection plane is a plane perpendicular to the root depth direction. For ease of explanation, in this specific implementation, it is assumed that the root depth direction of the root point cloud is the Y direction (first direction) of the existing three-dimensional coordinates, and the two-dimensional projection plane is the XZ two-dimensional plane of the existing three-dimensional coordinates. After filtering the root point cloud in the spatial range (such as BoxFilter), the root system is divided into N (=40) slices along the Y direction. Each slice has a main root segment, and each slice contains an unknown number of main root segments and lateral root segments.
[0022] In another embodiment, in S100, the original three-dimensional point cloud of the taproot system is sliced along the root system depth direction to obtain several layers of root slice point clouds, including the following steps: (1) Filter the original three-dimensional point cloud based on spatial range to obtain a three-dimensional point cloud of spatially filtered roots. Filtering the original three-dimensional point cloud based on spatial range is a key step in point cloud preprocessing. It is mainly used to remove noise, outliers or extract specific areas, which can reduce the amount of calculation and provide cleaner data for subsequent operations. Spatial range-based filtering methods include but are not limited to: direct spatial range filtering methods that directly extract or delete specific areas in the point cloud by setting geometric boundaries, such as box filters, sphere / cylinder filters, polygon / convex hull filters; by calculating the distance distribution between each point and its neighboring points, eliminating points (outliers) outside the mean ± standard deviation range; voxel grid filtering; radius filtering that removes points with fewer than a threshold in the neighborhood; setting a range threshold along the specified axis (X / Y / Z) to retain points within the interval; spatial density clustering filtering, which retains point clusters that meet the spatial distribution conditions based on density clustering and eliminates isolated points. The specific spatial filtering method can be selected based on the actual situation of the point cloud density, main root and root system, and computational efficiency requirements.
[0023] (2) Slice the spatially filtered root 3D point cloud along the root depth direction to obtain several root slice point clouds. Figure 2 The figure shows a schematic diagram of slicing the original 3D point cloud along the direction perpendicular to the root depth, and the spatial filtered root 3D point cloud is sliced along the Y axis in the root depth direction into a preset number of slices. Slice point cloud, each slice contains an unknown number of segments of main roots and lateral roots, specifically: traverse the spatial filtering root 3D point cloud, find the minimum Y coordinate of all points and maximum value , the total span of the Y axis , divide the value range of the Y axis into intervals, the height of each slice , then the first and , The Y-axis intervals of each slice are 、 、 , . Each point in the three-dimensional point cloud at the root of the spatial filter is then assigned to the corresponding interval slice according to its Y coordinate value. The sliced point cloud is a local cross-section of the original point cloud in the Y direction, similar to a part cut out from the point cloud with a "thin blade" parallel to the XZ plane. The coordinate values of the sliced point cloud in the Y direction are within a very small range and can be regarded as 2.5D data, a point set on the XZ plane, but retaining tiny Y-direction differences.
[0024] If the spatially filtered root 3D point cloud is unevenly distributed along the Y axis, some slices may contain very few points, or even no points at all. In this case, empty slices can be allowed. Adjacent slices can also be set to partially overlap. Regardless of the setting, all root slice point clouds ultimately cover the spatially filtered root 3D point cloud.
[0025] Each slice The slice contains an unknown number of main root segments and lateral root segments. Due to the inclination and cross-intersection of many lateral roots, the projection shape of the lateral root segments on the XZ two-dimensional plane is uncertain. The taproot truncation in the figure is approximately a hollow cylinder, so the projection of the taproot truncation on the XZ two-dimensional plane is approximately a ring with a hole. However, due to reasons such as lateral root occlusion, the taproot surface point cloud obtained by 3D reconstruction may be defective or not closed. In this case, the projection of the taproot truncation on the XZ two-dimensional plane is similar to a ring with a hole. Therefore, each root slice is projected on the XZ two-dimensional plane, and the ring with a hole or the ring with a hole is extracted from the projection binary image. The center position of the ring cavity is recorded as the estimated center position of the taproot truncation in the slice. .like Figure 3-Figure 5 As shown, Figure 3 The green part in the middle is the cut-off part of the main root. Figure 4 The main root is cut off in a two-dimensional projection plane and is a circular diagram with a hole. Figure 5 Schematic diagram of the main root truncation showing a notched ring in the two-dimensional projection plane.
[0026] In another embodiment, in S200, the root slice point clouds are projected onto two-dimensional projection planes and binarized to obtain a plurality of root projection binary data sets, including the following steps: S210: The root slice point clouds are projected onto the two-dimensional projection plane respectively, and we get root slice projection dataset. Slice The point cloud is projected on the XZ two-dimensional plane. 3D points in point cloud Convert to a two-dimensional point with only X and Z coordinates .
[0027] S220: The two-dimensional point coordinates of the root slice projection dataset projected onto the XZ plane Discretized into image coordinates, we get The root projection coordinate discrete data set is convenient for subsequent image processing. The root projection coordinate discrete data set is expressed as: ,in, Indicates the The two-dimensional coordinate values of the two-dimensional points in the root projection coordinate discrete data set, represents the ceiling function, Indicates the The two-dimensional coordinate values of the root slice projection dataset, Indicates the The minimum coordinate value of the root slice point cloud in the two perpendicular directions of the two-dimensional projection plane (XZ plane), Indicates the side length of each voxel / grid during spatial filtering, for example .
[0028] S230: Setting the pixel values of the two-dimensional points in the root slice projection data set to a first preset binary value to obtain a root projection binary data set, and setting the pixel values of other two-dimensional points in the two-dimensional projection plane to a second preset binary value.
[0029] The size is ,in, If slice The point cloud coordinate range is: , , , gridSize=0.005, then The size is .
[0030] The binarization method is to transform the XZ two-dimensional projection point The corresponding image coordinate point The pixel value of is assigned to the first preset binary value (1, pure white), and the pixel values of other points are assigned to the second preset binary value (0, pure black). Generally, the first preset binary value is set to 1 (pure white) and the second preset binary value is set to 0 (pure black). Projection binary images of root slice point clouds on the XZ plane ,like Figure 3 As shown, the projected binary image One-to-one correspondence with the root slice point cloud, the number is also You can also set the second preset binary value to 1 (pure white) and the first preset binary value to 0 (pure black), as long as you can distinguish between projected points and non-projected points.
[0031] In the projected binary image On the graph, the taproot truncation appears as a ring with a hole or a gap. The outermost contour of the projected binary image is extracted. If the contour is closed (the starting and ending points of the contour coincide), the ring is gapless. If the contour has discontinuous endpoints (two distinct endpoints), the contour is not closed and the ring has a gap.
[0032] In another embodiment, in S300, based on the root projection binary data set, the outermost contour of the root slice projection is extracted; if the outermost contour is a ring with a hole or a ring with a gap, the center of the inner cavity of the ring is the main root center position prediction value, and then the main root center position prediction value set is obtained, including the following steps: S310: Using a contour detection algorithm (such as a boundary tracking algorithm) to extract the outermost contour of the root projection binary data set, and obtaining a sequence of outermost contour pixel points.
[0033] S320: If the difference between the coordinate value of the first pixel point and the coordinate value of the last pixel point in the outermost contour pixel point sequence is less than or equal to a preset coordinate difference threshold, the projection of the main root is a ring with a hole.
[0034] If the difference between the coordinate value of the first pixel point and the coordinate value of the last pixel point in the outermost contour pixel point sequence is greater than a preset coordinate difference threshold, the projection of the main root is a ring with a gap.
[0035] S330: The calculated center of the hole ring or the gap ring is used as the main root center position prediction value, and then a main root center position prediction value set is obtained.
[0036] In another embodiment, when the projection of the main root is a ring with a hole, such as Figure 4 As shown in FIG, the main root truncation is projected on a two-dimensional projection plane as a schematic diagram of a ring with a hole, and the predicted value of the main root center coordinate is obtained as follows: (1) Using hole identification algorithm (such as Flood Fill edge seed method) and hole filling algorithm (such as FloodFill internal filling, MATLAB's imfill function), the holes in the projected binary image are identified and filled based on the root projection binary data set to obtain a filled binary data set, which corresponds to the binary image after the holes are filled. .
[0037] (2) Eliminate the two-dimensional points in the filling binary dataset that have the same coordinate values as those in the root projection binary dataset to obtain the hole binary dataset.
[0038] (3) The center coordinates of the binary hole dataset are calculated to be the estimated center coordinates of the main root cavity. , the center coordinates of the hole are the binary image after filling the hole The center position of the hole binary data set can be calculated by using methods such as the geometric moment centroid method, the contour boundary center method (Bounding Box center), the maximum point method based on distance transformation, the Hough circle detection method, and the pixel coordinate average value.
[0039] (4) The same method is used to obtain the predicted values of the main root center positions of other slices, and then the predicted value set of the main root center positions is obtained.
[0040] In another embodiment, when the projection of the main root is a ring with a gap, such as Figure 5 As shown in the figure, the main root truncation is projected as a notched ring on a two-dimensional projection plane. For the notched ring, the concave area within the notch should be determined first, and then the concave area with the largest depth and greater than the threshold is taken as the main root lumen. Finally, the predicted value of the main root center coordinate is obtained, as follows: (1) Use edge detection or contour tracking algorithms (such as Moore-Neighbor tracking) to extract the projected binary image Outer contour , obtaining a binary dataset of the root's outer contour projection. A ring with a gap has two contours: an outer contour and an inner contour (the gap). The outer contour can be extracted using a convex hull algorithm (such as Graham Scan or Andrew's algorithm). Andrew's Monotone Chain Algorithm or Graham Scan is used to calculate the convex hull of the outer contour (convexHullMask); the convex hull (convexHullMask) ignores all concave areas, forming a completely convex closed region. (2) Based on the convex hull of the outer contour, a convex hull mask is obtained. When the coordinates of a point are within the closed area of the convex hull of the outer contour, the point is the convex hull mask, which can be generated by a polygon filling algorithm (such as Scanline Fill). The contour boundary is extracted from the convex hull mask to obtain the convex hull boundary imgHullPerim, which can be achieved through edge detection or contour tracking algorithms.
[0041] (3) Combine the convex hull mask convexHullMask with the projected binary image Perform a difference operation, and the difference is the total concave area (the root total concave area projection binary data set, the sum of all concave areas). Perform a connected component analysis on the total concave area to obtain multiple independent concave regions containing the main root cavity, concaveRegions (multiple root concave area projection binary data sets). (4) Extract the coordinates common to the convex hull boundary in the concave regions concaveRegions and obtain multiple concave region boundaries concaveBorder.
[0042] (5) Calculate the Euclidean distance transform value distBorder from each point in the concave region concaveRegions to the concave region boundary concaveBorder (that is, the straight-line distance from each point to the nearest concave region boundary).
[0043] (6) The maximum value of the Euclidean distance transform value distBorder is taken as the depth of the concave area.
[0044] (7) The concave area with the largest depth that is greater than the depth threshold is taken as the main root cavity, and the center coordinate of the main root cavity is the predicted value of the main root center position.
[0045] The following is a Matlab code example for calculating the depth of a concave area: concaveRegions = convexHullMask&~Ixz; imgHullPerim = bwperim(convexHullMask); concaveBorder = (concaveRegion&imgHullPerim); distBorder = bwdist(concaveBorder); concaveDepth = concaveRegion.*distBorder; (8) The same method is used to obtain the predicted values of the main root center positions of other slices, and then the predicted value set of the main root center positions is obtained.
[0046] In another embodiment, in S400, clustering is performed on the root projection binary data set, and the root slice point cloud corresponding to the cluster whose center position is closest to the main root center position prediction value set is selected as the main root truncation point cloud, including the following steps: S410: Performing median filtering on the main root center position prediction value set to obtain a filtered main root center position prediction value set; According to the continuity of the main root center position in adjacent slices, the main root of the continuous slices is truncated to estimate the center position sequence The window size is The median filter, , where it is assumed that the slice layer where the main root is located is , Indicates the total number of point cloud slices, Indicates the total number of main root point cloud slices. Connect them in sequence as the center line of the main root of the entire root system.
[0047] like Figure 6 As shown in Figure 1, it is a schematic diagram of the main root center prediction line after filtering, wherein the red dot is the main root center position point corresponding to the main root center position prediction value set, the green dot is the filtered main root center position point corresponding to the filtered main root center position prediction value set, and the blue line is the filtered main root center prediction line drawn according to the filtered main root center position prediction value set.
[0048] S420: Clustering is performed on all root slice projection datasets (root truncation point clouds within a slice projected onto the XZ plane) to obtain a number of clusters. It is important to note that in this step, clustering is performed first on a single root slice projection dataset to obtain one or more clusters corresponding to that root slice projection dataset. Clustering is then performed on the remaining root slice projection datasets one by one to obtain one or more clusters corresponding to each root slice projection dataset. All clusters are referred to as the number of clusters described in this section. In other words, a single cluster originates from the same slice.
[0049] S430: Calculate the center position of each cluster to obtain several cluster center positions.
[0050] S440: Calculate the corresponding center position of each cluster center position to the filter main root center position prediction value set The distance between the two clusters is obtained, and several cluster main root distances are obtained; the root slice point cloud corresponding to the minimum cluster main root distance is the main root truncation point cloud.
[0051] In another embodiment, in S500, points whose distances from the taproot truncation point cloud to the cylinder surface are less than a preset distance threshold are extracted to obtain the taproot point cloud of the taproot system; wherein the cylinder is fitted to the taproot through the taproot truncation point cloud, including the following steps: S510: Truncate the point cloud at the main root based on the preset sampling probability Random sampling on the top to obtain the main root truncation sampling point cloud ,like Figure 7 As shown, Figure 7 Schematic diagram of a point cloud of sampled points truncated by the principal root. The sampling probability determines the probability of randomly selecting the minimum sample set in each iteration and is related to the inlier ratio of the data. The greater the sampling probability (the higher the inlier ratio), the fewer iterations required. If the inlier ratio is unknown, it can be estimated through adaptive methods. The residual threshold is the error threshold used to determine whether a data point is an inlier. When the error from a data point to the fitted model (such as the distance from the point to the line) is less than the residual threshold, the point is considered an inlier. The residual threshold is typically problem-specific and is determined through experimentation or data characteristics. If the residual threshold is too small, valid inliers will be missed, resulting in underfitting of the model. If the residual threshold is too large, outliers will be mistaken for inliers, reducing model robustness. The maximum number of iterations is used to limit the maximum number of iterations to avoid infinite loops.
[0052] Before fitting the preliminary cylinder of the main root, the parameters need to be initialized. , initialize the maximum value of the number of internal points (preset point threshold) is zero, that is, initialize the optimal cylinder parameters is empty, that is , initialize the main root point cloud is empty, that is , the number of initialization iterations is zero, that is , set the sampling probability , the first preset residual threshold , the second preset residual threshold and the maximum number of iterations , for example, setting .
[0053] S520: Truncation of sampling point cloud based on main root Estimate the initial values of cylinder parameters , cylinder parameters Including the center coordinates of the cylinder , cylinder radius and the direction vector of the cylinder centerline .
[0054] In another embodiment, obtaining preliminary cylinder parameters specifically includes: (1) Based on the preset number of sampling point cloud slices, the main root truncation sampling point cloud is sliced along the root depth direction (Y direction), and the main root truncation slice sampling point clouds with the maximum and minimum values in the root depth direction are extracted respectively, and the maximum main root truncation sampling point cloud and the minimum main root truncation sampling point cloud are obtained, as shown in Fig. Figure 8 As shown, it is a side view schematic diagram of the main root truncation sampling point cloud, where the blue point cloud is the maximum value main root truncation sampling point cloud, and the red point cloud is the minimum value main root truncation sampling point cloud.
[0055] (2) The maximum taproot truncation sampling point cloud and the minimum taproot truncation sampling point cloud are projected onto a two-dimensional projection plane to obtain the maximum taproot truncation projection dataset and the minimum taproot truncation projection dataset.
[0056] (3) Fit the two-dimensional plane circles of the minimum main root truncated projection data set and the maximum main root truncated projection data set, and obtain the centers of the two fitted plane circles: the coordinates of the center of the minimum projection circle and the coordinates of the center of the maximum projection circle , we can use geometric fitting (such as Taubin method), algebraic fitting (such as Kasa method), least squares method, Hough transform method, etc. to fit the two-dimensional plane circle. Figure 9 As shown, it is a schematic diagram of the projection of the maximum value main root truncation sampling point cloud and the minimum value main root truncation sampling point cloud on the two-dimensional projection plane and the two fitted two-dimensional plane circles, where the blue points are the points where the maximum value main root truncation sampling point cloud is projected on the two-dimensional projection plane, and the red points are the points where the minimum value main root truncation sampling point cloud is projected on the two-dimensional projection plane.
[0057] (4) Project the minimum value to the center coordinates and the coordinates of the center of the maximum projection circle Expand to three dimensions and get the minimum three-dimensional center coordinates and the maximum three-dimensional center coordinates , then the minimum three-dimensional center coordinates Expressed as: , the coordinates of the center of the maximum three-dimensional circle Expressed as: .
[0058] (5) The coordinates of the minimum three-dimensional circle center and the maximum three-dimensional center coordinates Take the average to get the median three-dimensional circle center coordinates This is the initial center coordinate of the cylinder.
[0059] (6) The coordinates of the minimum three-dimensional circle center and the maximum three-dimensional center coordinates Perform difference processing to obtain the difference coordinates of the center coordinates ; The difference coordinates of the center of the circle Convert to unit vector to get the initial direction vector of the center line of the cylinder .
[0060] (7) Calculate the initial direction vector from the point in the taproot truncation point cloud to the center line of the cylinder The distance is calculated and the average distance is obtained, which is the initial radius of the cylinder. , the main root cuts off the first points Initial direction vector to the centerline of the cylinder distance Expressed as: .
[0061] S530: Calculate the taproot truncation point cloud based on the initial parameters of the cylinder From the point in to the initial cylinder The distance of the surface is obtained to obtain the first main root cylinder distance. If the first main root cylinder distance is less than the first preset residual threshold, the point is an internal point, and the first internal point cloud is finally obtained. . Main root truncation point cloud Middle The distance from the point to the initial cylinder surface (the first main root cylinder distance) Expressed as: ,in, Represents the main root truncation point cloud Middle The coordinate values of the points, represents the initial center coordinates of the cylinder, represents the initial direction vector of the cylinder centerline, represents the initial radius of the cylinder, represents the norm of the vector, Represents the cross product of vectors.
[0062] S540: Based on the first internal point cloud The Euclidean distance from the midpoint to the cylinder axis is combined with a nonlinear least squares method to obtain the optimal intermediate cylinder parameters.
[0063] In another embodiment, the intermediate optimal cylinder parameters are obtained as follows: (1) For the first internal point cloud Any point in ,calculate The Euclidean distance of the direction vector to the center line of the cylinder to obtain the Euclidean distance of the inner cylinder , the first internal point cloud The points Euclidean distance of the direction vector to the centerline of the cylinder Expressed as: ,in, represents the reference point on the cylinder axis (usually the center coordinate of the cylinder), represents the direction vector of the center line of the cylinder, represents the norm of the vector, Represents the dot product (inner product) of vectors. Indicates a point Arrive The square of the distance (the square of the total length), Represents a vector The square of the projected length in the direction of the cylinder's axis, Indicates a point The perpendicular distance to the cylinder axis is the radial distance of the cylinder, which is the estimated radius of the cylinder.
[0064] Therefore, the inner cylinder Euclidean distance It can also be expressed as: ,in, Indicates a point The coordinate value of Represents the center point of the cylinder The coordinate value of A direction vector representing the centerline of the cylinder.
[0065] (2) Calculate the Euclidean distance of the inner cylinder and the cylinder radius The sum of the squares of the differences is used to obtain the residual value of the cylindrical surface .
[0066] Among them, the center coordinates of the cylinder , the direction vector of the center line of the cylinder and the radius of the cylinder All of them are undetermined variables. The purpose of the nonlinear least squares method is to find the center coordinates of the cylinder that minimize the residual value of the cylindrical surface. , the direction vector of the center line of the cylinder and the radius of the cylinder .
[0067] (3) When the residual value of the cylindrical surface takes the minimum value, the center coordinates of the cylinder, the direction vector of the center line of the cylinder and the radius of the cylinder are obtained, which are the intermediate optimal cylinder parameters (intermediate optimal cylinder center coordinates , the centerline direction vector of the optimal cylinder in the middle and the optimal radius of the middle cylinder ).like Figure 10As shown, it is a schematic diagram of the first internal point cloud and the fitted intermediate optimal cylinder, wherein the red is the point cloud schematic diagram of the first internal point cloud, and the blue is the fitted intermediate optimal cylinder.
[0068] The following is an example of the Matlab code for fitting the intermediate optimal cylinder parameters using the nonlinear least squares method: options = optimoptions('lsqnonlin', 'Algorithm', 'levenberg-marquardt'); CylinderParai = lsqnonlin(@(params)cylinderResiduals(params,pts1),CylinderPara0, [], [], options); Among them, the cylinderResiduals function calculates the distance between the point cloud points and the surface of the cylinder params. The MATLAB code is: function residuals = cylinderResiduals(params, points) % Vectorized calculation vecs = points - params.center;% N×3 proj_lengths = vecs * params.axisDir';% N×1 (dot product) proj_points = params.center + proj_lengths * params.axisDir;% N×3 distances = sqrt(sum((points - proj_points).^2, 2)); % N×1 residuals = distances - params.radius;% N×1 end S550: Based on the parameters of the intermediate optimal cylinder, the distance from the taproot truncation point cloud to the surface of the intermediate optimal cylinder is calculated to obtain a second taproot cylinder distance; points in the taproot truncation point cloud whose second taproot cylinder distance is less than a second preset residual threshold are extracted to obtain a second internal point cloud. The first preset residual threshold and the second preset residual threshold can be set to be the same or different, as required.
[0069] S560: When the total number of points in the second internal point cloud exceeds the preset point count threshold, the second point cloud is selected as the main root point cloud. The preset point count threshold is iterated to the total number of points in the second internal point cloud. The optimal cylinder (parameters) in the middle is the optimal cylinder (parameters) fitted by the main root point cloud. In other words, the main root point cloud is the second point cloud with the largest total number of points.
[0070] S570: Repeat steps S520 to S560 until the number of iterations reaches the preset maximum number of iterations, and obtain the main root point cloud and the corresponding cylinder, such as Figure 11 As shown, this is a schematic diagram of the point cloud of the main root point cloud (green part).
[0071] Example 2: A taproot point cloud extraction system based on 3D point cloud, such as Figure 12 As shown, the method of any one of the above embodiments can be implemented, including a slicing module 100, a projection binarization module 200, a main root center prediction module 300, a main root truncation module 400 and a main root cylinder fitting module 500; The slicing module 100 is used to slice the original three-dimensional point cloud of the taproot along the root system depth direction to obtain several layers of root slice point clouds; The projection binarization module 200 is used to project the root slice point clouds onto two-dimensional projection planes and perform binarization processing to obtain a plurality of root projection binary data sets; wherein the two-dimensional projection planes are perpendicular to the root system depth direction; The main root center prediction module 300 is used to extract the outermost contour of the root slice projection based on the root projection binary data set; if the outermost contour is a ring with a hole or a ring with a gap, the center of the ring cavity is the main root center position prediction value, and thus a main root center position prediction value set is obtained; The main root truncation module 400 is used to perform clustering on the root projection binary data set, and select the root slice point cloud corresponding to the cluster whose center position is closest to the main root center position prediction value set as the main root truncation point cloud; The taproot cylinder fitting module 500 is used to extract points in the taproot truncation point cloud whose distance to the cylinder surface is lower than a preset distance threshold, to obtain the taproot point cloud of the taproot system; wherein the cylinder is fitted to the taproot through the taproot truncation point cloud.
[0072] Various changes and modifications can be made without departing from the spirit and scope of the present invention, and all equivalent technical solutions also fall within the scope of the present invention.
[0073] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referenced to each other.
[0074] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, apparatus, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0075] The present invention is described with reference to the flowcharts and / or block diagrams of the method, terminal device (system), and computer program product according to the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the process in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0076] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0077] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0078] It should be noted that: References in this specification to "one embodiment" or "an embodiment" mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Therefore, appearances of the phrases "one embodiment" or "an embodiment" in various places throughout this specification do not necessarily refer to the same embodiment.
[0079] Furthermore, it should be noted that the specific embodiments described in this specification may vary in the shapes and names of their components. Any equivalent or simple variations based on the structure, features, and principles described in the patented concept of this invention are included within the scope of protection of this patent. Persons skilled in the art may make various modifications, additions, or substitutions to the described specific embodiments, and these modifications, as long as they do not deviate from the structure of the invention or exceed the scope defined by the claims, shall fall within the scope of protection of this invention.
Claims
1. A method for extracting taproot point clouds based on three-dimensional point clouds, characterized in that: The following steps are involved: The original three-dimensional point cloud of the taproot is sliced along the root depth direction to obtain several layers of root slice point clouds; Projecting the root slice point clouds onto two-dimensional projection planes and performing binarization processing to obtain several root projection binary data sets; wherein the two-dimensional projection planes are perpendicular to the depth direction of the root system; Based on the root projection binary data set, the outermost contour of the root slice projection is extracted; if the outermost contour is a ring with a hole or a ring with a gap, the center of the ring cavity is the predicted value of the main root center position, and then the main root center position prediction value set is obtained; Clustering is performed on the root projection binary data set, and the root slice point cloud corresponding to the cluster whose center position is closest to the main root center position prediction value set is selected as the main root truncation point cloud; Points whose distances to the cylinder surface are less than a preset distance threshold are extracted from the taproot truncation point cloud to obtain the taproot point cloud of the taproot system; wherein the cylinder is fitted to the taproot through the taproot truncation point cloud.
2. The method for extracting taproot point cloud based on three-dimensional point cloud according to claim 1, characterized in that: The method of extracting the outermost contour of the root slice projection based on the root projection binary data set includes the following steps: Use the contour detection algorithm to extract the outermost contour of the target root projection binary data set and obtain the outermost contour pixel sequence; When the difference between the coordinate value of the first pixel point and the coordinate value of the last pixel point in the outermost contour pixel point sequence is less than or equal to the preset coordinate difference threshold, the projection of the main root is a ring with a hole; When the difference between the coordinate value of the first pixel point and the coordinate value of the last pixel point in the outermost contour pixel point sequence is greater than a preset coordinate difference threshold, the projection of the main root is a ring with a gap.
3. The method for extracting taproot point cloud based on three-dimensional point cloud according to claim 1, characterized in that: When the outermost contour is a ring with holes, obtaining the predicted value of the main root center coordinate includes the following steps: Based on the root projection binary data set, holes with hole rings are identified and filled to obtain a filled binary data set; Eliminate the two-dimensional points in the filling binary data set with the same coordinate values as those in the root projection binary data set to obtain the hole binary data set; The center coordinates of the calculated hole binary data set are the predicted values of the main root center position.
4. The method for extracting taproot point cloud based on three-dimensional point cloud according to claim 1, characterized in that: When the outermost contour is a ring with a gap, obtaining the predicted value of the main root center coordinate includes the following steps: Based on the binary data set of the outermost contour of the gap ring, the concave boundary of the outermost contour is extracted to obtain multiple binary data sets of concave boundary projections; The maximum first distance value in the target concave area projection binary data set is used as the depth value of the target concave area projection binary data set; wherein the first distance value is the Euclidean distance transformation value from the two-dimensional point in the target concave area projection binary data set to the concave boundary; The concave area with the largest depth value that is greater than the preset depth threshold is taken as the main root cavity, and the center coordinate of the main root cavity is the predicted value of the main root center position.
5. The method for extracting taproot point cloud based on three-dimensional point cloud according to claim 4, characterized in that: The method of extracting the concave boundary of the outermost contour based on the binary data set of the outermost contour of the gap ring to obtain multiple concave boundary projection binary data sets includes the following steps: Based on the binary data set of the outermost contour of the gap ring, the convex hull of the outermost contour is extracted to obtain the binary data set of the outer contour convex hull projection; Based on the outer contour convex hull projection binary data set, the boundary of the outermost contour convex hull is extracted to obtain the outer contour convex hull boundary projection binary data set; Eliminate the two-dimensional points in the projected binary data set that belong to the outer contour convex hull projected binary data set to obtain the total concave area projected binary data set; Based on the total concave area projection binary dataset and combined with connected component analysis, multiple concave area projection binary datasets are obtained; The two-dimensional points belonging to the outer contour convex hull boundary projection binary data set in each concave area projection binary data set are eliminated to obtain multiple concave boundary projection binary data sets.
6. The method for extracting taproot point cloud based on three-dimensional point cloud according to claim 1, characterized in that: The step of extracting points whose distances from the taproot truncation point cloud to the cylinder surface are lower than a preset distance threshold to obtain the taproot point cloud of the taproot system comprises the following steps: Randomly sample the main root truncation point cloud based on the preset sampling probability to obtain the main root truncation sampling point cloud; Fitting a preliminary cylinder of the main root based on the main root truncation sampling point cloud; Extracting points whose first main root cylinder distance is less than a first preset residual threshold in the main root truncation point cloud to obtain a first internal point cloud; wherein the first main root cylinder distance is the distance between the point in the main root truncation point cloud and the preliminary cylindrical surface; Based on the Euclidean distance between the midpoint of the first internal point cloud and the direction vector of the cylinder centerline, combined with the nonlinear least squares method, the optimal intermediate cylinder is obtained; Extracting points in the main root truncation point cloud whose second main root cylinder distance is less than a second preset residual threshold to obtain a second internal point cloud; wherein the second main root cylinder distance is the distance from the point in the main root truncation point cloud to the middle optimal cylinder surface; When the total number of points in the second internal point cloud is greater than a preset point threshold, the second point cloud is taken as the main root point cloud, and the preset point threshold is iterated to the total number of points in the second internal point cloud; wherein the initial preset point threshold is zero; Repeat the above process until the number of iterations reaches the preset maximum number of iterations.
7. The method for extracting taproot point cloud based on three-dimensional point cloud according to claim 6, characterized in that: The method of fitting a preliminary cylinder of the main root based on the main root truncation sampling point cloud comprises the following steps: Based on the preset number of sampling point cloud slices, the taproot truncation sampling point cloud is sliced along the root system depth direction to obtain several taproot truncation slice sampling point clouds; Extract the main root truncation slice sampling point cloud with the maximum value and the minimum value in the root system depth direction respectively, and obtain the maximum value main root truncation sampling point cloud and the minimum value main root truncation sampling point cloud; The minimum taproot truncation sampling point cloud and the maximum taproot truncation sampling point cloud are projected onto a two-dimensional projection plane to obtain a minimum taproot truncation projection dataset and a maximum taproot truncation projection dataset respectively. Performing two-dimensional plane circle fitting processing on the minimum main root truncation projection data set and the maximum main root truncation projection data set to obtain the coordinate value of the minimum projection circle center and the coordinate value of the maximum projection circle center; Expanding the minimum projected circle center coordinate value and the maximum projected circle center coordinate value to three dimensions to obtain the minimum three-dimensional circle center coordinate value and the maximum three-dimensional circle center coordinate value; The minimum three-dimensional circle center coordinate value and the maximum three-dimensional circle center coordinate value are averaged to obtain the cylinder center coordinate of the preliminary cylinder; Subtract the minimum three-dimensional circle center coordinate value and the maximum three-dimensional circle center coordinate value and convert them into unit vectors to obtain the direction vector of the center line of the preliminary cylinder; The distance from the point in the main root truncation sampling point cloud to the direction vector of the cylinder center line of the preliminary cylinder is calculated, and the distance is averaged to obtain the cylinder radius of the preliminary cylinder.
8. The method for extracting taproot point cloud based on three-dimensional point cloud according to claim 6, characterized in that: The method of obtaining the intermediate optimal cylinder based on the Euclidean distance of the direction vector from the midpoint of the first internal point cloud to the center line of the cylinder and combining it with a nonlinear least squares method includes the following steps: Based on the center coordinates of the cylinder, the Euclidean distance of each point in the first internal point cloud to the direction vector of the cylinder center line is calculated to obtain the internal cylinder Euclidean distance set; Calculate the sum of the squares of the difference between the Euclidean distance in the internal cylinder Euclidean distance set and the cylinder radius to obtain the residual value of the cylinder surface; When the residual value of the cylindrical surface takes the minimum value, the coordinates of the cylinder center, the direction vector of the cylinder center line and the cylinder radius are obtained, which are the intermediate optimal cylinder parameters.
9. A taproot point cloud extraction system based on three-dimensional point cloud, characterized in that: A method capable of implementing any one of claims 1 to 8, comprising a slicing module, a projection binarization module, a taproot center prediction module, a taproot truncation module, and a taproot cylinder fitting module; The slicing module is used to slice the original three-dimensional point cloud of the taproot along the root depth direction to obtain several layers of root slice point clouds; The projection binarization module is used to project the root slice point cloud onto a two-dimensional projection plane and perform binarization processing to obtain a plurality of root projection binary data sets; wherein the two-dimensional projection plane is perpendicular to the root system depth direction; The main root center prediction module is used to extract the outermost contour of the root slice projection based on the root projection binary data set; if the outermost contour is a ring with a hole or a ring with a gap, the center of the ring inner cavity is the main root center position prediction value, and then the main root center position prediction value set is obtained; The main root truncation module is used to perform clustering on the root projection binary data set, and select the root slice point cloud corresponding to the cluster whose center position is closest to the main root center position prediction value set as the main root truncation point cloud; The taproot cylinder fitting module is used to extract points in the taproot truncation point cloud whose distance to the cylinder surface is lower than a preset distance threshold, to obtain the taproot point cloud of the taproot system; wherein the cylinder is fitted to the taproot through the taproot truncation point cloud.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
11. A device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Circular tunnel central axis extraction method based on three-dimensional laser point cloud
CN111524103A
Three-dimensional geographic point cloud adaptive slice thinning method and system
CN116129071A
Three-dimensional point cloud simplification method based on boundary point dimension reduction extraction
CN117953232A
Method, system and device for extracting point cloud skeleton of root system
CN118628754A
Three-dimensional circle detection method for free-form surface
CN119006569A