Cross section point cloud line segment extraction method and device, equipment and storage medium

By projecting, filtering and line segment extraction on the cross-section point cloud, the problem of low quality line segment extraction of the cross-section point cloud in the existing technology is solved, and line segment extraction of higher quality and completeness is achieved.

CN118587237APending Publication Date: 2024-09-03FENGJIANG AUTOMATION TECH (XIAN) CO LTD

Patent Information

Application Number
CN202311515065.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-14
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

The existing technology can easily lead to data loss, incomplete extraction or errors during the cross-section point cloud line segment extraction process, affecting the quality.

Method used

By projecting the obtained cross-section point cloud, filtering discrete points and noise points, extracting line segments according to the preset line segment extraction strategy, and extending and connecting adjacent line segments to ensure the integrity and accuracy of the extracted cross-section point cloud line segments. .

Benefits of technology

It improves the quality of cross-section point cloud line segments, reduces extraction errors, and ensures the integrity and accuracy of line segments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587237A
    Figure CN118587237A
Patent Text Reader

Abstract

The invention relates to the technical field of point cloud data processing, and provides a cross section point cloud line segment extraction method, device and equipment and a storage medium, and the method comprises the steps: carrying out the projection of an obtained cross section point cloud, and obtaining a point cloud projection which comprises a plurality of points corresponding to the cross section point cloud; filtering the plurality of points to obtain a target point cloud projection; performing line segment extraction on all points in the target point cloud projection according to a preset line segment extraction strategy to obtain a plurality of point cloud projection line segments; determining adjacent line segments in the plurality of point cloud projection line segments, and extending and connecting the adjacent line segments to obtain cross section point cloud projection line segments; and determining a cross-section point cloud line segment based on the cross-section point cloud projection line segment. According to the embodiment of the invention, the method can reduce the extraction error of the cross-section point cloud line segment, guarantees the integrity of the cross-section point cloud line segment, and effectively improves the quality of the cross-section point cloud line segment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of point cloud data processing, and in particular to a method, device, equipment and storage medium for extracting line segments from a cross-section point cloud. Background Art

[0002] Point cloud is a three-dimensional data set composed of a large number of points. It is widely used in computer graphics, computer vision, robotics, autonomous driving, medical treatment and other fields for modeling, analyzing and identifying three-dimensional objects and environments. Each point in the point cloud contains feature information such as spatial position, color information, intensity information, normal vector information, texture information, etc. Cross-sectional point cloud segment extraction refers to determining the line segments representing the shape of the object in three-dimensional space based on the geometric features of the point cloud data. By extracting cross-sectional point cloud segments, it can help identify and segment parts of different objects or scenes, such as roads, vehicles, pedestrians, etc., and can also assist in object surface reconstruction, point cloud feature extraction, interior architecture and design, etc.

[0003] In the related schemes, the indirect method or the direct method is usually used to realize the cross-sectional point cloud segment extraction. Among them, the indirect method is to convert the three-dimensional point cloud into an image with the help of image processing, and use the image algorithm to extract the cross-sectional line segments of the converted image, and then convert the extracted cross-sectional line segments into a point cloud. The direct method is to extract the cross-sectional point cloud line segments directly from the three-dimensional point cloud data. However, if the indirect method is used to extract the cross-sectional point cloud line segments, it is easy to cause the loss of point cloud data when converting the point cloud into an image, and the use of the image algorithm to extract the cross-sectional line segments of the converted image may cause the extracted cross-sectional line segments to be wrong, affecting the quality of the extracted cross-sectional line segments. If the direct method is used to extract the cross-sectional point cloud line segments, due to the direct processing of the point cloud data, it is easy to cause the point cloud to become sparse or change the original position information of the point cloud, which may cause the extracted cross-sectional point cloud line segments to be incomplete or wrong, affecting the quality of the extracted cross-sectional point cloud line segments. Summary of the invention

[0004] In view of this, the present application provides a cross-sectional point cloud line segment extraction method, device, electronic device and storage medium to solve the problem of low quality of cross-sectional point cloud line segment extraction in related solutions.

[0005] A first aspect of an embodiment of the present application provides a cross-sectional point cloud line segment extraction method, which is applied to an electronic device, and the cross-sectional point cloud line segment extraction method includes: projecting the acquired cross-sectional point cloud to obtain a point cloud projection, wherein the point cloud projection includes multiple points corresponding to the cross-sectional point cloud; filtering the multiple points to obtain a target point cloud projection; extracting line segments from all points in the target point cloud projection according to a preset line segment extraction strategy to obtain multiple point cloud projection line segments; determining adjacent line segments in the multiple point cloud projection line segments, and extending and connecting the adjacent line segments to obtain cross-sectional point cloud projection line segments; and determining cross-sectional point cloud line segments based on the cross-sectional point cloud projection line segments.

[0006] In some embodiments, filtering the multiple points to obtain a target point cloud projection includes: filtering discrete points in the point cloud projection based on a first feature extraction algorithm to obtain an initial point cloud projection; filtering noise points in the initial point cloud projection based on a second feature extraction algorithm to obtain the target point cloud projection.

[0007] In some embodiments, filtering the discrete points in the point cloud projection based on the first feature extraction algorithm to obtain an initial point cloud projection includes: clustering the multiple points in the point cloud projection according to preset clustering conditions based on the first feature extraction algorithm, and determining the points in the multiple points that do not meet the preset clustering conditions as the discrete points, filtering out the discrete points, and obtaining multiple groups of point cloud classifications; using the multiple groups of point cloud classifications as the initial point cloud projection.

[0008] In some embodiments, filtering the noise points in the initial point cloud projection based on the second feature extraction algorithm to obtain the target point cloud projection includes: determining the principal components of each group of point cloud classifications in the initial point cloud projection based on the second feature extraction algorithm; treating the points in the point cloud classification corresponding to the principal components that do not meet preset conditions as noise points, filtering out the noise points, and obtaining the target point cloud projection.

[0009] In some embodiments, line segment extraction is performed on all points in the target point cloud projection according to a preset line segment extraction strategy to obtain multiple point cloud projection line segments, including: based on a preset line segment fitting model and a first preset model threshold, line segment extraction is performed on the target point cloud projection to obtain a first point cloud projection line segment; the first point cloud projection line segments are clustered to obtain the multiple point cloud projection line segments.

