Point cloud segmentation method and device, and storage medium

By screening and optimizing the endpoint pairs of steel plate point cloud data, the problem of low segmentation accuracy of steel plate point cloud in the prior art is solved, and higher detection accuracy and more detailed contour optimization are achieved.

CN119919427AActive Publication Date: 2025-05-02ZHONGKE YUNGU TECH
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411988046.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-02
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

The existing 3D point cloud processing methods have problems with low accuracy in steel plate point cloud segmentation, especially for steel plates with non-fixed sizes and models and relatively thin steel plates, the segmentation effect is poor.

Method used

By obtaining point cloud data of the workbench and the object to be detected, filter out the endpoint pairs of the object to be detected, determine the seed endpoint pairs, and optimize based on the distance between the index point and the endpoint to be optimized until the optimization of the object to be detected is completed.

Benefits of technology

The accuracy of point cloud segmentation of steel plates is improved, more detailed optimization of steel plate profile is achieved, and detection accuracy is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119919427A_ABST
    Figure CN119919427A_ABST
Patent Text Reader

Abstract

The invention provides a point cloud segmentation method and device, and a storage medium, and the method comprises the steps: obtaining a plurality of endpoint pairs in a first point cloud set according to the first point cloud set comprising workbench point cloud data and to-be-detected object point cloud data; calculating an average value of the Euclidean distances corresponding to the plurality of endpoint pairs, screening out an endpoint pair corresponding to the to-be-detected object according to the average value, and selecting one endpoint pair from the endpoint pair corresponding to the to-be-detected object as a seed endpoint pair by adopting a preset mode; aiming at a plurality of endpoint pairs in the first point cloud set, taking any seed point in the seed endpoint pairs as an index point, and optimizing the endpoint to be optimized according to the distance between the index point and the endpoint to be optimized until the optimization of the object to be detected is completed; wherein the to-be-optimized point is a previous frame endpoint and / or a next frame endpoint on the same side of the index point; the point cloud segmentation precision of the steel plate can be improved, the point cloud data of the workbench and the point cloud data of the steel plate are finely divided, and the detection precision of the to-be-detected object is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of 3D point cloud detection, and in particular to a point cloud segmentation method, device and storage medium. Background Art

[0002] Steel plate is one of the most important materials in the field of engineering machinery processing and manufacturing. With the deepening of industrial intelligence, informatization and automation, related parts manufacturers have put forward higher requirements on manufacturing, processing and assembly processes, and thus put forward higher requirements on the quality of raw materials such as steel plates; faced with the contradiction between high-quality, high-quality and high-efficiency production requirements and the low-efficiency and high-error detection methods of traditional manual measurement, a method based on visual inspection technology to obtain point cloud data of the appearance of steel plates and use 3D point cloud processing algorithms to complete the detection of steel plate quality is proposed.

[0003] Existing 3D point cloud processing generally uses the Random Sample Consensus (RANSAC) algorithm to perform plane fitting on the point cloud data of the steel plate and segment the steel plate point cloud according to the distance threshold from the point to the plane. However, since the size and model of the steel plate are not fixed and it is not an ideal plane, the segmented steel plate point cloud will not be accurate. At the same time, for relatively thin steel plates, the distance between the collected point cloud data of the steel plate and the point cloud data of the workbench will be very close, making it more difficult to segment the point cloud of the steel plate. Summary of the invention

[0004] The present application provides a point cloud segmentation method, device and storage medium, which are based on the point cloud data of a workbench and the point cloud data of an object to be detected, and obtain endpoint pairs of the point cloud data, the above endpoint pairs include the endpoint pairs corresponding to the workbench and the endpoint pairs of the above object to be detected, so it is necessary to screen out the endpoint pairs of the above object to be detected, and determine the seed endpoint pairs based on the screened endpoint pairs, use one of the endpoints in the seed endpoint pair as an index point, and finally optimize the endpoint to be optimized according to the distance between the index point and the endpoint to be optimized until the optimization of the object to be detected is completed; according to the above content, the point cloud segmentation accuracy of the object to be detected can be improved, the point cloud data of the workbench and the point cloud data of the object to be detected can be refined, the contour of the object to be detected can be more finely optimized, and the detection accuracy of the object to be detected can be improved.

[0005] In a first aspect, the present application provides a point cloud segmentation method, comprising:

