A Geometric Body-Based Point Cloud Segmentation Method and Device
By constructing a spatial rectangular coordinate system and calculating the rigid body transformation relationship, point clouds and geometric bodies are transformed into the world coordinate system, the problem of inaccurate point cloud segmentation in the existing technology is solved, and efficient and accurate point cloud segmentation and detection are achieved.
Patent Information
- Application Number
- CN202210246955.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-14
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-03-14
AI Technical Summary
The prior art cannot accurately segment the point cloud into a specific geometric point cloud or a local coordinate area point cloud within any specified range, resulting in low segmentation accuracy, long detection time, and low measurement accuracy.
By obtaining the segmentation parameters of the original point cloud and geometry, a spatial rectangular coordinate system is constructed, a rigid body transformation relationship is calculated, a point cloud and geometry are transformed to the world coordinate system, a determination is made as to whether the transform point is on the geometry or the surface of the geometry, and the corresponding point cloud is marked.
It realizes fast and accurate segmentation of point clouds, improves the efficiency and accuracy of point cloud detection, and is suitable for point cloud segmentation of regular and irregular geometric bodies and two-dimensional geometric shapes.
Smart Images

Figure CN114596324B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of computer vision image processing, and in particular, to a method and device for point cloud segmentation based on geometric bodies. Background Art
[0002] Point clouds are used to reflect the three-dimensional geometric shape of the visible surface of an object, and the coordinate values of each data point in the point cloud are used to represent the position of the corresponding data point in space. In order to quickly extract the local features of the point cloud, calculate the geometric deviation of the local position of the point cloud, and improve the subsequent point cloud detection efficiency, it is necessary to perform segmentation processing on the point cloud to obtain the point cloud of the local coordinate region.
[0003] In the prior art, the point cloud segmentation algorithm based on random sample consensus can only segment the approximate regional point cloud. However, due to the disorder of the point cloud, there is no topological relationship that can be referred to during point cloud segmentation, and the relative position relationship between data points is not clear. The existing point cloud segmentation methods cannot segment the point cloud into specific geometric body point clouds or local coordinate region point clouds within any specified range, the accuracy of point cloud segmentation is relatively low, the overall time consumption of point cloud detection is relatively long, and the measurement accuracy is relatively low. Summary of the Invention
[0004] This application provides a method and device for point cloud segmentation based on geometric bodies to solve the problems in the prior art that the existing point cloud segmentation methods cannot segment the point cloud into specific geometric body point clouds or local coordinate region point clouds within any specified range, the accuracy of point cloud segmentation is relatively low, the overall time consumption of point cloud detection is relatively long, and the measurement accuracy is relatively low.
[0005] In a first aspect, this application provides a method for point cloud segmentation based on geometric bodies, including:
[0006] Obtain the original point cloud on the surface of the object to be measured and the segmentation parameters corresponding to the geometric body;
[0007] Construct a spatial rectangular coordinate system of the original point cloud and the geometric body according to the segmentation parameters;
[0008] Calculate the rigid body transformation relationship according to the relative position of the spatial rectangular coordinate system and the world coordinate system;
[0009] Transform the original point cloud and the geometric body in the spatial rectangular coordinate system to the world coordinate system according to the rigid body transformation relationship to obtain the transformed point cloud and the geometric body, and the transformed point cloud includes at least one transformed point;
[0010] Judge whether at least one of the transformed points is within the geometric body or on the surface of the geometric body to segment the point cloud according to the positions of the transformed point cloud and the geometric body in the world coordinate system;
[0011] If the transformation point is within the point cloud segmented by the geometric body or on the surface of the geometric body, mark the transformation point;
[0012] Combine all the marked transformation points and output them as the segmented result point cloud.
[0013] In a preferred embodiment of the present application, to determine whether at least one of the transformation points is within the point cloud segmented by the geometric body or on the surface of the geometric body according to the positions of the transformation point cloud and the geometric body in the world coordinate system, it includes:
[0014] Obtain the transformation coordinates corresponding to each transformation point in the world coordinate system, where the world coordinate system includes three coordinate axes, namely the X-axis, Y-axis, and Z-axis, and the origin;
[0015] Calculate the distance from the transformation point to the coordinate axes;
[0016] Calculate the distance from the transformation point to the origin;
[0017] According to the transformation coordinates, the distance from the transformation point to the coordinate axes, and the distance from the transformation point to the origin, determine whether the transformation point is located within the point cloud segmented by the geometric body or on the surface of the geometric body.
[0018] In a preferred embodiment of the present application, the segmentation parameters include the shape parameters of the geometric body and the range of the point cloud segmented on the surface of the geometric body. The geometric body includes regular geometric bodies, irregular geometric bodies, and two-dimensional geometric shapes, and the segmentation parameters corresponding to different geometric bodies are different.
[0019] In a preferred embodiment of the present application, the point cloud segmentation of an irregular geometric body includes:
[0020] Construct a spatial rectangular coordinate system;
[0021] Calculate the rigid body transformation relationship;
[0022] According to the rigid body transformation relationship, transform the original point cloud and the irregular geometric body in the spatial rectangular coordinate system to the world coordinate system to obtain the transformation point cloud and the irregular geometric body;
[0023] According to the relative coordinates and angular relationships of the transformation point cloud in the world coordinate system, perform point cloud segmentation on the irregular geometric body.
[0024] In a preferred embodiment of the present application, the point cloud segmentation of a two-dimensional geometric shape includes:
[0025] Construct a spatial rectangular coordinate system;
[0026] Calculate the rigid body transformation relationship;
[0027] According to the rigid body transformation relationship, the original point cloud and the two-dimensional geometric shape in the space rectangular coordinate system are transformed into the world coordinate system to obtain the transformed point cloud and the two-dimensional geometric shape;
[0028] According to the positions of the transformed point cloud in the world coordinate system, point cloud segmentation is performed on the two-dimensional geometric shape.
[0029] In a preferred embodiment of the present application, the origin of the space rectangular coordinate system is the center of the geometric body, and at least one coordinate axis is perpendicular to the surface of the geometric body.
[0030] In a second aspect, the present application provides a point cloud segmentation device based on a geometric body. The point cloud segmentation device includes an acquisition unit, a transformation unit, and an output unit that are connected to each other;
[0031] Among them, the acquisition unit is configured to:
[0032] Acquire the original point cloud on the surface of the object to be measured and the segmentation parameters corresponding to the geometric body;
[0033] The transformation unit is configured to:
[0034] According to the segmentation parameters, construct the space rectangular coordinate system of the original point cloud and the geometric body;
[0035] According to the relative positions of the space rectangular coordinate system and the world coordinate system, calculate the rigid body transformation relationship;
[0036] According to the rigid body transformation relationship, the original point cloud and the geometric body in the space rectangular coordinate system are transformed into the world coordinate system to obtain the transformed point cloud and the geometric body, and the transformed point cloud includes at least one transformed point;
[0037] The output unit is configured to:
[0038] According to the positions of the transformed point cloud and the geometric body in the world coordinate system, determine whether at least one of the transformed points is within the geometric body or the point cloud segmented by the surface of the geometric body;
[0039] If the transformed point is within the geometric body or the point cloud segmented by the surface of the geometric body, mark the transformed point;
[0040] Combine all the marked transformed points and output them as the segmented result point cloud.
[0041] In a preferred embodiment of the present application, the output unit is further configured to:
[0042] Acquire the transformed coordinates corresponding to each transformed point in the world coordinate system. The world coordinate system includes three coordinate axes, namely the X-axis, the Y-axis, and the Z-axis, and the origin;
[0043] Calculate the distance from the transformed point to the coordinate axis;
[0044] Calculate the distance from the transformed point to the origin;
[0045] Determine whether the transformed point is within the point cloud segmented by the geometric body or on the surface of the geometric body according to the transformed coordinates, the distances from the transformed point to the coordinate axes, and the distance from the transformed point to the origin.
[0046] In a third aspect, the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of a point cloud segmentation method based on a geometric body are implemented.
[0047] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps of a point cloud segmentation method based on a geometric body are implemented.
[0048] A point cloud segmentation method and device based on a geometric body provided by the present application have the following beneficial effects compared with the prior art:
[0049] (1) By calculating the accurate transformation relationship between the original point cloud and the geometric body from the space rectangular coordinate system to the world coordinate system, the present application transforms the original point cloud and the geometric body into the world coordinate system for position judgment, avoiding the construction of a cumbersome spatial point cloud topological relationship or relative position relationship. The algorithm calculation process is simpler, and it can accurately judge the relative position between the spatial point cloud and the geometric body without a topological relationship or an unclear relative position relationship.
[0050] (2) When judging the position of the original point cloud and the geometric body, the present application will simultaneously judge according to the coordinate position of the transformed point cloud after the original point cloud is transformed into the world coordinate system in the world coordinate system, the distance from each transformed point to the coordinate axes, and the distance from the transformed point to the origin. It can simultaneously complete the point cloud segmentation based on multiple different geometric bodies or multiple identical geometric bodies, and the efficiency and accuracy of the point cloud segmentation are higher.
[0051] (3) The point cloud segmentation method of the present application is not only applicable to regular geometric bodies, but also applicable to irregular geometric bodies, and can also be applied to the point cloud segmentation of two-dimensional geometric shapes. The point cloud segmentation process is relatively simple, the point cloud detection time is short, the point cloud segmentation is more accurate, and the applicable scenarios are wider. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings required in the embodiments. Obviously, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.
[0053] Figure 1 It is a flowchart of a point cloud segmentation method based on geometric bodies in Embodiment 1 of the present application;
[0054] Figure 2 It is a schematic diagram of the original point cloud and a cuboid input in the application example of the present application;
[0055] Figure 3 It is a schematic diagram of a spatial rectangular coordinate system for constructing the original point cloud and the cuboid in the application example of the present application;
[0056] Figure 4 It is a schematic diagram of the positions of the transformed point cloud and the cuboid in the world coordinate system in the application example of the present application;
[0057] Figure 5 It is a schematic diagram of marking the transformed points located inside the cuboid in the application example of the present application;
[0058] Figure 6 It is a schematic diagram of the segmented result point cloud in the application example of the present application. Detailed implementation manners
[0059] To make the objectives, implementation manners, and advantages of the present application clearer, the following will clearly and completely describe the exemplary implementation manners of the present application with reference to the accompanying drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only a part of the embodiments of the present application, rather than all of the embodiments.
[0060] Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the present application claimed, but merely represents the selected embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts fall within the scope of protection of the present application.
[0061] Based on the exemplary embodiments described in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the appended claims of the present application. In addition, although the disclosed content in the present application is introduced according to one or several exemplary instances, it should be understood that each aspect of these disclosed contents can also be separately constituted as a complete implementation manner.
[0062] It should be noted that the brief description of the terms in the present application is only for the convenience of understanding the following described implementation manners, rather than intending to limit the implementation manners of the present application. Unless otherwise specified, these terms should be understood according to their ordinary and common meanings.
[0063] To facilitate the technical solutions of the application, some concepts involved in the present application are first described below.
[0064] In this application, terms such as "first", "second", "third", and "fourth" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Additionally, the terms "comprising", "also comprising", "configured to", "also configured to", or any other variants are intended to cover non-exclusive inclusion, such that it includes not only the explicitly listed elements but also other elements not explicitly listed. Therefore, the solution of this application will not be unclear.
[0065] The world coordinate system is the absolute coordinate system of the system. Before the user coordinate system is established, the coordinates of all points on the screen are determined by the origin of this coordinate system for their respective positions.
[0066] A rigid body transformation, also known as an Euclidean transformation or a homogeneous transformation, refers to rotating and translating an object in three-dimensional space, which is an affine transformation that preserves the size and shape of the object.
[0067] Embodiment 1
[0068] As Figure 1 shown, Embodiment 1 of the present invention provides a point cloud segmentation method based on a geometric body, and the method includes the following steps:
[0069] S101, obtaining an original point cloud and a geometric body on the surface of an object to be measured, where the original point cloud includes at least one data point;
[0070] S102, setting segmentation parameters corresponding to the geometric body, where the segmentation parameters include the shape parameters of the geometric body and the range of the point cloud segmented on the surface of the geometric body;
[0071] S103, constructing a spatial rectangular coordinate system of the original point cloud and the geometric body according to the set shape parameters, where the spatial rectangular coordinate system takes the center of the geometric body as the origin, and at least one coordinate axis is perpendicular to the surface of the geometric body;
[0072] S104, calculating a rigid body transformation relationship according to the relative position of the spatial rectangular coordinate system and the world coordinate system;
[0073] S105, transforming the original point cloud and the geometric body in the spatial rectangular coordinate system to the world coordinate system according to the rigid body transformation relationship, obtaining a transformed point cloud and a geometric body, where the transformed point cloud includes at least one transformed point, and the transformed point corresponds to the data point;
[0074] S106, judging whether at least one of the transformed points in the transformed point cloud is inside the geometric body or the point cloud segmented on the surface of the geometric body according to the positions of the transformed point cloud and the geometric body in the world coordinate system;
[0075] S107, if the transformation point is within the point cloud segmented by the geometric body or on the surface of the geometric body, mark the transformation point;
[0076] S108, combine all the marked transformation points and output them as the segmented result point cloud.
[0077] It should be noted specifically that the segmentation parameters in step S102 also include parameters such as the spatial position, direction, and size of the geometric body, and the geometric body can be set in any direction in space. The shape parameters are mainly used to determine the geometric body in any direction and position in space. The point cloud segmented on the surface of the geometric body is the range required to set for segmenting the point cloud within a certain area on the surface of the geometric body. Those skilled in the art can set the corresponding parameter values and ranges according to the actual situation, and this application does not make specific restrictions on them. In addition, the world coordinate system in step S105 refers to a coordinate system with the X-axis being (a, 0, 0), the Y-axis being (0, b, 0), and the Z-axis being (0, 0, c), where a, b, and c are all non-zero real numbers.
[0078] Specifically, in this embodiment 1, the geometric body can be regular geometric bodies such as cuboids, spheres, cylinders, and irregular geometric bodies, etc. If a cuboid is used for point cloud segmentation, the shape parameters that need to be set include parameters such as the starting position, length, width, height direction, and size of the cuboid; if a sphere is used for point cloud segmentation, the shape parameters that need to be set include the center position and radius of the sphere; if a cylinder is used for point cloud segmentation, the shape parameters that need to be set include the axis direction, position, cylinder radius, height, etc. of the cylinder; the above only lists some of the parameters required for point cloud segmentation using common geometric body shapes. Those skilled in the art can select a suitable geometric body according to the actual application scenario and set the corresponding segmentation parameters, and this application does not make specific restrictions on them.
[0079] Further, in a specific implementation manner of this embodiment 1, step S106, according to the positions of the transformation point cloud and the geometric body in the world coordinate system, determining whether at least one of the transformation points in the transformation point cloud is within the geometric body or the point cloud segmented on the surface of the geometric body, includes:
[0080] According to the positions of the transformation point cloud and the geometric body in the world coordinate system, obtain the transformation coordinates corresponding to each transformation point in the world coordinate system, where the world coordinate system includes three coordinate axes, namely the X-axis, Y-axis, and Z-axis, and the origin;
[0081] Calculate the distance from the transformation point to the coordinate axes;
[0082] Calculate the distance from the transformation point to the origin;
[0083] According to the spatial relative relationship between the transformed point cloud and the geometric body in the world coordinate system, where the spatial relative relationship includes the distances from the transformed coordinates and the transformed points to the coordinate axes and the distance from the transformed points to the origin, determine whether the transformed points are located within the geometric body or the point cloud segmented by the surface of the geometric body;
[0084] Repeat the above steps to complete the determination of all transformed points in the transformed point cloud.
[0085] Furthermore, in a specific implementation manner of Embodiment 1, the geometric body includes regular or irregular complex geometric bodies such as prisms, toroids, cones, frustums, etc. The process of point cloud segmentation of regular or irregular complex geometric bodies using the method of Embodiment 1 is as follows:
[0086] Construct a spatial rectangular coordinate system;
[0087] Calculate the rigid body transformation relationship;
[0088] According to the rigid body transformation relationship, transform the original point cloud and the irregular geometric body in the spatial rectangular coordinate system to the world coordinate system to obtain the transformed point cloud and the irregular geometric body;
[0089] According to the relative coordinate and angular relationship of the transformed point cloud in the world coordinate system, perform point cloud segmentation on the regular or irregular complex geometric body.
[0090] In Embodiment 1, the above method for segmenting the point cloud within a regular or irregular complex geometric body in space can obtain the point cloud of any local area, facilitating the subsequent detection of the point cloud effectively and quickly.
[0091] Furthermore, in a specific implementation manner of Embodiment 1, the geometric body also includes two-dimensional geometric shapes such as circles, ellipses, rings, polygons, etc. The process of point cloud segmentation of two-dimensional geometric shapes using the method of Embodiment 1 is as follows:
[0092] Construct a spatial rectangular coordinate system;
[0093] Calculate the rigid body transformation relationship;
[0094] According to the rigid body transformation relationship, transform the original point cloud and the two-dimensional geometric shape in the spatial rectangular coordinate system to the world coordinate system to obtain the transformed point cloud and the two-dimensional geometric shape;
[0095] According to the position of the transformed point cloud in the world coordinate system, perform point cloud segmentation on the two-dimensional geometric shape.
[0096] Specifically, the method for segmenting the point cloud within a two-dimensional geometric shape in this Embodiment 1 can be applied to the segmentation of two-dimensional point clouds or three-dimensional point clouds considering only two dimensions, thereby completing the extraction of local point cloud data. Taking the two-dimensional geometric shape of an input two-dimensional rectangle with rotation as an example, first, a rectangular coordinate system is constructed according to the shape position and angle of the two-dimensional rectangle; secondly, the transformation relationship from the rectangular coordinate system to the world coordinate system is calculated; then, according to the transformation relationship, the data points and the position of the two-dimensional rectangle in the rectangular coordinate system are transformed into the world coordinate system; finally, according to the spatial relative relationship between the transformed points and the two-dimensional rectangle in the world coordinate system, it is determined whether the transformed points are inside the two-dimensional rectangle, and the transformed points inside the two-dimensional rectangle are combined and output as the segmentation result data; wherein, the spatial relative position relationship includes but is not limited to the coordinate position of the transformed points, the distances from the transformed points to the coordinate axes (including the X-axis and the Y-axis), and the distances from the transformed points to the origin.
[0097] Embodiment 2
[0098] Corresponding to Embodiment 1 of the above-mentioned method for segmenting point clouds based on geometric bodies, the present application also provides Embodiment 2 of a device for segmenting point clouds based on geometric bodies. The point cloud segmentation device includes an acquisition unit, a transformation unit, and an output unit that are connected to each other;
[0099] Wherein, the acquisition unit is configured to:
[0100] Acquire the original point cloud and the geometric body on the surface of the object to be measured, where the original point cloud includes at least one data point;
[0101] Set the segmentation parameters corresponding to the geometric body, where the segmentation parameters include the shape parameters of the geometric body and the range for segmenting the point cloud on the surface of the geometric body;
[0102] The transformation unit is configured to:
[0103] Construct a spatial rectangular coordinate system for the original point cloud and the geometric body according to the set shape parameters, where the spatial rectangular coordinate system takes the center of the geometric body as the origin, and at least one coordinate axis is perpendicular to the surface of the geometric body;
[0104] Calculate the rigid body transformation relationship according to the relative position between the spatial rectangular coordinate system and the world coordinate system;
[0105] According to the rigid body transformation relationship, transform the original point cloud and the geometric body in the spatial rectangular coordinate system into the world coordinate system to obtain the transformed point cloud and the geometric body, where the transformed point cloud includes at least one transformed point, and the transformed point corresponds to the data point;
[0106] The output unit is configured to:
[0107] According to the positions of the transformed point cloud and the geometric body in the world coordinate system, determine whether at least one of the transformed points in the transformed point cloud is within the geometric body or the point cloud segmented by the surface of the geometric body;
[0108] If the transformed point is within the geometric body or the point cloud segmented by the surface of the geometric body, mark the transformed point;
[0109] Combine all the marked transformed points and output them as the segmented result point cloud.
[0110] Further, in a specific implementation manner of Embodiment 2 of the present application, the output unit is further configured to:
[0111] Obtain the transformed coordinates corresponding to each transformed point in the world coordinate system, where the world coordinate system includes three coordinate axes, namely the X-axis, Y-axis, and Z-axis, and the origin;
[0112] Calculate the distance from the transformed point to the coordinate axes;
[0113] Calculate the distance from the transformed point to the origin;
[0114] According to the transformed coordinates, the distance from the transformed point to the coordinate axes, and the distance from the transformed point to the origin, determine whether the transformed point is located within the geometric body or the point cloud segmented by the surface of the geometric body.
[0115] Embodiment 3
[0116] The present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of a point cloud segmentation method based on a geometric body in Embodiment 1 are implemented.
[0117] Embodiment 4
[0118] The present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of a point cloud segmentation method based on a geometric body in Embodiment 1 are implemented.
[0119] Application Example
[0120] First, input the original point cloud and the cuboid as shown in Figure 2 ; secondly, after setting the segmentation parameters of the cuboid according to the methods and devices of Embodiment 1 and Embodiment 2 of the present application, construct a spatial rectangular coordinate system as shown in Figure 3 , that is, obtain the positions of the original point cloud and the cuboid in the spatial rectangular coordinate system, as shown in Figure 2 and Figure 3 , and the original point cloud includes several data points; then, calculate the exact rigid body transformation relationship from the spatial rectangular coordinate system to the world coordinate system, andFigure 3 The position transformation of the original point cloud and the cuboid shown in the spatial rectangular coordinate system is transformed to the position of the original point cloud and the cuboid in the world coordinate system as shown in Figure 4 to obtain the transformed point cloud and the cuboid, as shown in Figure 4 . The transformed point cloud includes a number of transformed points, and the transformed points correspond to the data points in the original point cloud; further, it is determined whether the transformed points of the transformed point cloud are located within the cuboid, and all the transformed points located within the cuboid are marked, and the result is as shown in Figure 5 ; finally, all the data points corresponding to the marked transformed points are output to obtain the segmented result point cloud as shown in Figure 6 . Figure 3 The arrow in Figure 4 represents the spatial rectangular coordinate system, and the arrow in
[0121] represents the world coordinate system.
[0122] In summary, it can be seen that the point cloud segmentation method and device of the present application have a relatively small amount of calculation for the point cloud algorithm within the geometric body or within the range of the segmented point cloud on the surface of the geometric body, and based on the accurate rigid body transformation relationship, can complete the rapid and accurate segmentation of the original point cloud.
[0123] For the similar parts between the embodiments provided in the present application, reference can be made to each other. The specific embodiments provided above are only several examples under the general concept of the present application and do not constitute a limitation on the protection scope of the present application. For those skilled in the art, any other implementation manner extended based on the solution of the present application without creative work belongs to the protection scope of the present application.
Claims
1. A point cloud segmentation method based on geometric bodies, characterized in that Including: Obtain the original point cloud on the surface of the object to be measured and the segmentation parameters corresponding to the geometric body; According to the segmentation parameters, construct a spatial rectangular coordinate system for the original point cloud and the geometric body; the spatial rectangular coordinate system takes the center of the geometric body as the origin, and at least one coordinate axis is perpendicular to the surface of the geometric body; Calculate the rigid body transformation relationship according to the relative position between the spatial rectangular coordinate system and the world coordinate system; According to the rigid body transformation relationship, transform the original point cloud and the geometric body in the spatial rectangular coordinate system to the world coordinate system to obtain the transformed point cloud and the geometric body, and the transformed point cloud includes at least one transformed point; According to the positions of the transformed point cloud and the geometric body in the world coordinate system, determine whether at least one of the transformed points is within the geometric body or the segmented point cloud on the surface of the geometric body; If the transformed point is within the geometric body or the segmented point cloud on the surface of the geometric body, mark the transformed point; Combine all the marked transformed points and output them as the segmented result point cloud.
2. The point cloud segmentation method based on geometric bodies according to claim 1, characterized in that According to the positions of the transformed point cloud and the geometric body in the world coordinate system, determining whether at least one of the transformed points is within the geometric body or the segmented point cloud on the surface of the geometric body includes: Obtain the transformed coordinates corresponding to each transformed point in the world coordinate system, and the world coordinate system includes three coordinate axes, namely the X-axis, the Y-axis, and the Z-axis, and the origin; Calculate the distance from the transformed point to the coordinate axis; Calculate the distance from the transformed point to the origin; According to the transformed coordinates, the distance from the transformed point to the coordinate axis, and the distance from the transformed point to the origin, determine whether the transformed point is located within the geometric body or the segmented point cloud on the surface of the geometric body.
3. A point cloud segmentation method based on geometric bodies according to claim 1, characterized in that, The segmentation parameters include the shape parameters of the geometric body and the range of the segmented point cloud on the surface of the geometric body. The geometric body includes regular geometric bodies, irregular geometric bodies, and two-dimensional geometric shapes, and the segmentation parameters corresponding to different geometric bodies are different.
4. A method for point cloud segmentation based on geometric bodies according to claim 3, characterized in that Performing point cloud segmentation on an irregular geometric body includes: Construct a spatial rectangular coordinate system; Calculate the rigid body transformation relationship; According to the rigid body transformation relationship, transform the original point cloud and the irregular geometric body in the spatial rectangular coordinate system to the world coordinate system to obtain the transformed point cloud and the irregular geometric body; Perform point cloud segmentation on the irregular geometric body according to the relative coordinates and angular relationship of the transformed point cloud in the world coordinate system.
5. The method for point cloud segmentation based on geometric bodies according to claim 3, characterized in that Performing point cloud segmentation on a two-dimensional geometric shape includes: Construct a spatial rectangular coordinate system; Calculate the rigid body transformation relationship; According to the rigid body transformation relationship, transform the original point cloud and the two-dimensional geometric shape in the spatial rectangular coordinate system to the world coordinate system to obtain the transformed point cloud and the two-dimensional geometric shape; Perform point cloud segmentation on the two-dimensional geometric shape according to the position of the transformed point cloud in the world coordinate system.
6. A point cloud segmentation device based on geometric bodies, adopting a point cloud segmentation method based on geometric bodies as described in any one of claims 1-5, characterized in that, The point cloud segmentation device includes an acquisition unit, a transformation unit, and an output unit that are connected to each other; Among them, the acquisition unit is configured to: Obtain the original point cloud on the surface of the object to be measured and the segmentation parameters corresponding to the geometric body; The transformation unit is configured to: According to the segmentation parameters, construct a spatial rectangular coordinate system for the original point cloud and the geometric body; the spatial rectangular coordinate system takes the center of the geometric body as the origin, and at least one coordinate axis is perpendicular to the surface of the geometric body; Calculate the rigid body transformation relationship according to the relative position between the spatial rectangular coordinate system and the world coordinate system; According to the rigid body transformation relationship, transform the original point cloud and geometric body in the spatial rectangular coordinate system into the world coordinate system to obtain the transformed point cloud and geometric body, and the transformed point cloud includes at least one transformed point; The output unit is configured to: Judge whether at least one of the transformed points is within the geometric body or the point cloud segmented by the surface of the geometric body according to the positions of the transformed point cloud and the geometric body in the world coordinate system; If the transformed point is within the geometric body or the point cloud segmented by the surface of the geometric body, mark the transformed point; Combine all the marked transformed points and output them as the segmented result point cloud.
7. The point cloud segmentation device based on a geometric body according to claim 6, wherein The output unit is further configured to: Obtain the transformed coordinates corresponding to each transformed point in the world coordinate system, and the world coordinate system includes three coordinate axes, namely the X-axis, the Y-axis, and the Z-axis, and the origin; Calculate the distance from the transformed point to the coordinate axis; Calculate the distance from the transformed point to the origin; Judge whether the transformed point is located within the geometric body or the point cloud segmented by the surface of the geometric body according to the transformed coordinates, the distance from the transformed point to the coordinate axis, and the distance from the transformed point to the origin.
8. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, the steps of the point cloud segmentation method based on a geometric body according to any one of claims 1-5 are implemented.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, the steps of the point cloud segmentation method based on a geometric body according to any one of claims 1-5 are implemented.
Citation Information
Patent Citations
High-precision map construction method and device for mining area
CN113008247A
Method, device, and storage medium for segmenting three-dimensional object
US20210042999A1