[0010] In some embodiments, clustering the first point cloud projection line segments to obtain multiple point cloud projection line segments includes: performing point cloud density clustering on the first point cloud projection line segments to determine multiple second point cloud projection line segments; performing line segment extraction on the multiple second point cloud projection line segments based on the preset line segment fitting model and a second preset model threshold to determine the multiple point cloud projection line segments, and the first preset model threshold is greater than the second preset model threshold.

[0011] In some embodiments, determining the adjacent line segments among the multiple point cloud projection line segments includes: determining whether there are intersection points between any two point cloud projection line segments based on the characteristic values ​​of each point in the multiple point cloud projection line segments; if there are intersection points between any two point cloud projection line segments, determining whether there are points between the point closest to the intersection point in each point cloud projection line segment of the any two point cloud projection line segments and the intersection point; if there are points between the point closest to the intersection point in each point cloud projection line segment and the intersection point, determining that the any two point cloud projection line segments are adjacent line segments.

[0012] A second aspect of an embodiment of the present application provides a cross-sectional point cloud line segment extraction device, which is applied to an electronic device, and the cross-sectional point cloud line segment extraction device includes: a projection module, which is used to project the acquired cross-sectional point cloud to obtain a point cloud projection, and the point cloud projection includes multiple points corresponding to the cross-sectional point cloud; a filtering module, which is used to filter the multiple points to obtain a target point cloud projection; an extraction module, which is used to extract line segments from all points in the target point cloud projection according to a preset line segment extraction strategy to obtain multiple point cloud projection line segments; a first determination module, which is used to determine the adjacent line segments in the multiple point cloud projection line segments, and extend and connect the adjacent line segments to obtain the cross-sectional point cloud projection line segments; a second determination module, which is used to determine the cross-sectional point cloud line segments based on the cross-sectional point cloud projection line segments.

[0013] A third aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor implements the above-mentioned cross-section point cloud line segment extraction method when executing the computer-readable instructions.

[0014] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores computer-readable instructions. When the computer-readable instructions are executed by a processor, the above-mentioned cross-section point cloud line segment extraction method is implemented.

[0015] In a method for extracting line segments from a cross-sectional point cloud provided in an embodiment of the present application, a cross-sectional point cloud of an object to be identified (e.g., a building, a road, a vehicle, etc.) is first obtained. In order to obtain all points in the cross-sectional point cloud and process and analyze all points to obtain the cross-sectional line segments corresponding to the cross-sectional point cloud, the present application projects the obtained cross-sectional point cloud onto a two-dimensional plane to obtain a point cloud projection, wherein the point cloud projection includes a plurality of points corresponding to the cross-sectional point cloud, thereby indirectly realizing the processing and analysis of all points in the cross-sectional point cloud by processing and analyzing a plurality of points in the point cloud projection. Since there may be some discrete points and noise points in the cross-sectional point cloud, which affect the extraction of line segments from the cross-sectional point cloud, in the process of extracting line segments from the cross-sectional point cloud, it is necessary to filter a plurality of points in the point cloud projection corresponding to the cross-sectional point cloud to obtain a target point cloud projection. Then, line segments are extracted from all points in the target point cloud projection according to a preset line segment extraction strategy to obtain a plurality of point cloud projection line segments, and adjacent line segments in the plurality of point cloud projection line segments are determined, and the adjacent line segments are extended and connected to obtain the cross-sectional point cloud projection line segments. According to the correspondence between the cross-sectional point cloud and the target point cloud projection, the cross-sectional point cloud line segment corresponding to the cross-sectional point cloud can be determined based on the cross-sectional point cloud projection line segment. A cross-sectional point cloud line segment extraction method provided in an embodiment of the present application reduces the error of cross-sectional point cloud line segment extraction, ensures the integrity of the cross-sectional point cloud line segment, and thus effectively improves the quality of the cross-sectional point cloud line segment. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0017] Figure 1 This is an application scenario diagram of the cross-section point cloud line segment extraction method provided in an embodiment of the present application;

[0018] Figure 2 is a flow chart for implementing the cross-section point cloud line segment extraction method provided in an embodiment of the present application;

[0019] Figure 3 is an example diagram of principal component analysis provided in an embodiment of the present application;

[0020] Figure 4 is another principal component analysis example diagram provided by an embodiment of the present application;

[0021] Figure 5 is another principal component analysis example diagram provided in an embodiment of the present application;

[0022] Figure 6is an example diagram of the expansion algorithm provided in the embodiment of the present application;

[0023] Figure 7 is an example diagram of the corrosion algorithm provided in the embodiment of the present application;

[0024] Figure 8 is a structural schematic diagram of a cross-section point cloud line segment extraction device provided in an embodiment of the present application;

[0025] Fig. 9 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] It should be noted that the terms "first" and "second" in the specification, claims and drawings of the present application are used to distinguish similar objects rather than to describe a specific order or sequence.

[0027] It should also be noted that the method disclosed in the embodiments of the present application or the method shown in the flowchart includes one or more steps for implementing the method. Without departing from the scope of the claims, the execution order of multiple steps can be interchangeable with each other, and some of the steps can also be deleted.

[0028] Some embodiments will be described below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments may be combined with each other.

[0029] In some embodiments, the cross-sectional point cloud segment is one of the manifestations of the contour and shape features of the surface of an object, and can be used to identify, classify and match objects. By analyzing and processing the cross-sectional point cloud segment, important features of the object, such as edges, corners, textures, etc., can be extracted, and these features can be used to identify and classify the object. The cross-sectional point cloud segment can also be used to match with an existing model to identify and classify the object. For example, in the fields of robot navigation and scene reconstruction, object recognition and scene modeling can be achieved by matching the obtained cross-sectional point cloud segments. In addition, by reconstructing the cross-sectional point cloud segment, the three-dimensional shape of the object surface can be restored, and then a three-dimensional model of the entire scene can be constructed. This can provide three-dimensional models for virtual reality, augmented reality, game development and other fields, and can also provide digital protection for archaeology, cultural heritage protection and other fields. By obtaining the cross-sectional point cloud segment, the size of the object can be measured and calculated, such as the length, width, height, etc. of the object. This has important application value in product inspection, building measurement and other fields. In summary, obtaining cross-sectional point cloud segments has important practical significance and can be applied in multiple fields to provide useful information for tasks such as object recognition, classification, matching, measurement, and calculation.