[0006] According to a first point cloud set including workbench point cloud data and object point cloud data to be detected, a plurality of endpoint pairs in the first point cloud set are obtained, wherein the object to be detected is placed on the workbench surface; the endpoint pairs refer to two points on opposite sides along the laser line direction;

[0007] Calculating an average value of the Euclidean distances corresponding to the plurality of endpoint pairs, and filtering out the endpoint pairs corresponding to the object to be detected according to the average value, and selecting an endpoint pair from the endpoint pairs corresponding to the object to be detected as a seed endpoint pair in a preset manner;

[0008] For multiple endpoint pairs in the first point cloud set, any seed point in the seed endpoint pair is used as an index point, and the endpoint to be optimized is optimized according to the distance between the index point and the endpoint to be optimized until the optimization of the object to be detected is completed; wherein the point to be optimized is the endpoint of the previous frame and / or the endpoint of the next frame on the same side of the index point.

[0009] In one or more possible embodiments, optimizing the endpoint to be optimized according to the distance between the index point and the endpoint to be optimized includes:

[0010] When it is determined that the distance between the index point and the endpoint to be optimized is greater than or equal to the preset distance, a preset number of first candidate points are selected according to the distance between the index point and all points in the previous frame of point cloud data and / or the next frame of point cloud data;

[0011] The first candidate point closest to the index point among the first candidate points is used as a new index point, and it is determined that the optimization of the endpoint to be optimized is completed.

[0012] In one or more possible embodiments, optimizing the endpoint to be optimized according to the distance between the index point and the endpoint to be optimized includes:

[0013] When it is determined that the distance between the index point and the endpoint to be optimized is greater than or equal to the preset distance, a second point cloud set is determined according to the point cloud data of the frame corresponding to the index point, the point cloud data of the previous preset frame, and the point cloud data of the subsequent preset frame;

[0014] The second point cloud set is cropped according to a straight-through filtering method to obtain a point cloud that meets a first preset range, and plane fitting is performed on the point cloud;

[0015] When it is determined according to the distance between the first candidate point and the fitted plane that the number of second candidate points satisfying the second preset range is greater than or equal to a preset value, a point is selected from the second candidate points as an index point.

[0016] In one or more possible embodiments, selecting a point from the second candidate points as an index point includes:

[0017] According to the positional relationship between the second candidate point and the index point, a second candidate point that satisfies a third preset range is selected as the index point.

[0018] In one or more possible embodiments, it further includes:

[0019] When it is determined that the number of second candidate points satisfying the second preset range is less than a preset value, a first candidate point among the first candidate points that is closest to the index point is used as a new index point.

[0020] In one or more possible embodiments, optimizing the endpoint to be optimized according to the distance between the index point and the endpoint to be optimized includes:

[0021] When it is determined that the distance between the index point and the endpoint to be optimized is less than the preset distance, the endpoint to be optimized is used as a new index point, and it is determined that the optimization of the endpoint to be optimized is completed.

[0022] In one or more possible embodiments, obtaining a plurality of endpoint pairs in the first point cloud set includes:

[0023] For any frame point cloud in the first point cloud set, searching from the left / right end of any frame point cloud toward the center in sequence according to the Euclidean distance between two adjacent points;

[0024] If two adjacent points less than or equal to a preset threshold are searched, the point far away from the center of any frame point cloud is used as the left / right endpoint of any frame point cloud;

[0025] Determine the endpoint pair corresponding to any frame point cloud according to the left / right endpoints of any frame point cloud.

[0026] In a second aspect, the present application provides a point cloud segmentation device, comprising:

[0027] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform any one of the methods in the first aspect.

[0028] In a third aspect, the present application provides a computer storage medium, wherein the computer storage medium stores a computer program, wherein the computer program is used to cause a computer to execute any one of the methods in the first aspect.

[0029] According to a point cloud segmentation method, device and storage medium provided in the present application, accurate segmentation of the point clouds of the steel plate and the workbench can be achieved, the point cloud data of the workbench and the point cloud data of the steel plate can be optimized based on the selected seed points, the point cloud data of the workbench and the point cloud data of the steel plate can be divided into fine parts, and the accuracy of obtaining the steel plate contour can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application, and do not constitute an improper limitation on the present application.

[0031] Figure 1 A schematic diagram of a point cloud data acquisition device provided according to an embodiment;

[0032] Figure 2 A flow chart of a point cloud segmentation method provided according to an embodiment;

[0033] Figure 3 is a schematic diagram of a first point cloud set provided according to an embodiment;

