A method and processing terminal for extracting welding balls from a space grid based on point cloud
The core coordinates of welding balls are extracted from the point cloud of large spatial mesh by sliced and fitting circles, and the problems of low efficiency and poor accuracy of welding ball extraction in the prior art are solved, and efficient and accurate welding ball recognition is achieved and structural evaluation.
Patent Information
- Application Number
- CN202211341907.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-27
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2042-10-27
AI Technical Summary
The prior art is difficult to effectively extract welding balls from point cloud data of large space mesh frames, resulting in low construction accuracy and deformation evaluation efficiency and prone to errors, and the three-dimensional laser scanning distance is limited, making it impossible to accurately identify the spherical components.
Using a point cloud-based slice method, the radius and coordinates of the welding ball of the center of the welding ball are extracted by fitting the circle and the sphere center coordinate point cloud collection, and the slicing plane projection and fitting circles are used to classify and search the point cloud data of the welding ball. .
The efficiency and accuracy of searching spheres in complex point clouds have been significantly improved, and traditional point cloud processing methods have been abandoned, and efficient and accurate welding ball extraction and structural evaluation have been achieved.
Smart Images

Figure CN115564761B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of extracting components from point clouds, and in particular to a method and a processing terminal for extracting welding balls from a space grid based on point clouds. Background Art
[0002] Space grid structures are used in many places, especially in large-span places such as airports, docks, and stations, where large space grid structures are used, such as the ceiling of the terminal. Because of the public safety involved, the safety requirements for space grid structures are extremely high. Therefore, it is extremely important to accurately evaluate the safety status of the grid structure during construction and after delivery and operation.
[0003] In the prior art, when 3D laser scanning is used on traditional objects (such as building facades, simple geometric bodies, mountain surfaces, and bridge facades), point cloud data of the object surface can be obtained. Since 3D laser scanning has extremely high accuracy, there is no point cloud beyond 1 cm vertical to the object surface, so it is easy to identify point cloud objects using point cloud segmentation or clustering methods.
[0004] Therefore, the target space grid structure can be scanned by 3D laser scanning to obtain point cloud data, find key points from the point cloud data, and compare the coordinates of the key points in the point cloud with the actual coordinates, so as to evaluate the construction accuracy and deformation of the large and small grid structures during service. This method is also one of the most cutting-edge means at present.
[0005] The inventors found in actual research that large-scale grid structures are structures with spatial hierarchy, in which the upper chord and the lower chord are connected by welding balls and webs, and there are thousands of welding balls in a large-scale grid structure project. In the actual process, the construction accuracy and deformation of the grid structure can be accurately judged by comparing the coordinates of the welding balls. However, due to the lack of a method for extracting key components from the grid structure point cloud, key points can only be manually selected from the point cloud, which is very inefficient and prone to errors.
[0006] Using 3D laser scanning to scan large grid structures, the ground, columns, lower chords and welded balls, webs, upper chords and welded balls, and roofs are scanned from bottom to top. In addition, due to the limited distance of 3D laser scanning, the point cloud of a large grid project will be obtained by merging the point clouds scanned by multiple base stations; since 3D laser scanners are generally set up on the ground, the side of the spatial component facing away from the scanner cannot be scanned. In summary, the point cloud of a large grid structure has the following characteristics: First, the same component has point cloud data scanned by multiple base stations, and due to the existence of scanning errors, the point cloud data obtained by scanning the same component by different base stations are not completely consistent; second, only parts of cylindrical and spherical objects can be scanned.
[0007] Therefore, due to the abnormal complexity of the three-dimensional point cloud data of the spatial grid structure, the current methods based on point cloud segmentation and clustering for identifying spheres or cylinders are ineffective, and the spheres cannot be extracted, and it is also impossible to judge whether the welding balls are constructed accurately, deformed, etc. based on the extracted spheres. Summary of the invention
[0008] In view of the shortcomings of the prior art, one of the purposes of the present invention is to provide a method for extracting welding balls from a space grid based on point clouds, which can solve the problems described in the background technology;
[0009] A second objective of the present invention is to provide a processing terminal that can solve the problems described in the background technology.
[0010] A technical solution to achieve one of the purposes of the present invention is: a method for extracting welding balls from a space grid based on point clouds, comprising the following steps:
[0011] Step 1: Obtain the 3D point cloud of the target space grid, slice the 3D point cloud according to the preset slicing direction to obtain N parallel slicing planes, N ≥ 2, and project the point cloud whose distance to the nearest slicing plane in the 3D point cloud is less than the preset threshold s1 onto the slicing plane, thereby obtaining a point cloud set for each slicing plane;
[0012] Step 2: Find the respective fitting circles in the point cloud set of each slice plane. The fitting circles are used to indicate that the point clouds inside the circle may be welded balls, and the point clouds outside the circle are non-welded balls. The center point clouds inside the fitting circles constitute the point cloud center coordinate set.
[0013] Step 3: Classify the centers of the circle in the point cloud circle center coordinate set to obtain a local circle center point cloud set representing the welding ball;
[0014] Step 4: Fit a sphere according to the point cloud in the local center point cloud set. The center radius and coordinates of the fitted sphere are the center radius and coordinates of the welded sphere, thereby obtaining the center radius and coordinates of the welded sphere.
[0015] Furthermore, in step 1, the number of point clouds in the point cloud set of each slice plane is the same or different.
[0016] Furthermore, the preset threshold s1 is determined according to the distance between adjacent slice planes, and the distance between adjacent slice planes is less than a times the minimum size of the component to be identified in the target space grid, 0<a<1.
[0017] Furthermore, the specific implementation of step 2 includes the following steps:
[0018] Step 2-1: Point cloud set P on the current slice plane nRandomly select m1 point clouds from P n Represents the point cloud set of the nth slice plane, fits a circle with these m1 point clouds to obtain the fitted circle, 3≤m1≤m / 2, and traverses the point cloud sets of other slice planes in turn to obtain the fitted circle corresponding to each slice plane;
[0019] Step 2-2: Collect the point cloud P n The point clouds whose distance from the fitting circle is less than the preset threshold s2 are put into the set P n ′, set P n ′ is initially an empty set, where the distance between the point cloud and the fitting circle refers to the shortest distance from the point cloud to the circumference of the fitting circle.
[0020] The preset threshold s2 is determined according to the scanning accuracy of the laser scanner used to scan the three-dimensional point cloud forming the target space grid. The preset threshold s2 indicates that the point cloud within the circumference of the fitting circle less than s2 may be the point cloud constituting the welding ball.
[0021] Step 2-3: If the current fitting circle meets condition 1, save the radius, center coordinates and point cloud set P of the current fitting circle n ′, if the current fitting circle does not meet condition 1, repeat steps 2-1 and 2-2 until the maximum search times T1 is reached.
[0022] Condition 1: The fitting accuracy of the fitting circle is greater than k2 and the radius of the fitting circle is less than k3 and the point cloud set P n The number of point clouds in '>k1, k1, k2 and k3 are all preset thresholds,
[0023] The sizes of k1, k2 and k3 are determined based on the comprehensive features of the point cloud data in the point cloud set;
[0024] Step 2-4: From the point cloud set P n Delete the point cloud set P n ′, get the remaining point cloud set P n -P n ′, and in the remaining point cloud set P n -P n Repeat steps 2-1 to 2-3 in ′ until all fitting circles that meet condition 1 are found.
[0025] The point cloud set of each slice plane is processed in turn according to the above steps, and a fitting circle that meets condition 1 on each slice plane can be obtained;
[0026] Step 2-5: Store the center coordinates of the fitted circles that meet condition 1 on all slice planes into the point cloud center coordinate set {C}.
[0027] Furthermore, in step 2-3, k1 is 1 / 4 of the maximum number of point clouds on the circumference of the corresponding slice plane, k2 represents the goodness of fit, and its value is greater than 0.9 and less than 1, and k3 is 1-10 times the maximum diameter of the actual sphere in the point cloud.
[0028] Furthermore, the specific implementation of step 3 includes the following steps:
[0029] Step 3-1: randomly select a point c in the point cloud circle center coordinate set {C}, and form a new point cloud set {C′} with the point clouds in the point cloud circle center coordinate set {C} whose distance to point c is less than a preset threshold s3;
[0030] Step 3-2: If the number of point clouds in the point cloud set {C′} is less than the preset threshold k4, then point c in the point cloud circle center coordinate set {C} is deleted;
[0031] Step 3-3: Repeat steps 3-1 and 3-2 until each point cloud in the point cloud circle center coordinate set {C} is classified, thereby obtaining several new point cloud sets {C′}, where the new point cloud set obtained by taking the i-th point cloud c as the current point cloud is recorded as {C i ′}, therefore, for a point cloud set P with m point clouds n Several new point cloud sets can be obtained {C 1 ′,C 2 ′,…,C i ′,…C Q ′}, 1≤Q≤m, these new point cloud sets {C 1 ′,C 2 ′,…,C i ′,…C Q ′} is recorded as the first point cloud set, and the first point cloud set serves as the local center point cloud set.
[0032] Furthermore, the preset threshold s3 may be the diameter of the largest sphere, and the value of k4 may be half the number of slices of a sphere by equally spaced slice planes in all point clouds.
[0033] Furthermore, the specific implementation of step 4 includes the following steps:
[0034] Step 4-1: In the point cloud of the spatial grid, search for the distance point cloud set {C 1 ′,C 2 ′,…,C i ′,…C Q The point cloud whose center coordinates in ′} are less than the preset threshold s4, thus forming a local point cloud set. The new point cloud set is recorded as {C i ′} The local point cloud set for is denoted as S i, that is, each new point cloud set corresponds to a local point cloud set;
[0035] Step 4-2: In the local point cloud set S i Randomly select m2 point clouds from the sphere, fit a fitting sphere based on the m2 point clouds, and then convert the local point cloud set S i The point clouds whose spherical distance from the fitting ball is less than the preset threshold s5 form the final point cloud set S i ′;
[0036] Step 4-3: Repeat step 4-2 for a maximum of T2 searches. Each time step 4-2 is executed, a corresponding final point cloud set is obtained. These T2 point cloud sets are recorded as qualified point cloud sets. From the qualified point cloud collection Find the point cloud set S with the largest number of point clouds j ′, and the point cloud set S j ′ is recorded as the valid point cloud set, the sphere is refitted from the valid point cloud set, and the center coordinates and radius of the fitted sphere are obtained;
[0037] Step 4-4: Delete the final point cloud set S from the three-dimensional point cloud of the target space grid i ', and then repeat steps 4-1 to 4-3 until all fitting balls are searched out, thereby extracting welding balls.
[0038] Furthermore, the preset threshold s4 is 1.05 times the radius of the largest welding ball, the minimum value of m2 is 4, and the maximum value does not exceed the local point cloud set S i The maximum number of searches T2 is greater than 100, which is half of the number of point clouds.
[0039] The technical solution for achieving the second object of the present invention is: a processing terminal, which includes:
[0040] A memory for storing program instructions;
[0041] A processor is used to run the program instructions to execute the steps in the method of extracting welding balls from a spatial grid based on point clouds.
[0042] The beneficial effects of the present invention are as follows: compared with the prior art, the present invention utilizes the geometric features of the welding ball, first searches for a fitting circle from the two-dimensional point cloud by a slicing method, and then determines the local point cloud of the sphere by the coordinate point of the center of the fitting circle, thereby efficiently determining the point cloud of the welding ball. Traditional point cloud processing methods such as point cloud normal vector calculation and point cloud clustering are abandoned, significantly improving the efficiency and accuracy of searching for spheres in complex point clouds. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1It is a schematic diagram of the process of the present invention;
[0044] Figure 2 It is a schematic diagram of the coordinate points of the circle center obtained by searching in the slice plane;
[0045] Figure 3 It is a schematic diagram of the center of the circle in the sphere after the center of the circle is classified;
[0046] Figure 4 The schematic diagram of the search result of finding two spheres in the three-dimensional point cloud of the target space grid;
[0047] Figure 5 The figure is a schematic diagram of the structure of a processing terminal of the present invention. DETAILED DESCRIPTION
[0048] The present invention is further described below in conjunction with the accompanying drawings and specific implementation schemes.
[0049] like Figure 1-Figure 4 As shown, a method for extracting welding balls from a space grid based on point cloud includes the following steps:
[0050] Step 1: Get the 3D point cloud of the target space grid, slice the 3D point cloud according to the preset slicing direction, and obtain N parallel slicing planes, N ≥ 2. Project the point cloud whose distance to the nearest slicing plane in the 3D point cloud is less than the preset threshold s1 onto the slicing plane, so as to obtain the point cloud set of each slicing plane. The point cloud set of the nth slicing plane is denoted as P n , therefore, the point cloud set of all slice planes is {P 1 ,P 2 ,…,P n ,…,P N}. Among them, the point cloud set P n There are m point clouds in the qth point cloud, and the qth point cloud can be recorded as P n,q , therefore, the point cloud set P n For {P n,1 ,P n,2 ,…,P n,q ,…,P n,m It should be noted that the number of point clouds in the point cloud set of each slice plane may be different or the same. For example, the point cloud set P n There are m point clouds in the point cloud set P n+1 There are w point clouds inside, w≠m.
[0051] The preset threshold s1 is determined according to the distance between adjacent slice planes. In this embodiment, the distance between slice planes is ≤ half of the distance between adjacent slice planes. The distance between adjacent slice planes is less than a times the minimum size of the component to be identified in the target space grid, where 0<a<1. In this embodiment, a=1 / 4. For example, among all the welding balls to be identified, the minimum diameter of the welding balls is 20cm, and the distance between adjacent slice planes is less than 5cm.
[0052] The three-dimensional point cloud of the target space grid can be obtained by scanning with a three-dimensional laser scanner. The xoy plane in the coordinate system of the scanned three-dimensional point cloud is generally taken as the plane of the geodetic coordinate system, and the z axis is vertically upward.
[0053] Step 2: Find the respective circles in the point cloud set of each slice plane. The circle is used to indicate that the point cloud inside the circle may be a welded ball, and the point cloud outside the circle is a non-welded ball. Its specific implementation includes the following steps:
[0054] Step 2-1: Point cloud set P on the current slice plane n Randomly select m1 point clouds from the point set P, and use the least squares method or other existing methods to fit a circle to the m1 point clouds to obtain a fitted circle. n The maximum value is no more than half of the number of point clouds, and at the same time, the minimum number of circles that can be fitted must be met, that is, 3≤m1≤m / 2.
[0055] The point cloud sets of other slice planes are traversed in sequence to obtain the fitting circle corresponding to each slice plane.
[0056] Step 2-2: Collect the point cloud P n The point clouds whose distance from the fitting circle is less than the preset threshold s2 are put into the set P n ′, set P n ′ is initially an empty set. The distance between the point cloud and the fitting circle refers to the shortest distance from the point cloud to the circumference of the fitting circle.
[0057] The preset threshold s2 is determined according to the scanning accuracy of the laser scanner used to scan the three-dimensional point cloud forming the target space grid. Usually, s2=2mm. The preset threshold s2 indicates that the point cloud within the circumference of the fitting circle less than s2 may be the point cloud constituting the welding ball.
[0058] Step 2-3: If the current fitting circle meets condition 1, save the radius, center coordinates and point cloud set P of the current fitting circle n If the current fitting circle does not meet condition 1, repeat steps 2-1 and 2-2 until the maximum search times T1 is reached.
[0059] Condition 1: The fitting accuracy of the fitting circle is greater than k2, and the radius of the fitting circle is less than k3, and the point cloud set P n The number of point clouds in ′>k1, k1, k2 and k3 are all preset thresholds.
[0060] That is to say, only the point cloud set P n ′ has a point cloud number > k1, and from the point cloud set P n The fitting accuracy and radius of the circle fitted in ′ meet the above requirements, and only then the radius, center coordinates and point cloud set P of such a fitted circle are saved. n ′.
[0061] The sizes of k1, k2, and k3 are determined based on the comprehensive features of the point cloud data in the point cloud set. For a 3D laser scanning point cloud, if the spacing between adjacent point clouds is 1 mm, the diameter of the welding ball is between 0.1 and 0.5 m. Taking the smallest welding ball as an example, the circle diameter obtained by cutting the smallest welding ball is in the range of 0-0.1 m. In addition, considering that the ground laser cannot scan the entire surface of the welding ball, the number of point clouds on the circumference of a welding ball corresponding to a slice plane is at most about 150. Therefore, the preset threshold m1 cannot exceed the maximum number of point clouds on the circumference of a slice plane. If the point cloud set P n If the number of point clouds in ′ is too small, it means that the fitted circle does not actually exist. Therefore, k1 is generally taken as 1 / 4 of the maximum number of point clouds on the circumference of a slice plane.
[0062] The maximum search times T1 is generally greater than 100, for example, it can be 2000. If there is still no fitting circle that meets condition 1 after the maximum search times, it means that there is actually no circle on the slice plane.
[0063] k2 represents the goodness of fit, and its value is greater than 0.9 and less than 1.
[0064] The value of k3 is related to the maximum diameter of the actual welded ball. When searching for a fitting circle on the slice plane, if the randomly selected point clouds used to form the fitting circle are close to a straight line, the fitted circle is a large diameter fitting circle. Although the goodness of fit k2 and the point cloud set P n ' meets the requirements of condition 1, but in fact such a circle does not exist, that is, there is actually no welding ball with such a large diameter. In order to avoid this situation, it is necessary to constrain the diameter of the fitting circle, that is, use k3 to constrain the diameter of the fitting circle to prevent the appearance of a fitting circle with a diameter that is too large. In this embodiment, the value of k3 is 1-10 times the maximum diameter of the actual sphere in the point cloud.
[0065] Step 2-4: From the point cloud set P n Delete the point cloud set P n′, get the remaining point cloud set P n -P n ′, and in the remaining point cloud set P n -P n Repeat steps 2-1 to 2-3 in ′ until all fitting circles that meet condition 1 are found.
[0066] Steps 2-1 to 2-4 are performed on the point cloud set P n In the loop, the fitting circles are searched out. When all the fitting circles satisfying condition 1 are searched and processed, and the fitting circles are selected from the point cloud set P n After deleting the point cloud belonging to the fitting circle, the remaining point cloud has no fitting circle that meets condition 1. At this time, continue to add the remaining point cloud set P n -P n ′, and when the maximum number of searches is reached, the loop can be exited and the search can be stopped. If the maximum number of searches is reached and no fitting circle that meets condition 1 is found, it is determined that there is no fitting circle that meets condition 1 in the current slice plane, that is, there is no circle representing the welded ball on the current slice plane.
[0067] The point cloud set of each slice plane is processed in turn according to the above steps, and a fitting circle that meets condition one on each slice plane can be obtained.
[0068] Step 2-5: Store the center coordinates of the fitted circles that meet condition 1 on all slice planes into the point cloud center coordinate set {C}.
[0069] refer to Figure 2 , Figure 2 This is a schematic diagram of the circle center coordinate points searched in the slice plane. In the figure, the circle represents the searched circle center coordinate points. The circle center coordinate points in the spherical point cloud are concentrated in a certain range. In addition, there are many isolated point clouds in the space.
[0070] Step 3: Since there are round rods with larger diameters in the space grid structure, when searching for fitting circles on the slice plane, the centers of the circles searched are from the centers of the circles obtained by slicing the round rods and welding the balls. Figure 2 In addition to the circles distributed on the welding ball, there are many scattered circles distributed in the rest of the welding ball. Therefore, in order to extract the coordinates of the circles distributed on different spheres, it is also necessary to classify the point cloud circle center coordinate set {C} to obtain the circle center that truly represents the welding ball. Therefore, the circle centers in the point cloud circle center coordinate set {C} are classified to obtain the local circle center point cloud set that represents the welding ball. Its specific implementation includes the following steps:
[0071] Step 3-1: randomly select a point c in the point cloud circle center coordinate set {C}, and form a new point cloud set {C′} with the point clouds in the point cloud circle center coordinate set {C} whose distance to point c is less than a preset threshold s3.
[0072] In the point cloud circle center coordinate set {C}, the spatial distance of the circle center coordinates in the same sphere is approximately equal to the distance between adjacent slice planes. Therefore, the preset threshold s3 can be the diameter of the largest sphere, which means that the circle center coordinates whose distance from point c is less than the preset threshold s3 can be identified as the circle center coordinate points in the same sphere, that is, all point clouds in the point cloud set {C′} can be regarded as point clouds in the same sphere.
[0073] Step 3-2: If the number of point clouds in the point cloud set {C′} is less than the preset threshold k4, then the point c in the point cloud circle center coordinate set {C} is deleted. When the number of point clouds in the set {C} is less than k4, the circle center coordinate points in the set {C} are considered to be isolated points and are not within any sphere. Therefore, these point clouds should be discarded and cannot represent the welded ball.
[0074] The preset threshold k4 is determined according to the number of points cut by a sphere by equally spaced slice planes. For example, if a sphere is cut by 10 slice planes, at most 10 point clouds with the center coordinates will be searched inside the sphere, and the number of point clouds in the point cloud set {C′} is between 5 and 10. Therefore, the value of k4 can be half of the number of point clouds cut by equally spaced slice planes in all point clouds.
[0075] Step 3-3: Repeat steps 3-1 and 3-2 until each point cloud in the point cloud circle center coordinate set {C} is classified, thereby obtaining several new point cloud sets {C′}, where the new point cloud set obtained by taking the i-th point cloud c as the current point cloud is recorded as {C i ′}. Therefore, for a point cloud set P with m point clouds n Several new point cloud sets can be obtained {C 1 ′,C 2 ′,…,C i ′,…C Q ′}, 1≤Q≤m, these new point cloud sets {C 1 ′,C 2 ′,…,C i ′,…C Q ′} is recorded as the first point cloud set, that is, the circle center classification result is the first point cloud set.
[0076] In the point cloud obtained from the spatial grid structure, the slice plane cuts the round rod and the welded ball perpendicular to the slice plane to obtain a circle, so it is necessary to delete the isolated center of the circle through step 3 to obtain the center of the circle that truly represents the welded ball or round rod. Figure 3 , Figure 3 This is a schematic diagram of the center of a circle in a sphere after the center of the circle is classified. At this time, the isolated centers of the circle in the point cloud have been deleted, and the remaining centers of the circle are classified according to the sphere to which they belong.
[0077] Step 4: Fit a sphere based on the point cloud in the first point cloud set. The radius and coordinates of the center of the fitting sphere are the radius and coordinates of the center of the welding sphere, thereby obtaining the radius and coordinates of the center of the welding sphere, which is the final welding sphere extracted from the point cloud of the spatial grid. This allows the subsequent evaluation of the spatial grid structure to be performed based on the welding sphere. The specific implementation includes the following steps:
[0078] Step 4-1: In the point cloud of the spatial grid, search for the distance point cloud set {C 1 ′,C 2 ′,…,C i ′,…C Q ′}, the point cloud whose center coordinates are less than the preset threshold s4, thus forming a local point cloud set. The new point cloud set is denoted as {C i ′} The local point cloud set for is denoted as S i , that is, each new point cloud set corresponds to a local point cloud set.
[0079] The local point cloud set is a subset of the point cloud of the spatial grid, and there is a high probability that a sphere representing a welded ball exists in the subset. Therefore, compared with searching for spheres in the point cloud of the entire grid structure, the efficiency and probability of searching for spheres in the point cloud subset are greatly improved. Among them, the preset threshold s4 is determined according to the radius of the welded ball in the actual grid structure. In this embodiment, it can be 1.05 times the radius of the welded ball with the largest diameter. Of course, other values can also be taken in practice.
[0080] Step 4-2: In the local point cloud set S i Randomly select m2 point clouds from the sphere, fit a fitting sphere based on the m2 point clouds, and convert the local point cloud set S i The point clouds whose spherical distance from the fitting ball is less than the preset threshold s5 form the final point cloud set S i ′.
[0081] The minimum value of m2 is 4, and the maximum value does not exceed the local point cloud set S iThe value of the preset threshold s5 is determined according to the scanning accuracy of the laser scanner. In this embodiment, the value is 2 mm. The preset threshold s5 indicates that the point clouds whose distance from the spherical surface of the ball is less than s5 are all points constituting the fitting ball.
[0082] Step 4-3: Repeat step 4-2 for a maximum of T2 searches. Each time step 4-2 is executed, a corresponding final point cloud set is obtained. These T2 point cloud sets are recorded as qualified point cloud sets. From the qualified point cloud collection Find the point cloud set S with the largest number of point clouds j ′, and the point cloud set S j ′ is recorded as the valid point cloud set, the sphere is refitted from the valid point cloud set, and the center coordinates and radius of the fitted circle are obtained.
[0083] The maximum number of searches T2 is greater than 100, and in this embodiment is 2000.
[0084] In step 4-2 and step 4-3, the method of searching for welding balls from discrete point clouds is to use random search to first search for the final point cloud set S that can represent the sphere. i ′.
[0085] Step 4-4: Delete the final point cloud set S from the three-dimensional point cloud of the target space grid i ', and then repeat steps 4-1 to 4-3 until all spheres are searched out.
[0086] refer to Figure 4 , Figure 4 Schematic diagram of the effect of searching for two spheres in the three-dimensional point cloud of the target space grid.
[0087] Compared with the prior art, the present invention uses the geometric features of the welding ball, first searches for a fitting circle from the two-dimensional point cloud by a slicing method, and then determines the local point cloud of the sphere by the coordinate point of the center of the fitting circle, thereby efficiently determining the point cloud of the welding ball. Traditional point cloud processing methods such as point cloud normal vector calculation and point cloud clustering are abandoned, significantly improving the efficiency and accuracy of searching for spheres in complex point clouds.
[0088] like Figure 5 As shown, the present invention also relates to a processing terminal 100 for extracting welding balls from a space grid based on point clouds, which comprises:
[0089] Memory 101, used for storing program instructions;
[0090] The processor 102 is used to run the program instructions to execute the steps in the method of extracting welding balls from a spatial grid based on point clouds.
[0091] The embodiment disclosed in this specification is only an example of a unilateral feature of the present invention, and the protection scope of the present invention is not limited to this embodiment, and any other functionally equivalent embodiments fall within the protection scope of the present invention. For those skilled in the art, various other corresponding changes and deformations can be made according to the technical solutions and concepts described above, and all of these changes and deformations should fall within the protection scope of the claims of the present invention.
Claims
1. A method for extracting welding balls from a space grid based on point cloud, characterized in that: The steps include: Step 1: Obtain the 3D point cloud of the target space grid, slice the 3D point cloud according to the preset slicing direction to obtain N parallel slicing planes, N ≥ 2, and project the point cloud whose distance to the nearest slicing plane in the 3D point cloud is less than the preset threshold s1 onto the slicing plane, thereby obtaining a point cloud set for each slicing plane; Step 2: Fit all the fitting circles in the point cloud set of each slice plane. The fitting circle is used to represent that the point cloud inside the circle may be a welded ball, and the point cloud outside the circle is a non-welded ball. The center coordinates of the circle inside the fitting circle constitute the point cloud center coordinate set. The specific implementation of step 2 includes the following steps: Step 2-1: Point cloud collection on the current slice plane Randomly select m1 point clouds from Represents the point cloud set of the nth slice plane, fits a circle with these m1 point clouds to obtain the fitted circle, 3≤m1≤m / 2, and traverses the point cloud sets of other slice planes in turn to obtain the fitted circle corresponding to each slice plane; Step 2-2: Assemble the point clouds The point clouds whose distance from the fitting circle is less than the preset threshold s2 are put into the collection ,gather Initially, it is an empty set, where the distance between the point cloud and the fitting circle refers to the shortest distance from the point cloud to the circumference of the fitting circle. The preset threshold s2 is determined according to the scanning accuracy of the laser scanner used to scan the three-dimensional point cloud forming the target space grid. The preset threshold s2 indicates that the point cloud within the circumference of the fitting circle less than s2 may be the point cloud constituting the welding ball. Step 2-3: If the current fitted circle meets condition 1, save the radius, center coordinates and point cloud set of the current fitted circle If the current fitting circle does not meet condition 1, repeat steps 2-1 and 2-2 until the maximum number of searches T1 is reached. Condition 1: The fitting accuracy of the fitting circle is greater than k2 and the radius of the fitting circle is less than k3 and the point cloud collection The number of point clouds in is greater than k1, where k1, k2 and k3 are all preset thresholds. The sizes of k1, k2 and k3 are determined based on the comprehensive features of the point cloud data in the point cloud set; Step 2-4: Assemble from point cloud Deleting a point cloud collection , get the remaining point cloud set , and in the remaining point cloud collection Repeat steps 2-1 to 2-3 until all fitting circles that meet condition 1 are found. The point cloud set of each slice plane is processed in turn according to the above steps, and a fitting circle that meets condition 1 on each slice plane can be obtained; Step 2-5: Store the center coordinates of the fitted circles that meet condition 1 on all slice planes into the point cloud center coordinate set ; Step 3: Classify the centers of the circle in the point cloud circle center coordinate set to obtain a local circle center point cloud set representing the welding ball. The specific implementation of step 3 includes the following steps: Step 3-1: Set the coordinates of the center of the point cloud Select any point c in the point cloud and set the coordinates of the center of the point cloud The point cloud whose distance from point c is less than the preset threshold s3 forms a new point cloud set ; Step 3-2: If the point cloud collection If the number of point clouds in is less than the preset threshold k4, the point cloud center coordinate set Point c in is deleted; Step 3-3: Repeat steps 3-1 and 3-2 until the point cloud center coordinates are set. Each point cloud in is classified, thus obtaining several new point cloud sets , where the i-th point cloud The new point cloud set obtained as the current point cloud is recorded as , therefore, for a point cloud set with m point clouds Several new point cloud sets can be obtained , 1≤Q≤m, these new point cloud sets That is, it is recorded as the first point cloud set, and the first point cloud set serves as the local circle center point cloud set; Step 4: Fit a sphere according to the point cloud in the local center point cloud set. The center radius and coordinates of the fitted sphere are the center radius and coordinates of the welded sphere, thereby obtaining the center radius and coordinates of the welded sphere. The specific implementation of step 4 includes the following steps: Step 4-1: Search for the first point cloud set in the point cloud of the spatial grid The point cloud whose center coordinates are less than the preset threshold s4 is formed into a local point cloud set. The new point cloud set is recorded as The corresponding local point cloud set is recorded as , that is, each new point cloud set corresponds to a local point cloud set; Step 4-2: Collect local point clouds Randomly select m2 point clouds from the sphere, fit a fitting sphere based on the m2 point clouds, and collect the local point clouds The point clouds whose spherical distance from the fitting ball is less than the preset threshold s5 form the final point cloud set. ; Step 4-3: Repeat step 4-2 for a maximum of T2 searches. Each time step 4-2 is executed, a corresponding final point cloud set is obtained. These T2 point cloud sets are recorded as qualified point cloud sets. , from the qualified point cloud set Find the point cloud set with the largest number of point clouds , and the point cloud collection Recorded as a valid point cloud set, a fitting sphere is refitted from the valid point cloud set, and the center coordinates and radius of the fitting sphere are obtained; Step 4-4: Delete the final point cloud set from the 3D point cloud of the target space grid , and then repeat steps 4-1 to 4-3 until all balls are searched out, thereby extracting the welding balls.
2. The method for extracting welding balls from a space grid based on point cloud according to claim 1, characterized in that: In step 1, the number of point clouds in the point cloud set of each slice plane is the same or different.
3. The method for extracting welding balls from a space grid based on point cloud according to claim 1 or 2, characterized in that: The preset threshold s1 is determined according to the distance between adjacent slice planes. The distance between adjacent slice planes is less than a times the minimum size of the component to be identified in the target space grid, 0<a<1.
4. The method for extracting welding balls from a space grid based on point cloud according to claim 1, characterized in that: In step 2-3, k1 is 1 / 4 of the maximum number of point clouds on the circumference of the slice plane, k2 represents the goodness of fit, and its value is greater than 0.9 and less than 1, and k3 is 1-10 times the maximum diameter of the actual sphere in the point cloud.
5. The method for extracting welding balls from a space grid based on point cloud according to claim 1, characterized in that: The preset threshold s3 may be the diameter of the largest sphere, and the value of k4 is half of the number of slices of a sphere by equally spaced slice planes in all point clouds.
6. The method for extracting welding balls from a space grid based on point cloud according to claim 1, characterized in that: The preset threshold s4 is 1.05 times the radius of the largest welding ball, the minimum value of m2 is 4, and the maximum value does not exceed the local point cloud set. The maximum number of searches T2 is greater than 100, which is half of the number of point clouds.
7. A processing terminal, characterized in that: These include, A memory for storing program instructions; A processor is used to run the program instructions to execute the steps in the method for extracting welded balls from a spatial grid based on point clouds as described in any one of claims 1 to 6.