[0030] See also Figure 1As shown in FIG. 1 , it is an application scenario diagram of the cross-section point cloud line segment extraction method provided in an embodiment of the present application, such as Figure 1 As shown, the electronic device 100 is connected to the sensor device 200 for communication. The sensor device 200 is used to obtain the three-dimensional point cloud of the object to be identified (for example, a building, a road, a vehicle, etc.) and perform a plane cut on the three-dimensional point cloud to obtain a cross-sectional point cloud of the three-dimensional point cloud, and send the relevant data of the cross-sectional point cloud of the three-dimensional point cloud to the electronic device 100. The electronic device 100 receives the relevant data of the cross-sectional point cloud of the three-dimensional point cloud sent by the sensor device 200, and can project the obtained cross-sectional point cloud to obtain a point cloud projection. Among them, the point cloud projection includes a plurality of points corresponding to the cross-sectional point cloud, and the electronic device 100 can filter the plurality of points in the point cloud projection, for example, filter out discrete points and noise points, etc., to obtain a target point cloud projection. Then, the electronic device 100 extracts line segments based on all points in the target point cloud projection according to the preset line segment extraction strategy to obtain a plurality of point cloud projection line segments. Considering that in the process of extracting multiple point cloud projection line segments, the electronic device 100 may split the connected adjacent line segments into multiple point cloud projection line segments, the electronic device 100 can determine the adjacent line segments of the multiple point cloud projection line segments after obtaining the multiple point cloud projection line segments, determine the adjacent line segments in the multiple point cloud projection line segments, and then extend and connect the adjacent line segments to obtain the cross-sectional point cloud projection line segments. According to the corresponding relationship between the point cloud projection and the cross-sectional point cloud, the electronic device 100 can determine the cross-sectional point cloud line segments of the cross-sectional point cloud based on the cross-sectional point cloud projection line segments.

[0031] In some embodiments of the present application, the communication connection includes but is not limited to: a wired communication connection or a wireless communication connection. The electronic device 100 can be a computer or any device with an embedded system installed. The sensor device 200 can be any device such as a laser scanner, a depth camera, a binocular camera, etc.

[0032] In other embodiments, the electronic device 100 can be used to obtain a three-dimensional point cloud of an object to be identified (eg, a building, a road, a vehicle, etc.), and perform plane cutting on the three-dimensional point cloud to obtain a cross-sectional point cloud of the three-dimensional point cloud.

[0033] See also Figure 2 The figure is a flowchart of the implementation of the cross-section point cloud line segment extraction method provided in the embodiment of the present application, and the method is applied to electronic devices. Figure 1 The electronic device 100 in the embodiment is taken as an example to illustrate, and the steps are as follows.

[0034] S11: Projecting the acquired cross-sectional point cloud to obtain a point cloud projection, where the point cloud projection includes a plurality of points corresponding to the cross-sectional point cloud.

[0035] In some embodiments, after plane cutting of the three-dimensional point cloud, a cross-sectional point cloud is obtained. The three-dimensional point cloud may be a three-dimensional point cloud of a building, a vehicle, a road, a pedestrian, or a medical device waiting to be identified. The present application embodiment takes the acquisition of a three-dimensional point cloud of a room as an example to illustrate the implementation of the cross-sectional point cloud line segment extraction method provided in the present application embodiment.

[0036] In some embodiments, a cross-sectional point cloud segment refers to a specific cross-sectional segment extracted from three-dimensional point cloud data. These segments can be two-dimensional contours of the surface of an object, and are generally used to analyze and understand the features of an object in three-dimensional point cloud data, perform model matching, scene reconstruction, and measurement and calculation tasks. In the process of extracting cross-sectional point cloud segments, a laser scanner, a depth camera, a binocular camera, and other devices can be used to scan the object to be identified, and obtain the point cloud data corresponding to the object to be identified, thereby obtaining the three-dimensional point cloud corresponding to the object to be identified. A laser scanner, point cloud processing software, etc. can be used to perform plane cutting on the three-dimensional point cloud to obtain the cross-sectional point cloud corresponding to the three-dimensional point cloud. As an example, the section thickness of the cross-sectional point cloud can be set to 0.1m.

[0037] In some embodiments, in order to ensure the data integrity of the cross-sectional point cloud, ensure the accuracy of the extracted cross-sectional point cloud segments, and avoid the dimensionality reduction extraction of the cross-sectional point cloud segments of the three-dimensional point cloud, which may easily cause data loss, and to facilitate the processing and analysis of the points in the cross-sectional point cloud to extract the cross-sectional point cloud segments of the cross-sectional point cloud, the electronic device projects the extracted cross-sectional point cloud parallel to the section to obtain the point cloud projection corresponding to the cross-sectional point cloud, which can be understood as projecting all points in the cross-sectional point cloud to the section. Among them, the point cloud projection includes multiple points corresponding to the cross-sectional point cloud, and each of the multiple points retains the feature data of the corresponding point in the cross-sectional point cloud, such as coordinates, color, texture and other feature data.

[0038] In some embodiments, the point cloud projection can be used as a new point cloud obtained by projecting the cross-sectional point cloud parallel to the section, and the points in the new point cloud are located in a two-dimensional plane, and each point in the new point cloud retains the feature data of the corresponding point in the cross-sectional point cloud. The electronic device processes and analyzes the points in the new point cloud to realize processing and analysis of the points in the corresponding cross-sectional point cloud.

[0039] S12: Filter multiple points to obtain a target point cloud projection.

[0040] In some embodiments, the target point cloud projection is a point cloud composed of the remaining points after filtering out noise points, discrete points, and other points that affect the extraction of cross-sectional point cloud line segments from a plurality of points in the point cloud projection.

[0041] In some embodiments, on the one hand, when a laser scanner or other device is used to perform a plane cutting of a three-dimensional point cloud, some points parallel to the section may be cut into the cross-sectional point cloud. For example, if the cross-sectional point cloud line segments of the three-dimensional point cloud of each wall of a room are to be obtained, the points in the cross-sectional point cloud obtained after plane cutting of the three-dimensional point cloud of each wall should be noise points corresponding to the wall features. However, since the wall may have doors and windows, or murals, etc., when a laser scanner or other device is used to scan each wall of the room to obtain the three-dimensional point cloud of each wall, the doors, windows, murals, etc. set on the wall may be scanned into the three-dimensional point cloud, so that after the three-dimensional point cloud of each wall is plane cut, the cross-sectional point cloud obtained may contain noise points formed by other features (such as door and window features, etc.) in addition to the wall features. On the other hand, when a laser scanner is used to scan the object to be identified (for example, each wall of the room) to obtain the three-dimensional point cloud of the object to be identified, some discrete points may be generated due to environmental influences or equipment reasons. When performing plane cutting on a 3D point cloud, discrete points parallel to the cutting plane may be cut into the cross-sectional point cloud, affecting the extraction of cross-sectional point cloud line segments. Based on the above problems, during the process of extracting cross-sectional point cloud line segments, the electronic device needs to filter out the discrete points and noise points in the cross-sectional point cloud to prevent the discrete points and noise points from affecting the extraction of cross-sectional point cloud line segments.