[0034] Figure 4 A schematic diagram of an endpoint pair obtained from a first point cloud set provided according to an embodiment;

[0035] Figure 5 A schematic diagram of a steel plate after endpoint optimization is completed according to an embodiment;

[0036] Figure 6 A schematic diagram of a point cloud segmentation device provided according to an embodiment;

[0037] Figure 7 The present invention is a schematic diagram of a computer storage medium provided according to an embodiment. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0039] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0040] Furthermore, in the description of the embodiments of the present application, unless otherwise specified, “ / ” means or. For example, A / B can mean A or B. The “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0041] Steel plate is one of the most important materials in the field of engineering machinery processing and manufacturing. With the deepening of industrial intelligence, informatization and automation, related parts manufacturers have put forward higher requirements on manufacturing, processing and assembly processes, and thus put forward higher requirements on the quality of raw materials such as steel plates; faced with the contradiction between high-quality, high-quality and high-efficiency production requirements and the low-efficiency and high-error detection methods of traditional manual measurement, a method based on visual inspection technology to obtain point cloud data of the appearance of steel plates and use 3D point cloud processing algorithms to complete the detection of steel plate quality is proposed.

[0042] Existing 3D point cloud processing generally uses the Random Sample Consensus (RANSAC) algorithm to perform plane fitting on the point cloud data of the steel plate and segment the steel plate point cloud according to the distance threshold from the point to the plane. However, since the size and model of the steel plate are not fixed and it is not an ideal plane, the segmented steel plate point cloud will not be accurate. At the same time, for relatively thin steel plates, the distance between the collected point cloud data of the steel plate and the point cloud data of the workbench will be very close, making it more difficult to segment the point cloud of the steel plate.

[0043] At the same time, the existing point cloud segmentation methods also include the following categories:

[0044] The computational complexity of the region growing algorithm is high, and the number of steel plate point clouds is large, so the calculation is very slow and the beat is difficult to meet the requirements. In addition, the segmentation effect of the region growing is very dependent on the accuracy of the normal vector calculation of the point cloud. When the steel plate point cloud and the workpiece table point cloud are close, this method is difficult to complete the segmentation accurately.

[0045] The Euclidean clustering algorithm usually requires obvious gaps between point clouds, but there is no obvious gap between the point cloud of the steel plate and the point cloud of the workpiece platform.

[0046] like Figure 1 As shown, it is a schematic diagram of a simple point cloud data acquisition device provided in this application. The equipment consists of a guide rail, a frame, a line scan camera and a workbench. The workbench is composed of a number of rollers with uniform spacing. The steel plate can be placed statically on the workbench. The line scan camera is installed on the frame to scan the steel plate. The guide rail is used to ensure that the camera moves smoothly along the direction of movement, that is, the longitudinal direction.

[0047] On the rack, several 3D line scan cameras are installed side by side in a straight line, and the laser coverage can be adjusted by adding or removing 3D line scan cameras as needed. Figure 1 A solution for installing a 3D line scan camera is given in the specification. It can be foreseen that the more 3D line scan cameras (for the convenience of expression, cameras will be used to replace the 3D line scan cameras in this application) are installed side by side on the rack, the wider the coverage range that can be achieved along the laser line direction, that is, the horizontal direction (the direction parallel to the above-mentioned roller), and the longitudinal scanning range in the longitudinal direction (the direction parallel to the above-mentioned guide rail) is determined according to the length of the guide rail and the workpiece table.

[0048] First, this application proposes a point cloud segmentation method, such as Figure 2 As shown, including:

[0049] Step 201, according to a first point cloud set including workbench point cloud data and object point cloud data to be detected, a plurality of endpoint pairs in the first point cloud set are obtained, wherein the object to be detected is placed on the workbench surface; the endpoint pairs refer to two points on opposite sides along the laser line direction;

[0050] In one or more possible embodiments, the first point cloud data set includes the point cloud data of the steel plate and the point cloud data of the workbench obtained after scanning by the 3D line scan camera. The point cloud data of the workbench refers to the point cloud data of the roller scanned by the camera, such as Figure 3 As shown in FIG. 1 , it is a schematic diagram of the first point cloud set. The white part is dense point cloud data, which is composed of multi-frame point cloud data scanned by the camera. It can be clearly seen that the point cloud data of the drum and the point cloud data of the steel plate are mixed together. For the convenience of description, Figure 3 The x-direction (horizontal) and y-direction (vertical) are also shown;

