A method and system for corner feature extraction
The method improves corner point extraction by preprocessing and filtering outliers in point cloud data, ensuring accurate and reliable detection by removing over-extracted points based on neighboring distances.
Patent Information
- Application Number
- CN202210994011.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-18
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-08-18
AI Technical Summary
The existing corner feature extraction methods are prone to overextraction in point cloud data with rich straight lines and corner feature, resulting in inaccurate extraction and are greatly affected by environmental factors and data acquisition accuracy.
Preprocessing is performed by acquiring point cloud data, including median filtering smoothing and outlier point removal, and then data segmentation is performed to obtain the set of suspected corner points, and over-extracted corner points are eliminated based on the straight line distance between the suspected corner points and adjacent corner points. The scanning resolution and depth information of the lidar are used to set thresholds for accurate extraction.
The accurate identification and extraction of corner features of the target object under different environments is achieved, over-extraction is avoided, and the accuracy and applicability of corner features is improved.
Smart Images

Figure CN115511902B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of industrial robots, and in particular, to an angle feature extraction method and system. Background Technique
[0002] The statements in this part only mention the background techniques related to the present application and do not necessarily constitute prior art.
[0003] The ways of obtaining data by vision technology mainly include monocular cameras, binocular cameras, depth cameras, lidars, etc. The application advantage of lidar is that it can avoid the influence of environmental factors such as light. A lidar is a sensor that detects features such as the position and speed of a target by emitting laser pulses. Its working method is to emit laser pulses to the target object to be detected, and then further analyze the return signal of the target object received, and compare it with the emitted laser pulses, so as to obtain relevant parameters such as the distance and offset angle of the detection target that can reflect position information, that is, point cloud data.
[0004] Currently, the relatively good corner feature extraction methods mainly include line segment segmentation method, mixture of Gaussians method, and image method. The existing mixture of Gaussians method and the method of extracting corners by using image processing methods cannot accurately detect corner features when the surface of the detection object is uneven. At the same time, it also requires the sensor to have a high data acquisition accuracy, and the amount of computation required by the mixture of Gaussians method is also relatively large. The line segment segmentation method uses a method of first segmenting and then aggregating, and is easily affected by the selection of the segmentation threshold, and there will be phenomena such as incomplete segmentation or over-segmentation of data points.
[0005] For point cloud data rich in straight line and corner features, in corner feature extraction, there is a problem that the distance between data points is too close, which is likely to over-extract corner features, resulting in inaccurate corner feature extraction, affecting the further application of corner features. Summary of the Invention
[0006] In order to solve the deficiencies of the prior art, the present application provides a corner feature extraction method, system, electronic device, and computer-readable storage medium, which can identify and extract the corner features of different target objects in different environments, and can effectively and accurately detect and extract the corner features of the object to be detected.
[0007] In the first aspect, the present application provides a corner feature extraction method;
[0008] A corner feature extraction method includes:
[0009] Obtain the point cloud data of the target to be detected, and preprocess the point cloud data;
[0010] Perform data segmentation on the preprocessed point cloud data to obtain a set of suspected corners;
[0011] Obtain the straight-line distance between each suspected corner point in the set of suspected corner points and its adjacent suspected corner points. Based on the straight-line distance between each suspected corner point in the set of suspected corner points and its adjacent suspected corner points, eliminate the over-extracted corner points and extract the corner points.
[0012] In a second aspect, the present application provides a corner feature extraction system;
[0013] A corner feature extraction system includes:
[0014] A preprocessing module, configured to obtain the point cloud data of the target to be detected and preprocess the point cloud data;
[0015] A suspected corner point acquisition module, configured to perform data segmentation on the preprocessed point cloud data to obtain a set of suspected corner points;
[0016] A corner feature extraction module, configured to obtain the straight-line distance between each suspected corner point in the set of suspected corner points and its adjacent suspected corner points. Based on the straight-line distance between each suspected corner point in the set of suspected corner points and its adjacent suspected corner points, eliminate the over-extracted corner points and extract the corner points.
[0017] In a third aspect, the present application provides an electronic device;
[0018] An electronic device includes a memory, a processor, and computer instructions stored on the memory and running on the processor. When the computer instructions are run by the processor, the steps of the above-mentioned corner feature extraction method are completed.
[0019] In a fourth aspect, the present application provides a computer-readable storage medium;
[0020] A computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by a processor, the steps of the above-mentioned corner feature extraction method are completed.
[0021] Compared with the prior art, the beneficial effects of the present application are:
[0022] 1. It can realize the recognition and extraction of corner features of different target objects in different environments, and can effectively and accurately realize the detection and extraction of corner features of the target to be detected;
[0023] 2. It is applicable to scenarios rich in straight lines and corner features, and avoids over-extraction of corner features. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings forming a part of this application are used to provide a further understanding of this application. The schematic embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation to this application.
[0025] Figure 1Schematic flowchart of the corner feature extraction method provided by the embodiments of the present application;
[0026] Figure 2 Schematic diagram of lidar scanning provided by the embodiments of the present application;
[0027] Figure 3 Flowchart for removing abnormal points from point cloud data provided by the present application;
[0028] Figure 4 Schematic diagram of data segmentation provided by the present application;
[0029] Figure 5 Schematic diagram of corner determination provided by the present application. Detailed implementation manners
[0030] It should be noted that the following detailed description is exemplary and is intended to provide further illustration of the present application. Unless otherwise specified, all technical and scientific terms used in the present application have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present application belongs.
[0031] It should be noted that the terms used herein are only for describing specific implementation manners and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular forms are also intended to include the plural forms. In addition, it should be understood that the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0032] In the case of no conflict, the embodiments in the present invention and the features in the embodiments may be combined with each other.
[0033] Embodiment 1
[0034] In the corner feature extraction method in the prior art, the extraction accuracy is low and the phenomenon of over-extraction is likely to occur. Therefore, the present application provides a corner feature extraction method.
[0035] A corner feature extraction method includes:
[0036] Obtain the point cloud data of the target to be detected and preprocess the point cloud data; wherein, the point cloud data of the target to be detected is collected by a lidar to obtain the angle and depth information of the target to be detected. The coordinate information of the point cloud data points can be obtained through the angle and depth information of the data points of the target to be detected, so as to represent the coordinate information of all point cloud data points in a coordinate system, and then further perform the next data processing in the coordinate system.
[0037] Perform data segmentation on the preprocessed point cloud data to obtain a set of suspected corner points;
[0038] Obtain the straight-line distance between each suspected corner point and its adjacent corner points in the set of suspected corner points. Based on the straight-line distance between each suspected corner point and its adjacent suspected corner points in the set of suspected corner points, eliminate the over-extracted corner points and extract the corner points.
[0039] Since the distance values of the data points near the corner points are similar, it is easy to over-extract and extract redundant corner point features. Therefore, it is necessary to eliminate the over-extracted corner points to ensure the accuracy of corner point feature extraction.
[0040] Furthermore, preprocess the point cloud data, including:
[0041] Perform smoothing processing on the point cloud data through the median filtering smoothing algorithm; Since the lidar may encounter obstacles or reflections from transparent objects during the scanning process, which will cause the loss of scanning point data of some objects. Therefore, perform smoothing processing on the point cloud data through the median filtering smoothing algorithm. The distribution of the smoothed point cloud data is more uniform, and it can eliminate the data points that deviate greatly from most of the data points to a certain extent, so that the data points are closer to the actual data positions.
[0042] Obtain a set of outlier data points according to the distance between each data point and other data points in the processed point cloud data; Since the point cloud data may be affected by systematic errors, environmental factors or noise interference from data acquisition equipment during the data acquisition process, which will cause outliers to appear in the point cloud data and interfere with the extraction and application of corner point features. Therefore, it is necessary to find and eliminate the outliers.
[0043] Furthermore, according to the scanning angle resolution of the lidar, the distance between the laser emission point and the scanning point, obtain the misjudged points in the set of outlier data points; Eliminate the outliers in the set of outlier data points. Since misjudgments may occur during the process of determining the outliers, it is necessary to re-check the set of outlier data points to find the misjudged data points.
[0044] Furthermore, perform data segmentation on the preprocessed point cloud data to obtain a set of suspected corner points, including:
[0045] Obtain the line segment between the first data point and the last data point in the point cloud data;
[0046] Set a threshold, obtain the maximum value of the straight-line distance from each data point to the line segment, and judge the relationship between the maximum value and the threshold; Among them, the threshold is determined through multiple experiments according to the scanning resolution of the lidar;
[0047] If the maximum value is greater than the threshold, retain the data point corresponding to the maximum value, and this data point is a suspected corner point;
[0048] Using this data point as a segmentation point, divide the point cloud data into two data point sets, and repeat the above steps until all data points in the data point set are determined, and obtain a set of suspected corner points.
[0049] Furthermore, according to the straight-line distance between each suspected corner point in the set of suspected corner points and its adjacent suspected corner points, eliminate over-extracted corner points. The extraction of corner points includes: setting a threshold, and comparing the straight-line distance between each suspected corner point in the set of suspected corner points and its adjacent suspected corner points with the threshold; if the straight-line distance is greater than the threshold, then this suspected corner point is a corner point; where the threshold is the distance between adjacent points of the lidar scan points obtained based on the angular resolution and depth information of the lidar scan.
[0050] Furthermore, if the straight-line distance is less than the threshold, fit this suspected corner point and the nearest adjacent suspected corner point into a straight line, and fit the suspected corner points with a straight-line distance less than the threshold adjacent to this suspected corner point and the nearest adjacent suspected corner point into a straight line; compare the distances from the suspected corner point and the adjacent suspected corner points with a straight-line distance less than the threshold to the intersection point of the two straight lines. The one with the larger distance value is the corner point, and the one with the smaller distance value is the over-extracted corner point.
[0051] Furthermore, the point cloud data is collected by a lidar.
[0052] Next, combine Figures 1-5 A detailed description of a corner feature extraction method disclosed in this embodiment will be given.
[0053] This embodiment provides a corner feature extraction method.
[0054] A corner feature extraction method includes:
[0055] S1. Obtain the point cloud data of the target to be detected, and preprocess the point cloud data; where the point cloud data of the target to be detected is obtained by scanning the target to be detected with a radar; including:
[0056] S101. Perform data parsing, coordinate transformation and other processing on the point cloud data to obtain a data point set;
[0057] S102. Through the median filtering smoothing algorithm, replace the data point value of each data point in the data point set with the median of the data points within a certain adjacent range, so that the surrounding data values are close to the real values and can eliminate data noise points with large fluctuations;
[0058] S103. Determine whether the data points in the data point set are outliers; specifically, sort the distance values between one data point in the data point set and other data points, calculate the local reachability distance of this data point, and calculate the local reachability density of this data point based on the local reachability distance of this data point; obtain the local outlier factor of this data point based on the average value of the ratio of the local reachability densities of other data points in the data point set to the local reachability density of this data point, and compare the local outlier factor of this data point with a preset K value to determine whether this point is an outlier; where the K value is the local outlier factor value, and the numerical value of K is determined according to multiple previous experiments; repeat step S103 until all outliers in the data point set are found;
[0059] S104. Since in the process of determining outliers, the setting of the K value has no clear definition, and due to the different density degrees of the point cloud data, relatively sparse valid data points may be determined as outliers and excluded. To avoid this situation, in this embodiment, the outliers found in step S103 are further determined;
[0060] According to the scanning principle of the lidar, different lidars have different fixed angular resolutions, so the distances between the scanned data points are also different. As Figure 2 shown, taking the laser emission point of the lidar as the scanning coordinate origin O, the angle between each point of the lidar is α, and the return value of the lidar is the distance value d from the scanning point to the origin O. Therefore, through the distance value d and the scanning angular resolution α, not only the coordinate information of each scanning point can be obtained, but also the distance between two scanning points and the distance from the scanning point to the adjacent scanning line can be obtained;
[0061] Taking three consecutive scanning points in the figure as an example, let the three scanning points be P(i - 1), Pi, and P(i + 1). Let the distance from point P(i - 1) to the line connecting point Pi and the origin O be d1, the distance from point P(i + 1) to the line connecting point Pi and the origin O be d2, the straight-line distance between point P(i - 1) and point Pi be |P(i - 1)Pi|, and the straight-line distance between point P(i + 1) and point Pi be |P(i + 1)Pi|. Through the above definitions, there are the following determination conditions, as shown in the formula:
[0062] T = |P i-1 P i | > λd1 && |P i+1 P i | > λd2
[0063] = |P i-1 P i | > λ|OP i-1 |sinα &&
[0064] |P i+1 Pi |>λ|OP i+1 |sinα
[0065]
[0066] Where λ is a fixed ratio obtained through verification, |OP_(i - 1)| is the straight-line distance between the origin O and point Pi, that is, the distance value returned by lidar scanning. Similarly, |OP_(i + 1)| is the lidar return distance value of point P_(i + 1). The above determination condition is to judge whether point Pi is a true outlier. Then, as long as it is judged whether the straight-line distance between point Pi and its two adjacent points is greater than a certain multiple of the distance from point Pi to the straight lines connecting the two adjacent points to the origin, which is λ times here. If both of the above two conditions are satisfied, it is proved that the point is an outlier; otherwise, the point is a misjudged point.
[0067] Figure 3 It is the flowchart for removing outliers from the data point set. Perform the operation of step S104 on each outlier until all misjudged points are found, and then remove all outliers that do not include misjudged points.
[0068] S2. Perform data segmentation on the preprocessed point cloud data to obtain a set of suspected corner points; including:
[0069] S201. Obtain the line segment between the first data point and the last data point in the point cloud data; Exemplarily, as Figure 4 shown, connect point 1 and point 7, and calculate the straight-line distance values from point 2 to point 6 to the line connecting point 1 and point 7.
[0070] S202. Set a threshold, and judge the magnitude relationship between the maximum distance value from a point to the line connecting the first and last data points and the threshold. If the maximum distance value is less than the threshold, it is determined that all data points in the data point set belong to the same straight line. If the maximum distance value is greater than the threshold, the data point is determined as a suspected corner point and added to the set of corner data points. As Figure 4 (a) The distance value from point 6 to the line connecting the first and last points is the maximum value of the distances from all points in the data point set to the line connecting the first and last points, and the distance value is greater than the distance threshold, then this point is determined as a suspected corner point; where the threshold is
[0071] S203. Use the point with the maximum distance value determined as a suspected corner point as the segmentation point to divide the data point set into two segments of data point sets, as Figure 4(a)'s set of 1-6 broken line segments and 6-7 broken line segments. The set of 1-6 broken line segments includes data point 1, data point 2, data point 3, data point 4, data point 5, and data point 6. The set of 6-7 broken line segments includes data point 6 and data point 7. Then, the data points within the set of 1-6 broken line segments and the set of 6-7 broken line segments are respectively repeated for the operations of step S201 and step S202, and the data point 2 corresponding to the maximum distance value is selected. If the distance from data point 2 to the straight line is greater than the distance threshold, then data point 2 is determined as a suspected corner point and used as a segmentation point to continue to divide the data point set into three segments of data sets, such as Figure 4 (b)'s 1-2, 2-7, 6-7 line segments. And so on until the distances from all data points to the straight line are less than the distance threshold, obtaining the data point set of all suspected corner points.
[0072] S3. Obtain the straight-line distance between each suspected corner point in the set of suspected corner points and its adjacent corner points. According to the straight-line distance between each suspected corner point in the set of suspected corner points and its adjacent corner points, eliminate the over-extracted corner points and extract the corner points. Exemplarily, as Figure 5 shown, if the suspected corner points P1, P2, P3, and P4 are obtained after segmentation, including:
[0073] S301. Sequentially judge the distance values between the four suspected corner points and their adjacent suspected corner points, and compare the distance values with the threshold Dt; if the distance value is greater than the threshold Dt, then determine that this data is an actual corner point and add this point to the corner point data set; if the distance value is less than the threshold Dt, then determine that among the suspected corner points with a distance value less than the threshold Dt adjacent to this suspected corner point, there is one point that is an over-extracted data point; among them, use the width value of the brick scanned by the lidar as the threshold Dt; next, make a judgment through step S302:
[0074] S302. As Figure 5 shown, the distance between points P2 and P3 is less than the threshold Dt. Fit P1, P2 and P3, P4 into two straight lines respectively, and the intersection point of the two straight lines is Px; respectively calculate the straight-line distance d1 between the suspected corner point P2 and the intersection point Px and the straight-line distance d2 between the suspected corner point P3 and the intersection point Px, and compare d1 and d2. If d1 < d2, then the suspected corner point P2 is the actual corner point and P3 is the over-extracted corner point; conversely, P2 is the over-extracted corner point and P3 is the actual corner point.
[0075] Embodiment 2
[0076] This embodiment discloses a corner feature extraction system, including:
[0077] A preprocessing module, used to obtain the point cloud data of the target to be detected and preprocess the point cloud data;
[0078] A suspected corner point acquisition module, which is used to perform data segmentation on the preprocessed point cloud data to obtain a set of suspected corner points;
[0079] A corner point feature extraction module, which is used to obtain the straight-line distance between each suspected corner point in the set of suspected corner points and its adjacent corner points, and based on the straight-line distance between each suspected corner point in the set of suspected corner points and its adjacent corner points, eliminate the over-extracted corner points and extract the corner points.
[0080] It should be noted here that the above preprocessing module, suspected corner point acquisition module, and corner point feature extraction module correspond to the steps in Embodiment 1. The examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules, as part of the system, can be executed in a computer system such as a set of computer-executable instructions.
[0081] Embodiment 3
[0082] Embodiment 3 of the present invention provides an electronic device, including a memory, a processor, and computer instructions stored on the memory and running on the processor. When the computer instructions are run by the processor, the steps of the above corner point feature extraction method are completed.
[0083] Embodiment 4
[0084] Embodiment 4 of the present invention provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the steps of the above corner point feature extraction method are completed.
[0085] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the processes and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0086] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product including an instruction device, and the instruction device implements the functions in Figure 1 one process or multiple processes and / or blocks Figure 1The functions specified in one or more boxes.
[0087] These computer program instructions can also be loaded onto a computer or other programmable data processing device, and a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide for implementing the steps of the functions specified in one or more processes and / or boxes Figure 1 One process or more processes and / or boxes Figure 1 The steps of the functions specified in one or more boxes.
[0088] In the above embodiments, the descriptions of each embodiment have their own focuses. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0089] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.
Claims
1. A method for extracting corner features, characterized in that Including: Obtain the point cloud data of the target to be detected, and preprocess the point cloud data; Perform data segmentation on the preprocessed point cloud data to obtain a set of suspected corner points; Obtain the straight-line distance between each suspected corner point in the set of suspected corner points and its adjacent suspected corner points. According to the straight-line distance between each suspected corner point in the set of suspected corner points and its adjacent suspected corner points, when the straight-line distance is greater than the set threshold, the suspected corner point is determined to be a corner point, and the corner point is extracted; when the distance is less than the threshold, fit the suspected corner point with the nearest adjacent suspected corner point into a straight line, fit the suspected corner points with a straight-line distance less than the threshold adjacent to the suspected corner point with the nearest adjacent suspected corner point into a straight line, compare the distances from the suspected corner point and the suspected corner points with a straight-line distance less than the threshold adjacent to it to the intersection of the two straight lines, the one with the larger distance value is the corner point, and the one with the smaller distance value is the over-extracted corner point. Eliminate the over-extracted corner points and extract the corner points.
2. The corner feature extraction method according to claim 1, wherein The preprocessing of the point cloud data includes: Perform smoothing processing on the point cloud data through a median filtering smoothing algorithm; According to the distance between each data point in the processed point cloud data and other data points, obtain a set of outlier data points.
3. The corner feature extraction method according to claim 2, characterized in that, According to the scanning angle resolution of the lidar, the distance between the laser emission point and the scanning point, obtain the misjudged points in the set of outlier data points; Eliminate the outlier points in the set of outlier data points.
4. The corner feature extraction method according to claim 1, characterized in that, The data segmentation of the preprocessed point cloud data to obtain a set of suspected corner points includes: Obtain the line segment between the first data point and the last data point in the point cloud data; Set a threshold, obtain the maximum value of the straight-line distance from each data point to the line segment, and judge the relationship between the maximum value and the threshold; If the maximum value is greater than the threshold, retain the data point corresponding to the maximum value, and this data point is a suspected corner point; Take this data point as the segmentation point to divide the point cloud data into two sets of data points, and repeat the above steps until all data points in the set of data points are determined, and obtain a set of suspected corner points.
5. The corner feature extraction method according to claim 1, characterized in that, The point cloud data is collected by a lidar.
6. A corner feature extraction system, characterized in that, Including: A preprocessing module for obtaining the point cloud data of the target to be detected and preprocessing the point cloud data; A suspected corner point obtaining module for performing data segmentation on the preprocessed point cloud data to obtain a set of suspected corner points; A corner point feature extraction module for obtaining the straight-line distance between each suspected corner point in the set of suspected corner points and its adjacent suspected corner points. According to the straight-line distance between each suspected corner point in the set of suspected corner points and its adjacent suspected corner points, when the straight-line distance is greater than the set threshold, the suspected corner point is determined to be a corner point, and the corner point is extracted; when the distance is less than the threshold, fit the suspected corner point with the nearest adjacent suspected corner point into a straight line, fit the suspected corner points with a straight-line distance less than the threshold adjacent to the suspected corner point with the nearest adjacent suspected corner point into a straight line, compare the distances from the suspected corner point and the suspected corner points with a straight-line distance less than the threshold adjacent to it to the intersection of the two straight lines, the one with the larger distance value is the corner point, and the one with the smaller distance value is the over-extracted corner point. Eliminate the over-extracted corner points and extract the corner points.
7. An electronic device, characterized in that, Including a memory, a processor, and computer instructions stored on the memory and running on the processor. When the computer instructions are run by the processor, the method described in any one of claims 1-5 is completed.
8. A computer-readable storage medium, characterized in that, For storing computer instructions which, when executed by a processor, implement the method according to any one of claims 1-5.
Citation Information
Patent Citations
Image feature corner extraction method based on Harris operator
CN107909085A
KR20200049390A