[0042] In some embodiments, since the point cloud projection includes multiple points corresponding to the cross-sectional point cloud, the electronic device can filter out the discrete points and noise points in the cross-sectional point cloud by filtering out the discrete points and noise points in the multiple points in the point cloud projection. The electronic device uses the point cloud projection after filtering out the discrete points and noise points as the target point cloud projection.

[0043] In some embodiments of the present application, multiple points are filtered to obtain a target point cloud projection, including: filtering discrete points in the point cloud projection based on a first feature extraction algorithm to obtain an initial point cloud projection; filtering noise points in the initial point cloud projection based on a second feature extraction algorithm to obtain a target point cloud projection.

[0044] In some embodiments, the first feature extraction algorithm includes but is not limited to a region-based point cloud clustering algorithm (e.g., a region growing clustering algorithm) for filtering out discrete points in the point cloud projection. The second feature extraction algorithm includes but is not limited to a regional feature extraction algorithm based on a covariance matrix for filtering out noise points in the point cloud projection.

[0045] In some embodiments, the electronic device filters out discrete points and noise in the point cloud projection based on the first feature extraction algorithm and the second feature extraction algorithm to avoid the influence of discrete points and noise on the extraction of cross-sectional point cloud line segments and improve the accuracy of the extraction of cross-sectional point cloud line segments.

[0046] In some embodiments of the present application, discrete points in a point cloud projection are filtered based on a first feature extraction algorithm to obtain an initial point cloud projection, including: clustering multiple points in the point cloud projection according to preset clustering conditions based on the first feature extraction algorithm, and determining points in the multiple points that do not meet the preset clustering conditions as discrete points, filtering out the discrete points, and obtaining multiple groups of point cloud classifications; and using the multiple groups of point cloud classifications as the initial point cloud projection.

[0047] In some embodiments, taking the first feature extraction algorithm as a region growing algorithm as an example, in the process of filtering discrete points in the point cloud projection based on the region growing algorithm, the electronic device selects a starting point from multiple points of the point cloud projection as a seed point and adds it to the seed set. For each seed point, traverse its adjacent points, and determine whether the adjacent point and the corresponding seed point belong to the same category according to the preset clustering condition. If it is determined that the adjacent point and the seed point belong to the same category, the adjacent point can be added to the seed set. For example, the angle between the normal of each adjacent point and the normal of the current seed point is calculated, and the curvature value of each adjacent point is calculated. If it is determined that the angle between the normal of the adjacent point and the normal of the current seed point is less than the preset angle threshold and the curvature value of the adjacent point is less than the preset curvature threshold, it can be determined that the adjacent point and the seed point belong to the same category, and the adjacent point can be added to the seed set. For the adjacent points added to the seed set, continue to traverse its adjacent points and repeat the above steps. When no new adjacent points that meet the preset clustering conditions can be found, the expansion stops, the current category growth ends, and the execution returns to select another starting point from multiple points in the point cloud projection as a seed point to add to the seed set, and start a new clustering until the clustering of multiple points in the point cloud projection is achieved. Through the above steps, the region growing algorithm can divide the point cloud projection into multiple groups of point cloud classifications according to spatial positions, thereby achieving point clustering. Among them, in the clustering process, the electronic device determines the points that do not meet the preset clustering conditions as discrete points, and filters the discrete points from the multiple points in the point cloud projection, and uses the multiple groups of point cloud classifications finally determined as the initial point cloud projection.

[0048] In some embodiments, the preset angle threshold and the preset curvature threshold can be customizable.

[0049] In some embodiments of the present application, noise points in the initial point cloud projection are filtered out based on a second feature extraction algorithm to obtain a target point cloud projection, including: determining the principal components of each group of point cloud classifications in the initial point cloud projection based on the second feature extraction algorithm; treating points in the point cloud classification corresponding to the principal components that do not meet preset conditions as noise points, filtering out the noise points, and obtaining the target point cloud projection.

[0050] In some embodiments, the initial point cloud projection includes multiple groups of point cloud classifications, and the principal components of each group of point cloud classifications include eigenvalues ​​in the x-axis, y-axis, and z-axis directions. The embodiment of the present application takes the second feature extraction algorithm as a local feature extraction algorithm based on the covariance matrix as an example for explanation.

[0051] In some embodiments, principal component analysis is performed on each group of point cloud classifications, that is, a process of finding the main direction of point cloud distribution for each group of point cloud classifications and determining the eigenvalue of the main direction. After determining the main direction of each group of point cloud classifications based on the covariance matrix, the eigenvalue of the corresponding covariance matrix is ​​used as the principal component of each group of point cloud classifications. Specifically, the eigenvalues ​​of the corresponding covariance matrix are arranged in order from large to small, and the eigenvalues ​​of the x-axis, y-axis, and z-axis directions can be determined in turn. Since the eigenvalues ​​of the y-axis and z-axis directions in the principal components of different point cloud classifications are more obvious, the electronic device can determine the point cloud classification with noise by judging whether the eigenvalue of the y-axis direction in the principal component of each group of point cloud classifications is less than or equal to the first preset threshold, and judging whether the eigenvalue of the z-axis direction is less than or equal to the second preset threshold. Specifically, if it is determined that the eigenvalue in the y-axis direction of the principal component of any group of point cloud classifications is greater than a first preset threshold, and / or it is determined that the eigenvalue in the z-axis direction is greater than a second preset threshold, the electronic device determines the points in the group of point cloud classifications as noise points, filters out the noise points, and uses the remaining point cloud projection after all noise points are filtered out as the target point cloud projection.