[0051] In one or more possible embodiments, the original point cloud data cloud_org obtained based on camera scanning generally cannot be directly segmented, because some invalid points and noise points will inevitably appear in the process of camera scanning. Therefore, after obtaining the point cloud data obtained by camera scanning, it is necessary to first pre-process the invalid points and outlier noise points in the point cloud; the number of points contained in the single-frame point cloud data of the above-mentioned camera is fixed, that is, the resolution of the camera, and the length of the point cloud on a single laser line is the product of the number of points in the single frame minus 1 and the point spacing; when the length of the above-mentioned point cloud exceeds the maximum field of view of the current depth of field position, the points on both sides of the single laser contour line that exceed the field of view are invalid points. In addition, when the laser is shot in the air, the points that exceed the depth of field are also invalid points and are removed. Invalid points can reduce the number of point clouds, save computing resources, and avoid anomalies in subsequent point cloud computing. The point cloud data after removing invalid points from the original point cloud data cloud_org is recorded as cloud_valid. At the same time, due to the reflection of the object to be detected, that is, the steel plate and the interference of the laser, floating noise points will be caused in the space. The RANSAC algorithm is used to perform plane fitting on the point cloud data cloud_valid, and the points in the point cloud data cloud_valid whose distance from the fitted plane is greater than a are removed to obtain the point cloud data cloud_inliers. The above a is a fixed value, which can be determined according to the flatness of the steel plate. For example, the value of a can be 1.5 times or 2 times the flatness of the steel plate, etc., and no specific restrictions are made here.

[0052] In one or more possible embodiments, after obtaining the point cloud data cloud_inliers, the point cloud data cloud_inliers needs to be sorted to obtain the ordered point cloud data vector_profile_cloud. The specific method of sorting is as follows:

[0053] Each point contained in the point cloud data cloud_inliers has a three-dimensional coordinate (x, y, z) used to characterize the position of the point. In this application, the y values ​​in a frame of point cloud data are equal, and the x values ​​are unequal; the point cloud data cloud_inliers are sorted from small to large according to the y value to obtain several frames of point cloud data, and then each frame of point cloud data is sorted from small to large according to the x value, so that the point cloud data cloud_inliers can be converted into ordered point cloud data vector_profile_cloud.

[0054] In one or more possible embodiments, it is determined that the point cloud schematic diagram after obtaining the ordered point cloud may contain useless workbench data, specifically, Figure 3As shown in the figure, there are two workbench point cloud data sets that do not interact with the steel plate. Therefore, it is necessary to filter out these two useless point cloud data sets and determine the start frame and end frame of the two ends of the steel plate. The steel plate is stationary on the roller. If there is no steel plate between the two rollers, the point cloud data between the two rollers is empty, then the difference in y between the i-th frame point cloud and the i+1-th frame point cloud will be large. Based on the above principle, the start frame and end frame of the steel plate point cloud can be determined. The specific method is as follows:

[0055] For example, the ordered point cloud data vector_profile_cloud contains a total of M frames of point cloud data, the 1st frame of point cloud data is the first starting frame, and the Mth frame of point cloud data is the last ending frame. If the difference in y between two adjacent frames m and m+1 is greater than the threshold b, it means that there is a gap between the two adjacent frames of point cloud data. The mth frame of point cloud data is taken as a ending frame, and the m+1th frame of point cloud data is taken as a starting frame. Starting from the first starting frame, the point cloud data between a starting frame and a ending frame are taken as a group. A group of point cloud data is a continuous object (roller or steel plate) scanned by the camera, and the difference in y between the starting frame and the ending frame in the obtained several groups of point cloud data is calculated. When it is determined that the difference is greater than the threshold L, it is determined that the group of point cloud data is point cloud data containing steel plates, that is, the first point cloud set mentioned above.