[0052] In some embodiments, the preset condition includes that the eigenvalue in the y-axis direction of the principal component of the target point cloud classification is less than or equal to the first preset threshold, and the eigenvalue in the z-axis direction is less than or equal to the second preset threshold. Wherein, the target point cloud classification is the point cloud classification corresponding to the cross-sectional point cloud segment to be extracted, the first preset threshold can be set according to the eigenvalue in the y-axis direction of the target point cloud classification, and the second preset threshold can be set according to the eigenvalue in the z-axis direction of the target point cloud classification.

[0053] As an example, see Figures 3 to 5 As shown in FIG. 1 , an example diagram of principal component analysis provided in an embodiment of the present application is shown. Figure 3 and Figure 4 As shown, for any set of point cloud classifications, the process of determining the main direction of point cloud distribution is shown (the figure shows some points in any set of point cloud classifications). Figure 3 and Figure 4In , all points represent point clouds in any set of point cloud classifications, the black straight line represents the main direction of point cloud distribution, and the dotted line represents the distance value from the point cloud in any set of point cloud classifications to the main direction. By performing covariance calculation on the distance values ​​from all point clouds in any set of point cloud classifications to the main direction, the covariance matrix corresponding to any set of point cloud classifications can be obtained. By adjusting the main direction of point cloud distribution, the eigenvalues ​​of the covariance matrix corresponding to any set of point cloud classifications can be determined. The electronic device arranges the eigenvalues ​​from large to small, and the three principal components of the arbitrary set of point cloud classifications can be obtained, such as Figure 5 As shown, the three principal components are λ1, λ2, and λ3 from large to small, respectively, where λ1 represents the eigenvalue of the arbitrary group of point cloud classification in the x-axis direction, λ2 represents the eigenvalue of the arbitrary group of point cloud classification in the y-axis direction, and λ3 represents the eigenvalue of the arbitrary group of point cloud classification in the z-axis direction.

[0054] S13: extracting line segments from all points in the target point cloud projection according to a preset line segment extraction strategy to obtain a plurality of point cloud projection line segments.

[0055] In some embodiments, the preset line segment extraction strategy includes extracting line segments from all points in the target point cloud projection based on the expansion algorithm and the erosion algorithm to obtain multiple point cloud projection line segments. The expansion algorithm and the erosion algorithm can be combined with the following Figure 6 Dilation algorithm example diagram and Figure 7 The erosion algorithm example diagram shown in the figure and the corresponding embodiment content can be understood. Among them, the point cloud projection line segment can be understood as a line segment composed of point clouds, and can also be understood as a line segment composed of multiple points.

[0056] In some embodiments, the expansion algorithm and the erosion algorithm correspond to the same line segment fitting model, but algorithms with different model thresholds, wherein the model threshold corresponding to the expansion algorithm is greater than the model threshold corresponding to the erosion algorithm, and the line segment fitting model may be a random sample consensus algorithm (RANSAC) model. In the process of extracting line segments from the target point cloud projection, in order to avoid the loss of point cloud data affecting the accuracy of line segment extraction, when the electronic device initially obtains the straight line point cloud of all points in the target point cloud projection, the RANSAC model is used to extract the straight line point cloud, and a looser model threshold is set so that the point cloud obtained for the fitted line includes the straight line point cloud and the candidate point cloud of other point clouds, thereby obtaining more points, avoiding the loss of point cloud data, and ensuring the accuracy of the point cloud projection line segment finally obtained. Since the point cloud density corresponding to different points in the candidate point cloud for the fitted line obtained by the electronic device using the RANSAC model with a looser model threshold may be different, after obtaining the candidate point cloud for the fitted line, the candidate point cloud needs to be classified, and the candidate point cloud needs to be divided into multiple segments to obtain multiple line segment point clouds. If the RANSAC model with a looser model threshold is still used for each line segment point cloud to obtain the fitting line segment corresponding to each line segment point cloud, that is, the point cloud projection line segment, the distance from the point in the line segment point cloud to the fitting line segment may be far, which may affect the accuracy of the point cloud projection line segment. Therefore, when using the RANSAC model to obtain the point cloud projection line segment corresponding to each line segment point cloud, the electronic device sets a stricter model threshold to ensure the accuracy of the point cloud projection line segment extraction.

[0057] In some embodiments, the algorithm corresponding to the RANSAC model set to a looser model threshold is regarded as an expansion algorithm, and the algorithm corresponding to the RANSAC model set to a stricter model threshold is regarded as an erosion algorithm.

[0058] In some embodiments of the present application, line segments are extracted from all points in the target point cloud projection according to a preset line segment extraction strategy to obtain multiple point cloud projection line segments, including: based on a preset line segment fitting model and a first preset model threshold, line segment extraction is performed on the target point cloud projection to obtain a first point cloud projection line segment; the first point cloud projection line segment is clustered to obtain multiple point cloud projection line segments.

[0059] In some embodiments, the preset line segment fitting model includes a RANSAC model. The first preset model threshold is set to a looser threshold to obtain more points, avoid point cloud data loss, and ensure the accuracy of multiple point cloud projection line segments obtained subsequently.

[0060] In some embodiments, in the process of extracting line segments from the target point cloud projection based on the RANSAC model and the first preset model threshold to obtain the first point cloud projection line segment, the electronic device randomly selects two points from the target point cloud projection, and uniquely determines a straight line model based on the two randomly selected points. Then, the electronic device substitutes all points in the target point cloud projection into the determined straight line model and calculates the error. From all points in the target point cloud projection, points whose errors are less than or equal to the first preset model threshold are determined as points for fitting the straight line model, and then the electronic device returns to execute the step of randomly selecting two points from the target point cloud projection until the preset number of iterations is reached, and the straight line model with the largest number of points for fitting the straight line model is selected from the determined multiple straight line models as the first target straight line model, and the points for fitting the first target straight line model constitute the first point cloud projection line segment. In the process of obtaining the first point cloud projection line segment, since the first preset model threshold is set to a looser threshold, the point cloud corresponding to the first point cloud projection line segment can contain more points, avoiding the loss of point cloud data, thereby ensuring the accuracy of the multiple point cloud projection line segments subsequently obtained.

[0061] As an example, see Figure 6 As shown, based on the preset line segment fitting model and the first preset model threshold that is set relatively loose, line segments are extracted from the target point cloud projection to obtain the first point cloud projection line segments. This can be likened to a cuboid V1 containing multiple line segment point clouds, which is framed by a longer, wider and thicker cuboid V2, thereby obtaining more points and avoiding the loss of point cloud data.

[0062] In some embodiments, since the first point cloud projection line segment is obtained by the electronic device by extracting line segments from all points in the target point cloud projection based on the RANSAC model and the first preset model threshold, the point cloud density corresponding to different points in the point cloud corresponding to the first point cloud projection line segment may be different. Therefore, after obtaining the first point cloud projection line segment, the electronic device can also perform clustering processing on the first point cloud projection line segment, divide the first point cloud projection line segment into multiple segments, and further perform line segment extraction on each category to obtain multiple point cloud projection line segments corresponding to the target point cloud projection.

[0063] In some embodiments of the present application, the first point cloud projection line segments are clustered to obtain multiple point cloud projection line segments, including: performing point cloud density clustering on the first point cloud projection line segments to determine multiple second point cloud projection line segments; performing line segment extraction on the multiple second point cloud projection line segments based on a preset line segment fitting model and a second preset model threshold to determine multiple point cloud projection line segments, and the first preset model threshold is greater than the second preset model threshold.

[0064] In some embodiments, the electronic device may use a density-based spatial clustering of applications with noise (DBSCAN) algorithm model to perform point cloud density clustering on the first point cloud projection line segments, classify the point clouds according to their density, and group points of similar density into the same cluster, thereby determining multiple second point cloud projection line segments.

[0065] In some embodiments, in the process of using the DBSCAN algorithm model to perform point cloud density clustering on the first point cloud projection line segment and determining multiple second point cloud projection line segments, the electronic device inputs sample data D (x1, x2, ... xn) to the DBSCAN algorithm model and initializes parameters, wherein the sample data D (x1, x2, ... xn) may include all points in the first point cloud projection line segment. The initialization parameters include setting the field radius r and the sample number threshold M. The electronic device initializes the core point set so that the core point set Then, the electronic device iterates each sample data to determine whether the sample data is a core point. The basis for the judgment is to draw a neighborhood of the sample data with the sample data as the center and r as the radius, and judge whether the number of samples in the neighborhood is greater than M. If it is determined that the number of samples in the neighborhood is greater than M, the sample data is added to the core point set. The electronic device initializes the number of clusters k=0. After the electronic device determines the core point set, it iterates through each core point in the core point set, and adds the sample data in the neighborhood corresponding to each core point to the queue corresponding to each core point. If a sample data in the neighborhood corresponding to a core point is also a core point, all sample data in the neighborhood corresponding to the sample data are also added to the queue corresponding to the core point until the queue is empty. The core point and the sample data in the corresponding queue are classified into one cluster. The electronic device traverses each core point in the core point set until all core points are traversed, and the first point cloud projection line segment is classified into multiple second point cloud projection line segments.

[0066] In some embodiments, since the closer the points are, the higher the probability that they are on the same straight line, the overall straight line fitting error can be reduced, thereby improving the accuracy of straight line fitting. If the distance between the points is large, then these farther points may have a greater impact on the fitting result, resulting in an increase in the fitting error. Therefore, in order to improve the accuracy of point cloud projection line segment extraction, the electronic device sets a second preset model threshold that is more stringent (smaller) than the first preset model threshold, and extracts each second point cloud projection line segment based on the RANSAC model and the second preset model threshold, determines the second target straight line model corresponding to each second point cloud projection line segment, and the points in each second point cloud projection line segment that fit the second target straight line model constitute the point cloud projection line segment of each second point cloud projection line segment.

[0067] As an example, see Figure 7 As shown, based on the preset line segment fitting model and the second preset model threshold which is stricter than the first preset model threshold, line segment extraction is performed on multiple second point cloud projection line segments to determine multiple point cloud projection line segments. This can be likened to using a narrower and thinner rectangular parallelepiped V4 to extract the point cloud projection line segments corresponding to the single second point cloud projection line segments from a rectangular parallelepiped V3 containing a single second point cloud projection line segment, so as to obtain higher quality and more accurate point cloud projection line segments and the line segment endpoints of the point cloud projection line segments.

[0068] S14: determining adjacent line segments among the plurality of point cloud projection line segments, and extending and connecting the adjacent line segments to obtain cross-sectional point cloud projection line segments.

[0069] In some embodiments, the adjacent line segments are intersecting and non-coplanar point cloud projection line segments. For example, a laser scanner or the like is used to scan each wall of the room to obtain a three-dimensional point cloud of each wall, and the three-dimensional point cloud of each wall is plane-cut to obtain a cross-sectional point cloud of each wall. According to the multiple point cloud projection line segments that can be determined in steps S11 to S13, the cross-sectional point cloud line segments corresponding to each wall can be determined. However, according to the room structure, the walls may be connected, and there may be adjacent line segments in the corresponding multiple point cloud projection line segments, but they are segmented into different point cloud projection line segments. When analyzing the room structure, it is usually necessary to obtain complete and coherent cross-street point cloud line segments. Therefore, in order to ensure the integrity of the cross-sectional point cloud line segments of the entire room, the electronic device also needs to determine the adjacent line segments in the multiple point cloud projection line segments, and extend and connect the adjacent line segments.

[0070] In some embodiments, in order to ensure the integrity of the cross-sectional point cloud projection line segments corresponding to the finally acquired cross-sectional point cloud, the electronic device needs to further determine the adjacent line segments of multiple point cloud projection line segments, and extend and connect the point cloud projection line segments belonging to the adjacent line segments to obtain the cross-sectional point cloud projection line segments.

[0071] In some embodiments of the present application, determining adjacent line segments in multiple point cloud projection line segments includes: determining whether there is an intersection point between any two point cloud projection line segments based on the characteristic value of each point in the multiple point cloud projection line segments; if there is an intersection point between any two point cloud projection line segments, determining whether there is a point between the point closest to the intersection point in each point cloud projection line segment and the intersection point; if there is a point between the point closest to the intersection point in each point cloud projection line segment and the intersection point, determining that any two point cloud projection line segments are adjacent line segments.

[0072] In some embodiments, in the process of determining the adjacent line segments in the plurality of point cloud projection line segments, the electronic device first determines whether any two point cloud projection line segments, for example, point cloud projection line segment A and point cloud projection line segment B, have an intersection point according to the characteristic value of each point in the plurality of point cloud projection line segments. The electronic device may traverse the points in the point cloud projection line segment A and the point cloud projection line segment, and determine whether there is a point that belongs to both the point cloud projection line segment A and the point cloud projection line segment B according to the characteristic value of each point in the point cloud projection line segment A and the point cloud projection line segment B. If it is determined that there is a point that belongs to both the point cloud projection line segment A and the point cloud projection line segment B, it is determined that the point cloud projection line segment A and the point cloud projection line segment B have an intersection point.