[0056] In one or more possible embodiments, multiple endpoint pairs in the first point cloud set are determined in the following manner: for any frame point cloud in the above-mentioned first point cloud set, according to the Euclidean distance between two adjacent points, search from the left / right end of the above-mentioned frame point cloud to the center in sequence; if two adjacent points less than or equal to a preset threshold are searched, the point far away from the center of the above-mentioned frame point cloud is used as the left / right endpoint of the above-mentioned frame point cloud; according to the left / right endpoint of the above-mentioned frame point cloud, the endpoint pair corresponding to the above-mentioned frame point cloud is determined; first, for any frame point cloud, the Euclidean distance between two adjacent points is calculated, for example, starting from the left side where x is the smallest, the distance between point x1 and point x2 is calculated. If the distance is greater than the preset threshold d, it means that x2 is not the left endpoint, continue to calculate the distance between x2 and x3, if the distance is still greater than the preset threshold d, continue to search and calculate toward the center until two adjacent points xi and x(i+1) that are less than or equal to the preset threshold d are found, and take the above xi as the left endpoint; similarly, starting from the right side where x is the largest, calculate the distance between point xn and point x(n-1), if the distance is greater than the preset threshold d, it means that point xn is not the right endpoint, continue to calculate the distance between point x(n-1) and point x(n-2), if the distance is less than or equal to the preset threshold d, take point x(n-1) as the right endpoint, otherwise continue searching; and determine the endpoint pair corresponding to any of the above frame point clouds based on the confirmed left endpoint and right endpoint, such as Figure 4, which is a schematic diagram of the endpoint pairs obtained in the first point cloud set, including the endpoint pairs of the steel plate and the endpoint pairs of the roller.

[0057] Step 202, calculating the average value of the Euclidean distances corresponding to the plurality of endpoint pairs, and selecting the endpoint pairs corresponding to the object to be detected according to the average value, and selecting an endpoint pair from the endpoint pairs corresponding to the object to be detected as a seed endpoint pair in a preset manner;

[0058] In one or more possible embodiments, Figure 4 As shown, the first point cloud set contains multiple endpoint pairs. L (x L ,y L ,z L ) is the left endpoint, P R (x R ,y R ,z R ) is the right endpoint, calculate the distance between each pair of endpoints, record it as width, and use the following formula to calculate the average value mean of N widths:

[0059]

[0060] The endpoint pairs whose width exceeds the mean are eliminated, that is to say, the retained endpoint pairs are all the endpoint pairs corresponding to the steel plates. The average width of the endpoint pairs corresponding to the steel plates is calculated again, and the endpoint pair with the smallest deviation between the width and the mean is taken as the seed endpoint pair. It is worth noting that the seed endpoint pair contains two seed points, namely the seed point on the left and the seed point on the right.

[0061] Step 203, for the multiple endpoint pairs in the above-mentioned first point cloud set, any seed point in the above-mentioned seed endpoint pair is used as an index point, and the above-mentioned endpoint to be optimized is optimized according to the distance between the above-mentioned index point and the endpoint to be optimized, until the optimization of the above-mentioned object to be detected is completed; wherein the above-mentioned point to be optimized is the endpoint of the previous frame and / or the endpoint of the next frame on the same side of the above-mentioned index point.

[0062] In one or more possible embodiments, the plurality of endpoint pairs in the first point cloud set include endpoint pairs of steel plates and endpoint pairs of rollers. The process of optimizing endpoints is actually to correct the endpoints of actual non-steel plate edge points to the endpoints of steel plate edges, while the endpoints of the steel plate edges remain unchanged. The seed endpoint pairs include two seed points. Both of the seed points are used as index points to search the start frame and the end frame containing the steel plate point cloud respectively to optimize the endpoints of the non-steel plate edge points, as follows:

[0063] Taking any seed point to optimize in the direction of the termination frame as an example, a detailed description is given. The seed point is taken as the index point current_index. After the optimization starts, the Euclidean distance between the current index point current_index and the endpoint of the next frame on the same side (the endpoint to be optimized) is calculated. If the calculated Euclidean distance is less than the preset distance, it means that the endpoint of the next frame on the same side is also the endpoint of the steel plate, and the endpoint of the next frame on the same side is taken as the new index point. It is determined that the endpoint to be optimized has been optimized, and the search optimization can continue to the next frame; when it is determined that the distance between the index point and the endpoint to be optimized is greater than or equal to the preset distance, it means that the endpoint to be optimized is the endpoint corresponding to the roller, and therefore the endpoint corresponding to the roller needs to be optimized;

[0064] In one or more possible embodiments, a preset number of first candidate points can be selected based on the distance between the above-mentioned index point and all points in the previous frame point cloud data and / or the next frame point cloud data. The optimization of any seed point in the direction of the termination frame is used as an example for detailed description. The distance between the above-mentioned index point and all points in the next frame point cloud data is calculated. If the next frame point cloud data contains N points, N distances will be obtained, and then several first candidate points with smaller distances are selected. In this application, a KD tree (K-Dimensional Tree, referred to as KD tree) is used to search for the 20 first candidate points closest to the current endpoint. The first candidate point goal_point corresponding to the smallest distance can be directly used as the endpoint of the steel plate point cloud, and the selected first candidate point goal_point can be used as the next new index point.