[0073] In some embodiments, since the intersection point between point cloud projection line segment A and point cloud projection line segment B may be a point with different features from the cross-sectional point cloud segment, for example, point cloud projection line segment A and point cloud projection line segment B correspond to the cross-sectional point cloud segments of two walls respectively, but the intersection point between point cloud projection line segment A and point cloud projection line segment B is a feature point corresponding to a column between the walls corresponding to point cloud projection line segment A and point cloud projection line segment B, at this time, there is no point between the point in point cloud projection line segment A that is closest to the intersection point and the intersection point, and there is no point between the point in point cloud projection line segment B that is closest to the intersection point and the intersection point, and point cloud projection line segment A and point cloud projection line segment B are non-adjacent edge segments. Therefore, determining that point cloud projection line segment A and point cloud projection line segment B have an intersection point does not determine that point cloud projection line segment A and point cloud projection line segment B are adjacent edge segments. The electronic device also needs to determine whether there is a point between the point closest to the intersection point in point cloud projection line segment A and the intersection point, and whether there is a point between the point closest to the intersection point in point cloud projection line segment B and the intersection point. If point cloud projection line segment A and point cloud projection line segment B are adjacent edge segments, then there are points between the point closest to the intersection point in point cloud projection line segment A and the intersection point, and between the point closest to the intersection point in point cloud projection line segment B and the intersection point. If there is no point between the point closest to the intersection point in point cloud projection line segment A and the intersection point, or there is no point between the point closest to the intersection point in point cloud projection line segment B and the intersection point, then point cloud projection line segment A and point cloud projection line segment B are determined to be non-adjacent edge segments.

[0074] S15: Determine the cross-sectional point cloud line segment based on the cross-sectional point cloud projection line segment.

[0075] In some embodiments, since the cross-sectional point cloud projection line segment is the projection line segment of the cross-sectional point cloud line segment of the three-dimensional point cloud, after determining the cross-sectional point cloud projection line segment, the electronic device can determine the cross-sectional point cloud line segment of the three-dimensional point cloud based on the correspondence between the cross-sectional point cloud projection line segment and the cross-sectional line segment.

[0076] In a method for extracting line segments from a cross-sectional point cloud provided in an embodiment of the present application, a cross-sectional point cloud of an object to be identified (e.g., a building, a road, a vehicle, etc.) is first obtained. In order to obtain all points in the cross-sectional point cloud and process and analyze all points to obtain the cross-sectional line segments corresponding to the cross-sectional point cloud, the present application projects the obtained cross-sectional point cloud onto a two-dimensional plane to obtain a point cloud projection, wherein the point cloud projection includes a plurality of points corresponding to the cross-sectional point cloud, thereby indirectly realizing the processing and analysis of all points in the cross-sectional point cloud by processing and analyzing a plurality of points in the point cloud projection. Since there may be some discrete points and noise points in the cross-sectional point cloud, which affect the extraction of line segments from the cross-sectional point cloud, in the process of extracting line segments from the cross-sectional point cloud, it is necessary to filter a plurality of points in the point cloud projection corresponding to the cross-sectional point cloud to obtain a target point cloud projection. Then, line segments are extracted from all points in the target point cloud projection according to a preset line segment extraction strategy to obtain a plurality of point cloud projection line segments, and adjacent line segments in the plurality of point cloud projection line segments are determined, and the adjacent line segments are extended and connected to obtain the cross-sectional point cloud projection line segments. According to the correspondence between the cross-sectional point cloud and the target point cloud projection, the cross-sectional point cloud line segment corresponding to the cross-sectional point cloud can be determined based on the cross-sectional point cloud projection line segment. A cross-sectional point cloud line segment extraction method provided in an embodiment of the present application reduces the error of cross-sectional point cloud line segment extraction, ensures the integrity of the cross-sectional point cloud line segment, and thus effectively improves the quality of the cross-sectional point cloud line segment.

[0077] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0078] In one embodiment of the present application, a cross-section point cloud line segment extraction device 800 is provided, and the functions that can be implemented by the cross-section point cloud line segment extraction device 800 correspond one-to-one to the cross-section point cloud line segment extraction method in the above embodiment. Figure 8As shown, the cross-sectional point cloud line segment extraction device 800 includes a projection module 801, a filtering module 802, an extraction module 803, a first determination module 804 and a second determination module 805. The functional modules are described in detail as follows: the projection module 801 is used to project the acquired cross-sectional point cloud to obtain a point cloud projection, and the point cloud projection includes a plurality of points corresponding to the cross-sectional point cloud; the filtering module 802 is used to filter a plurality of points to obtain a target point cloud projection; the extraction module 803 is used to extract line segments from all points in the target point cloud projection according to a preset line segment extraction strategy to obtain a plurality of point cloud projection line segments; the first determination module 804 is used to determine the adjacent line segments in the plurality of point cloud projection line segments, and extend and connect the adjacent line segments to obtain the cross-sectional point cloud projection line segments; the second determination module 805 is used to determine the cross-sectional point cloud line segments based on the cross-sectional point cloud projection line segments.

[0079] For the specific definition of the cross-sectional point cloud line segment extraction device 800, please refer to the definition of the cross-sectional point cloud line segment extraction method above, which will not be repeated here. Each module in the above-mentioned cross-sectional point cloud line segment extraction device 800 can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0080] See also Fig. 9 , which is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 100 can be a computer or any device with an embedded system installed. The network in which the electronic device 100 is located includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.

[0081] like Fig. 9 As shown, the electronic device 100 includes a communication module 101, a memory 102, a processor 103, an input / output (I / O) interface 104 and a bus 105. The processor 103 is coupled to the communication module 101, the memory 102 and the I / O interface 104 through the bus 105.

[0082] The communication module 101 may be a wireless communication module or a mobile communication module. The wireless communication module may provide wireless communication solutions including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., applied to the electronic device 100. The mobile communication module may provide wireless communication solutions including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100.

[0083] The memory 102 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM). The random access memory can be directly read and written by the processor 103, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data. The random access memory may include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.