[0065] In one or more possible embodiments, when it is determined that the distance between the above-mentioned index point and the endpoint to be optimized is greater than or equal to the preset distance, the second point cloud set is determined according to the point cloud data of the frame corresponding to the above-mentioned index point and the point cloud data of the previous preset frame and the point cloud data of the subsequent preset frame; specifically, according to the index position of the current endpoint, several frames of point cloud data before and after the contour point cloud can be extracted and merged into an overall point cloud cloud_temp. In this application, the first three frames and the last three frames of point cloud data of the point cloud of the frame where the current endpoint is located are selected, a total of seven frames of point cloud data, to obtain the second point cloud set cloud_temp;

[0066]

[0067] Crop the above-mentioned second point cloud set according to the direct-pass filtering method to obtain the point cloud that meets the first preset range. Specifically, use direct-pass filtering to crop the second point cloud set in the x direction to obtain the point cloud cloud_temp_seg. All points in the point cloud cloud_temp_seg have x values that satisfy the first preset range value_min < x < value_max, where value_min is the lower threshold of direct-pass filtering and value_max is the upper threshold; use the plane fitting algorithm to perform plane fitting on the point cloud cloud_temp_seg to obtain the fitted plane coefficient; the above-mentioned plane fitting algorithm can choose RANSAC, the least squares method, etc., and no specific limitation is made here;

[0068] Based on the distance distance between the above-mentioned first candidate point and the above-mentioned fitted plane coefficient, select the second candidate points that satisfy the second preset range -0.5 ≤ distance ≤ 2.0. If it is determined that the number of second candidate points is greater than or equal to the preset value 2, then select one point from the second candidate points as the index point;

[0069] The specific method for selecting the index point is as follows: According to the positional relationship between the above-mentioned second candidate point and the above-mentioned index point, select the second candidate point that satisfies the third preset range as the index point. The third preset range is as follows:

[0070]

[0071] where n is the number of candidate second candidate points, and current_point is the current index point;

[0072] If the number of second candidate points after being screened by the third preset range is still greater than or equal to the preset value 2, then further screen by the difference between the z values of the current index point and the second candidate points. For example, select the second candidate points with a difference less than 0.2, or directly select the second candidate point corresponding to the smallest difference; and take the selected second candidate point as the next index point; if the number of second candidate points obtained is less than the preset value 2, then directly take the first candidate point goal_point as the next index point.至此, the step of optimizing from any seed point to the end frame direction is completed.同样采用相同的方式对任一种子点向起始帧方向进行优化,直至整个钢板优化完成;如 Figure 5 As shown, it is a schematic diagram after the optimization of the endpoints of the entire steel plate is completed, and the segmentation of the steel plate point cloud and the workbench point cloud is also completed.

[0073] Embodiment 2

[0074] Corresponding to the above-mentioned point cloud segmentation method, the present invention also proposes a point cloud segmentation device, such as Figure 6 As shown, including:

[0075] At least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned point cloud segmentation method.

[0076] like Figure 6 As shown, the device includes a processor 601, a memory 602, a communication interface 603 and a bus 604. The processor 601, the memory 602 and the communication interface 603 are connected to each other via the bus 604.

[0077] The processor 601 is used to read and execute instructions in the memory 602, so that at least one processor can execute the point cloud segmentation method provided in the above embodiment.

[0078] The memory 602 is used to store various instructions and programs of the point cloud segmentation method provided in the above embodiment.

[0079] The bus 604 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0080] The processor 601 may be a central processing unit (CPU), a network processor (NP), a graphic processing unit (GPU), or any combination of CPU, NP, and GPU. It may also be a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0081] Since the device embodiment of the present invention corresponds to the above-mentioned method embodiment, details not disclosed in the device embodiment may refer to the above-mentioned method embodiment and will not be described in detail in the present invention.

[0082] Example 3

[0083] In addition, the present application also provides a computer-readable storage medium, such as Figure 7 As shown, the computer storage medium stores a computer program, and the computer program is used to enable a computer to execute any one of the methods in the above embodiments.