[0084] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 103. The non-volatile memory may include a disk storage device and a flash memory.

[0085] The memory 102 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 103. The one or more computer programs include multiple instructions. When the multiple instructions are executed by the processor 103, the cross-section point cloud line segment extraction method executed on the electronic device 100 can be implemented.

[0086] In other embodiments, the electronic device 100 further includes an external memory interface for connecting to an external memory to expand the storage capacity of the electronic device 100 .

[0087] The processor 103 may include one or more processing units, for example, the processor 103 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0088] The processor 103 provides computing and control capabilities. For example, the processor 103 is used to execute a computer program stored in the memory 102 to implement the above-mentioned cross-section point cloud line segment extraction method.

[0089] The I / O interface 104 is used to provide a channel for user input or output. For example, the I / O interface 104 can be used to connect various input and output devices, such as a mouse, keyboard, touch device, display screen, etc., so that the user can enter information or visualize information.

[0090] The bus 105 is at least used to provide a channel for mutual communication among the communication module 101 , the memory 102 , the processor 103 , and the I / O interface 104 in the electronic device 100 .

[0091] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0092] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the cross-sectional point cloud segment extraction method in the above-mentioned embodiments of the present application.

[0093] The computer-readable storage medium may be an internal memory of the electronic device described in the above embodiment, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device.

[0094] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the electronic device, etc.

[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.

Claims

1. A method for extracting line segments from a cross-sectional point cloud, applied to electronic equipment, characterized in that: The cross-section point cloud line segment extraction method comprises: Projecting the acquired cross-sectional point cloud to obtain a point cloud projection, wherein the point cloud projection includes a plurality of points corresponding to the cross-sectional point cloud; Filtering the multiple points to obtain a target point cloud projection; Extract line segments from all points in the target point cloud projection according to a preset line segment extraction strategy to obtain multiple point cloud projection line segments; Determine adjacent line segments among the plurality of point cloud projection line segments, and extend and connect the adjacent line segments to obtain cross-sectional point cloud projection line segments; A cross-sectional point cloud line segment is determined based on the cross-sectional point cloud projection line segment.

2. The cross-sectional point cloud line segment extraction method according to claim 1, characterized in that: The filtering of the plurality of points to obtain a target point cloud projection includes: Filtering the discrete points in the point cloud projection based on a first feature extraction algorithm to obtain an initial point cloud projection; Noise points in the initial point cloud projection are filtered based on a second feature extraction algorithm to obtain the target point cloud projection.

3. The cross-sectional point cloud line segment extraction method according to claim 2, characterized in that: The filtering of the discrete points in the point cloud projection based on the first feature extraction algorithm to obtain an initial point cloud projection includes: Based on the first feature extraction algorithm, clustering the multiple points in the point cloud projection according to a preset clustering condition, determining the points in the multiple points that do not meet the preset clustering condition as the discrete points, filtering out the discrete points, and obtaining multiple groups of point cloud classifications; The multiple groups of point clouds are classified as the initial point cloud projections.

4. The cross-sectional point cloud line segment extraction method according to claim 3, characterized in that: The filtering of noise points in the initial point cloud projection based on the second feature extraction algorithm to obtain the target point cloud projection includes: Determine the principal component of each group of point cloud classification in the initial point cloud projection based on the second feature extraction algorithm; Points in the point cloud classification corresponding to the principal components that do not meet the preset conditions are regarded as noise points, and the noise points are filtered out to obtain the target point cloud projection.

5. The cross-sectional point cloud line segment extraction method according to claim 1, characterized in that: The line segment extraction is performed on all points in the target point cloud projection according to a preset line segment extraction strategy to obtain a plurality of point cloud projection line segments, including: Based on a preset line segment fitting model and a first preset model threshold, extracting line segments from the target point cloud projection to obtain first point cloud projection line segments; The first point cloud projection line segments are clustered to obtain the plurality of point cloud projection line segments.

6. The method for extracting line segments from a cross-sectional point cloud according to claim 5, wherein: The clustering of the first point cloud projection line segments to obtain a plurality of point cloud projection line segments includes: Performing point cloud density clustering on the first point cloud projection line segments to determine a plurality of second point cloud projection line segments; Based on the preset line segment fitting model and a second preset model threshold, line segment extraction is performed on the plurality of second point cloud projection line segments to determine the plurality of point cloud projection line segments, and the first preset model threshold is greater than the second preset model threshold.

7. The method for extracting line segments from a cross-sectional point cloud according to claim 1, wherein: The step of determining the adjacent line segments among the plurality of point cloud projection line segments comprises: Determine whether any two point cloud projection line segments have an intersection point according to the characteristic value of each point in the plurality of point cloud projection line segments; If there is an intersection point between any two point cloud projection line segments, determine whether there is a point between the point closest to the intersection point in each of the two point cloud projection line segments and the intersection point; If there is a point between the point closest to the intersection point in each point cloud projection line segment and the intersection point, it is determined that the arbitrary two point cloud projection line segments are adjacent line segments.

8. A cross-section point cloud line segment extraction device, applied to electronic equipment, characterized in that: The cross-section point cloud line segment extraction device comprises: A projection module, used to project the acquired cross-sectional point cloud to obtain a point cloud projection, wherein the point cloud projection includes a plurality of points corresponding to the cross-sectional point cloud; A filtering module, used for filtering the multiple points to obtain a target point cloud projection; An extraction module, used to extract line segments from all points in the target point cloud projection according to a preset line segment extraction strategy to obtain a plurality of point cloud projection line segments; A first determination module is used to determine adjacent line segments among the plurality of point cloud projection line segments, and extend and connect the adjacent line segments to obtain cross-sectional point cloud projection line segments; The second determination module is used to determine the cross-sectional point cloud line segment based on the cross-sectional point cloud projection line segment.

9. An electronic device comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, characterized in that: When the computer-readable instructions are executed by a processor, the cross-sectional point cloud line segment extraction method as described in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the cross-sectional point cloud line segment extraction method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Tunnel back-break detection method based on laser-point cloud

    CN106401643A

  • Multi-floor indoor structured three-dimensional modeling method and system based on laser point cloud

    CN110189412A

  • 3D image edge point cloud extraction method and device, and computer storage medium

    CN111815637A

  • Building point cloud segmentation and vector contour line extraction method and device

    CN116485821A

Cited By

  • Road infrastructure BIM model reverse construction method based on data fusion

    CN120874202A