[0084] The memory may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 701 and / or a cache memory 702 , and may further include a read-only memory (ROM) 703 .

[0085] The memory may also include a program / utility 705 having a set (at least one) of program modules 704, such program modules 704 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0086] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0087] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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 device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes 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.

[0088] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0089] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0090] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A point cloud segmentation method, characterized in that: include: According to a first point cloud set including workbench point cloud data and object point cloud data to be detected, a plurality of endpoint pairs in the first point cloud set are obtained, wherein the object to be detected is placed on the workbench surface; the endpoint pairs refer to two points on opposite sides along the laser line direction; Calculating an average value of the Euclidean distances corresponding to the plurality of endpoint pairs, and filtering out the endpoint pairs corresponding to the object to be detected according to the average value, and selecting an endpoint pair from the endpoint pairs corresponding to the object to be detected as a seed endpoint pair in a preset manner; For multiple endpoint pairs in the first point cloud set, any seed point in the seed endpoint pair is used as an index point, and the endpoint to be optimized is optimized according to the distance between the index point and the endpoint to be optimized until the optimization of the object to be detected is completed; wherein the point to be optimized is the endpoint of the previous frame and / or the endpoint of the next frame on the same side of the index point.

2. The method according to claim 1, characterized in that Optimizing the endpoint to be optimized according to the distance between the index point and the endpoint to be optimized, including: When it is determined that the distance between the index point and the endpoint to be optimized is greater than or equal to the preset distance, a preset number of first candidate points are selected according to the distance between the index point and all points in the previous frame of point cloud data and / or the next frame of point cloud data; The first candidate point closest to the index point among the first candidate points is used as a new index point, and it is determined that the optimization of the endpoint to be optimized is completed.

3. The method according to claim 2, characterized in that Optimizing the endpoint to be optimized according to the distance between the index point and the endpoint to be optimized, including: When it is determined that the distance between the index point and the endpoint to be optimized is greater than or equal to the preset distance, a second point cloud set is determined according to the point cloud data of the frame corresponding to the index point, the point cloud data of the previous preset frame, and the point cloud data of the subsequent preset frame; The second point cloud set is cropped according to a straight-through filtering method to obtain a point cloud that meets a first preset range, and plane fitting is performed on the point cloud; When it is determined according to the distance between the first candidate point and the fitted plane that the number of second candidate points satisfying the second preset range is greater than or equal to a preset value, a point is selected from the second candidate points as an index point.

4. The method according to claim 3, characterized in that The selecting a point from the second candidate points as an index point comprises: According to the positional relationship between the second candidate point and the index point, a second candidate point that satisfies a third preset range is selected as the index point.

5. The method according to claim 3 or 4, characterized in that: Also includes: When it is determined that the number of second candidate points satisfying the second preset range is less than a preset value, a first candidate point among the first candidate points that is closest to the index point is used as a new index point.

6. The method according to claim 1, characterized in that Optimizing the endpoint to be optimized according to the distance between the index point and the endpoint to be optimized, including: When it is determined that the distance between the index point and the endpoint to be optimized is less than the preset distance, the endpoint to be optimized is used as a new index point, and it is determined that the optimization of the endpoint to be optimized is completed.

7. The method according to claim 1, characterized in that The step of obtaining a plurality of endpoint pairs in the first point cloud set includes: For any frame point cloud in the first point cloud set, searching from the left / right end of any frame point cloud toward the center in sequence according to the Euclidean distance between two adjacent points; If two adjacent points less than or equal to a preset threshold are searched, the point far away from the center of any frame point cloud is used as the left / right endpoint of any frame point cloud; Determine the endpoint pair corresponding to any frame point cloud according to the left / right endpoints of any frame point cloud.

8. A point cloud segmentation device, characterized in that: The device comprises: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor so that the at least one processor can execute any one of the methods of claims 1-7.

9. A computer storage medium, characterized in that The computer storage medium stores a computer program, and the computer program is used to make a computer execute any one of the methods according to claims 1-7.

Citation Information

Patent Citations

  • Airborne laser radar point cloud data edge extraction method

    CN105512665A

  • Point cloud data processing method and device, electronic equipment and storage medium

    CN115578708A

  • Method for determining pose of target object, electronic equipment and storage medium

    CN117372518A

  • Target bounding box adjusting method and device, electronic equipment and storage medium

    CN117745775A

  • Workpiece detection method and device, visual detection equipment and storage medium

    CN119006470A