Automatic Extraction and Measurement Method of Planar Quadrilateral Contour Based on Colored Scattered Point Clouds

By using preprocessing of color disordered point clouds and two-dimensional image processing methods, planar quadrilaterals in three-dimensional space are automatically extracted and measured, solving the problems of noise sensitivity and insufficient automation in existing technologies, and realizing efficient and accurate quadrilateral extraction and measurement.

CN119722592BActive Publication Date: 2026-06-30YANSHAN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
YANSHAN UNIV
Filing Date
2024-12-03
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing technologies for automatically extracting and measuring planar quadrilaterals from point cloud data suffer from problems such as high noise sensitivity, insufficient line recognition accuracy, large quadrilateral fitting errors, and limited automation, especially in complex scenarios where a large amount of manual intervention is required.

Method used

By preprocessing the colored disordered point cloud, using the region growing algorithm and region merging to segment the plane, combined with two-dimensional image processing methods to extract the contour and perform three-dimensional line segment fitting, the included angle and distance of adjacent edge pairs are calculated, and the length, width and side length of the three-dimensional quadrilateral are automatically identified and measured.

Benefits of technology

It enables automated and accurate extraction and measurement of planar quadrilaterals in various environmental scenarios, reducing manual intervention and improving processing efficiency and computing resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119722592B_ABST
    Figure CN119722592B_ABST
Patent Text Reader

Abstract

This invention provides an automatic extraction and measurement method for planar quadrilateral contours based on colored scattered point clouds, belonging to the field of point cloud feature segmentation and point cloud measurement technology. The method involves segmenting the point cloud into multiple three-dimensional planes and projecting all points onto these planes to form a two-dimensional image. Contours are extracted from this two-dimensional image, and then two-dimensional line segments are fitted to these extracted contours. Finally, the corresponding three-dimensional point cloud line segments are calculated by inversely solving these two-dimensional line segments. All adjacent edge pairs are selected by analyzing the angles and distances between pairs of lines. The number of overlapping edges in every four adjacent edge pairs determines the quadrilaterals on the same plane. The length and width of the extracted planar quadrilaterals are measured by the distances between opposite edges. This method can automatically extract and measure the contours of planar quadrilaterals in three-dimensional space using colored disordered point clouds. It is applicable to various environmental scenarios, has good flexibility and portability, and can facilitate subsequent detection tasks of different types.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of point cloud feature segmentation and point cloud measurement technology, specifically involving an automatic measurement algorithm for extracting contour lines from point clouds, extracting quadrilaterals, segmenting them, and measuring their length, width, and side length. Background Technology

[0002] With the continuous advancement of 3D scanning technology, the application of point cloud data has gradually penetrated into various fields such as engineering surveying, architectural modeling, manufacturing, and shipbuilding. Point cloud data can describe in detail the spatial geometric information of an object's surface and is widely used in tasks such as precise measurement of ship cabins, geometric analysis of building doors and windows, and planar contour detection of building walls. Therefore, how to extract accurate geometric shapes from point cloud data, especially the quadrilateral contours on the same plane in 3D space, has become crucial for automated modeling and measurement.

[0003] Currently, the main methods for extracting and measuring planar quadrilaterals from point cloud data can be categorized into several types: image stitching-based methods, edge detection and line fitting-based methods, plane segmentation and projection-based methods, and deep learning-based methods. However, these methods face some challenges in practical applications, exhibiting the following shortcomings when automatically extracting planar quadrilaterals from point clouds: high sensitivity to noise, insufficient line recognition accuracy, large quadrilateral fitting errors, and limited automation.

[0004] This method primarily addresses the limited automation of current methods for automatically extracting and measuring quadrilaterals in space. Most existing methods still require manual intervention when handling complex scenarios, such as manually selecting initial points or setting threshold parameters (as in the patent). This reduces automation and increases operational complexity and time costs. In ship cabin measurements, the complex cabin structure, limited operating space, and surface curvature increase the difficulty of point cloud data processing. In the measurement of building exterior and interior walls, factors such as reflection noise and material differences can also lead to high data noise, increasing the complexity of subsequent quadrilateral recognition. For example, patent CN202210403924.0, a cabinet recognition method based on laser point clouds, identifies the cabinet outline based on the ratio of the convex hull area corresponding to the contour point set to the area of ​​the smallest bounding rectangle. This method is only suitable when the input point cloud contains only rectangular cabinets, is sensitive to noise which affects the accurate calculation of the convex hull, and in practical applications, the cabinet may be partially occluded, resulting in incomplete point cloud data and requiring manual supplementation or correction of the occluded parts. Alternatively, there is the patent CN202211030151.2, which describes a method for locating and segmenting train carriages based on point cloud voxel rectangular grids. This method uses the rectangular gridding of planar point clouds to restrict coordinate values ​​to determine the location. This method relies on regular shapes and coordinate constraints, and is also susceptible to noise. It also requires manual handling of occlusion and missing data, and the algorithm has limited scalability. It may perform well when processing specific types of train carriage structures, but it is difficult to extend to general planar quadrilateral recognition and segmentation tasks.

[0005] In summary, although existing methods have made some progress in segmenting and measuring the contour length of planar quadrilaterals in point clouds, significant shortcomings remain in noise handling, recognition accuracy, fitting accuracy, automation level, and algorithm scalability. In industrial applications, such as the geometric measurement of ship cabins, building doors, windows, and walls, automated segmentation and measurement still rely heavily on manual intervention. Therefore, a more efficient and highly automated method is urgently needed to achieve efficient and accurate automatic extraction and measurement of planar quadrilaterals, reducing manual intervention and improving the processing efficiency of complex scenes. Summary of the Invention

[0006] The main purpose of this invention is to disclose an automatic extraction and measurement method for planar quadrilateral contours based on colored random point clouds. This method can automatically extract and measure the contours of planar quadrilaterals in three-dimensional space using colored random point clouds. It is applicable to various environmental scenarios, has good flexibility and portability, and can provide convenience for subsequent detection tasks of different types.

[0007] To achieve the above objectives and overcome the shortcomings of existing methods, the technical solution adopted in this invention mainly includes the following steps:

[0008] Step 1: Preprocess the input complete color unordered point cloud data. Filter the point cloud to remove discrete points, noise points, and invalid points lacking effective information. Filter out isolated or outlier points that cannot form a valid geometric structure with the main point group to improve the accuracy and stability of subsequent processing.

[0009] Step 2: Extract the 3D line segments from the processed colored disordered point cloud.

[0010] Step 2.1: Using a region growing algorithm, the point cloud is segmented according to proximity and surface normals to create connected regions. These regions represent different 3D planes. Then, a region merging method can be applied to merge neighboring and parallel planes based on their similarity to obtain multiple segmented point cloud planes.

[0011] Step 2.2: Next, orthogonally project all points belonging to each plane onto its own plane, and convert them into a binary image through a meshing process based on plane adaptive parameters. This is done using the center point P of plane Π. c This point is the average of all its constituent points. Project the first point in Π (denoted as P0) onto the plane; the projected point is denoted as P′0. Set as the x-axis, its direction is from P c Pointing to P′0. The positive direction of the x-axis is denoted as v. x The positive direction of the y-axis can be calculated by v. y =v x ×n Π Obtained using center point P. c The positive directions of the x-axis and y-axis, and the two-dimensional plane coordinates P of each point. i (x i ,y i It can be calculated using the following formula:

[0012]

[0013] Step 2.3: Then, use other common image processing methods in OpenCV such as FindContours, Canny edge detection, and Sobel operator to extract contours from the obtained image, and fit the extracted image contours with least squares to obtain two-dimensional line segments.

[0014] Step 2.4: By solving the formula in step 2.2 in reverse, these two-dimensional line segments are projected back onto the original three-dimensional plane to obtain the corresponding three-dimensional point cloud line segments. The adjacent line segments are then merged to obtain the three-dimensional line segments of the colored disordered point cloud.

[0015] Step 3: Obtain the set of all possible adjacent edge pairs formed by straight lines. Calculate the orientation of the point cloud of the line segments obtained in Step 2, and obtain the fitted line vector for each line. From all extracted 3D line segments, select two lines to form a line pair. Traverse all possible line pairs by combination, ensuring that each pair of lines participates in the angle calculation. Calculate the angle between any two lines d. k and d l (where k≠l), calculate the included angle θ between them. k :

[0016]

[0017] Where · represents the dot product of vectors, and ∥d k || represents the norm of a vector. Determine the included angle θ. kl Whether it is within the vertical range, i.e., θ kl satisfy: ε is an adjustable factor, and its value can be increased when the point cloud data is incomplete or the straight line fitting is inaccurate.

[0018] To calculate the distance between two straight lines, a kdtree index is built using any straight line point cloud in a set of adjacent edge point clouds as the starting point cloud. The kdtree is used to find the minimum and maximum distances of the points and calculate the average distance. If the distance is within a set range, they are considered as a pair of adjacent edges.

[0019] Step 4: Obtain the set of 3D quadrilaterals. In the set of adjacent pairs obtained in Step 3, if the number of times each pair of adjacent sides has overlapping lines is greater than or equal to a predetermined value, then these four adjacent pairs are considered a quadrilateral. Let S be the set of all adjacent pairs. For any four adjacent sides (e1,e2,e3,e4)∈S, define a function f(e1,e2,e3,e4) to represent the number of adjacent pairs with overlapping lines. If f(e1,e2,e3,e4)≥α, then we consider (e1,e2,e3,e4) as a quadrilateral, where α is an adjustable factor; in a complete point cloud, α=4, and in an incomplete point cloud, α=3. By traversing all possible combinations of (e1,e2,e3,e4), we can obtain the set of all quadrilaterals in 3D space.

[0020] Step 5: Automatically measure the length, width, and side length of the quadrilateral. Using the four line point clouds obtained in Step 4 that can form a quadrilateral, each pair of parallel line point clouds is considered an opposite side group. Calculate the average distance between the opposite side group point clouds to obtain its length and width. Measure and calculate the length of each line point cloud to obtain its side length.

[0021] Due to the adoption of the above technical solution, the technical effects achieved by the present invention are as follows:

[0022] This invention is based on automatic extraction and measurement of colored disordered point clouds, which can adapt to various environmental scenarios, has strong flexibility and portability, and can process different types of point cloud data, thus solving the limitations of existing technologies that are restricted by specific environments or hardware.

[0023] This invention simplifies the complex processing of 3D point cloud data in traditional methods by extracting the contours of 2D images and fitting line segments, thereby improving computational efficiency and reducing the consumption of computing resources.

[0024] This invention automatically segments colored scattered point cloud data into multiple three-dimensional planes and projects them onto a two-dimensional image for contour extraction, greatly reducing manual intervention and improving data processing efficiency. Attached Figure Description

[0025] Figure 1 A flowchart for extracting the outline of a planar quadrilateral in three-dimensional space;

[0026] Figure 2 A schematic diagram illustrating the process of projecting a three-dimensional planar point cloud of a ship onto a two-dimensional planar coordinate system.

[0027] Figure 3 A schematic diagram of the straight line contour during the transformation process in a ship point cloud;

[0028] Figure 4 A schematic diagram of the three-dimensional straight line contour extracted from the point cloud of a ship;

[0029] Figure 5 This is a diagram illustrating adjacent edge pairs;

[0030] Figure 6 This is a schematic diagram for calculating the distance between any two lines.

[0031] Figure 7 This is a diagram illustrating the number of overlapping adjacent edges.

[0032] Figure 8 A schematic diagram of the planar quadrilateral extraction results from ship point clouds;

[0033] Figure 9 This is a flowchart of the automatic extraction and measurement method for planar quadrilateral contours based on colored scattered point clouds, as described in this application. Detailed Implementation

[0034] The specific implementation method of the present invention will be described in detail below with reference to the accompanying drawings.

[0035] This embodiment will detail the process of automatically extracting the cabin outline and measuring its length using a complete ship's colored disordered point cloud. The process of extracting the three-dimensional quadrilateral is as follows: Figure 1As shown, this invention mainly obtains multiple three-dimensional planes through region expansion and region merging. These planes are then projected in three directions. Two-dimensional contour features are extracted from the projected planes and fitted to two-dimensional straight lines to reconstruct the three-dimensional point cloud, thus obtaining the point cloud's straight line contour. Using the number of coincidences of adjacent edge pairs in the point cloud contour lines as a criterion, the planar quadrilateral contours in the disordered point cloud are extracted, ultimately achieving automatic measurement of three-dimensional quadrilaterals in the point cloud.

[0036] Step 1: Input the complete ship color disordered point cloud and preprocess it, using radius filtering and discrete point removal algorithms to remove discrete points, and using depth filtering or voxel mesh filtering to remove invalid points;

[0037] Step 2: Extract the 3D line segments from the processed colored disordered point cloud.

[0038] Step 2.1: Divide the point cloud into multiple 3D planes through region expansion and region merging.

[0039] Step 2.2: Next, orthogonally project all points belonging to each plane onto its own plane, and convert them into a binary image through a meshing process based on plane adaptive parameters, as shown below. Figure 3 (a). The coordinate transformations are as follows: Figure 2 As shown. First, calculate the center point P of plane Π. c This point is the average of all its constituent points. Project the first point in Π (denoted as P0) onto the plane; the projected point is denoted as P′0. Set as the x-axis, its direction is from P c Pointing to P′0. The positive direction of the x-axis is denoted as v. x The positive direction of the y-axis can be calculated by v. y =v x ×n Π Obtained using center point P. c The positive directions of the x-axis and y-axis, and the 2D planar coordinates P of each point. i (x i ,y i It can be calculated using the following formula:

[0040]

[0041] Step 2.3: Then, use the FindContours function in OpenCV to extract contours from the obtained image, and perform least-squares fitting on the extracted image contours to obtain two-dimensional line segments, such as... Figure 3 (b)

[0042] Step 2.4: By reversing the solution of the formula in Step 2.2, these two-dimensional line segments are projected back onto the original three-dimensional plane to obtain the corresponding three-dimensional point cloud line segments. Adjacent line segments are then merged to finally obtain the contour line segment point cloud extracted from the color point cloud, as shown below. Figure 3 As shown in (c), the final schematic diagram of the three-dimensional straight line contour extracted from the ship point cloud is as follows. Figure 4 As shown.

[0043] Step 3: Obtain the set of all possible adjacent edge pairs formed by the lines. For example... Figure 5 As shown, when the point cloud data is complete and the fitting is good, a pair of point cloud lines that are adjacent edges can be fitted as shown in figure a. The entire point cloud can be represented as P. i =(x i ,y i ,z i For each point cloud line segment, i = 1, 2, ..., N, the direction vector d of the line is fitted using various methods such as least squares method and RANSAC. k , where k = 1, 2, ..., M.

[0044] For any two straight lines d k and d l (where k≠l), calculate the included angle θ between them. k :

[0045]

[0046] Where · represents the dot product of vectors, and ∥d k || represents the norm of a vector. Determine the included angle θ. kl Whether it is within the vertical range, i.e., θ kl satisfy: The two lines are then considered perpendicular. If the point cloud data is incomplete or the line fitting is inaccurate, the ε value can be increased.

[0047] Calculate the distance between two perpendicular lines. If the distance is less than 0.1 meters, they are considered an adjacent pair. The process for averaging the distance between adjacent pairs is as follows: Using any line point cloud in the pair of adjacent pairs as the starting point cloud, create a kd-tree index. Use the kd-tree to find the minimum and maximum distances between points, and calculate the average. Figure 6 As shown.

[0048] Step 4: Obtain the set of 3D quadrilaterals. For example... Figure 7In graph a, (e1, e2) and (e3, e4) have no overlapping edges, meaning the overlap number is 0, which does not meet the condition. Similarly, in graph b, (e1, e2) and (e3, e4) have no overlapping edges, meaning the overlap number is 0, which also does not meet the condition. However, when the number of times every pair of four adjacent edges in the obtained set of adjacent pairs has overlapping lines is greater than or equal to 3 or 4, then... Figure 7 As shown in Figure c, these four adjacent pairs must form a quadrilateral on the same plane in three-dimensional space. By traversing this process, the set of planar quadrilaterals in three-dimensional space can be obtained. The final set of planar quadrilaterals obtained from the ship is as follows: Figure 8 .

[0049] Step 5: Automatically measure the length, width, and side length of the quadrilateral. Using the four line point clouds obtained in Step 4 that can form a quadrilateral, each pair of parallel line point clouds is considered as an opposite side group. The average distance between the opposite side group point clouds is used to obtain its length and width. Measuring the length of each line point cloud yields its side length. This achieves accurate extraction and measurement of the planar quadrilateral outline from the point cloud.

[0050] This specification provides detailed implementation methods and specific operating procedures based on the control scheme of the present invention. However, the present invention is not limited to the above implementation methods, and therefore the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for automatic extraction and measurement of planar quadrilateral contours based on colored scattered point clouds, characterized in that... Includes the following steps: Step 1: Preprocess the input complete color scattered point cloud by removing discrete and invalid points based on distance and voxel volume; Step 2: Extract the 3D line segments from the processed colored scattered point cloud; Specifically, it includes: 2.1 The point cloud is segmented into multiple 3D planes through region expansion and region merging; 2.2 Project all points belonging to each plane orthogonally onto the plane itself to form a two-dimensional image; Specifically, this involves orthogonally projecting all points belonging to each plane onto its own plane, and then converting them into a binary image through a meshing process based on plane adaptive parameters; utilizing the plane center point This point is the average of all its constituent points; The first point in the middle is denoted as Projected onto a plane, the projection point is denoted as . ;Will Set as the x-axis, its direction is from point to The positive direction of the x-axis is denoted as The positive direction of the y-axis is calculated... Obtain; utilize the center point The positive directions of the x-axis and y-axis, and the two-dimensional plane coordinates of each point. Calculated using the following formula: 2.3 Use common image processing functions to extract contours from the obtained images, and then perform least-squares fitting on the extracted image contours to obtain two-dimensional line segments; 2.4 By reversing the solution of the formula in step 2.2, these two-dimensional line segments are projected back onto the original three-dimensional plane to obtain the corresponding three-dimensional point cloud line segments. Adjacent line segments are merged to obtain the three-dimensional line segments of the colored scattered point cloud. Step 3: Obtain the set of all possible adjacent edge pairs formed by straight lines, calculate the direction of the line segment point cloud obtained in step 2, and obtain the line vector fitted for each straight line. Traverse each pair of straight lines and calculate their angle. If the angle is within a certain area, they are judged to be perpendicular to each other. Calculate the distance between two perpendicular lines. If the distance is within a certain threshold, they are judged to be a pair of adjacent edges. Step 4: Obtain the set of point cloud line segments in 3D space that can form a planar quadrilateral; in the set of adjacent pairs obtained in Step 3, the number of times that every pair of adjacent pairs has overlapping lines is greater than or equal to 1. We denote these four adjacent pairs as a quadrilateral, and by traversing in this way, we obtain the set of all point cloud line segments in three-dimensional space that can form quadrilaterals. The process of determining whether a point cloud of four straight lines forms a quadrilateral is as follows: set up Let be the set of all adjacent pairs. For any four adjacent pairs... Define a function This indicates the number of adjacent pairs among these four adjacent pairs that have overlapping lines. Then Consider it as a quadrilateral, where As an adjustable factor; in the complete point cloud When the point cloud is incomplete 3. By traversing all possible By combining them, we obtain the set of all quadrilaterals in three-dimensional space; Step 5: Automatically measure the side length of the quadrilateral; take the four straight point clouds that can form a quadrilateral obtained in Step 4, and each pair of parallel straight point clouds as a pair of opposite sides. Calculate the average distance between the point clouds of the pair of opposite sides, so that the length and width of the quadrilateral can be obtained even when the point cloud is missing.

2. The method for automatic extraction and measurement of planar quadrilateral contours based on colored scattered point clouds according to claim 1, characterized in that: Step 2 involves dividing the point cloud into multiple 3D planes through region expansion and region merging. All points belonging to each plane are orthogonally projected onto the self-plane, and then converted into a binary image through a meshing process based on plane adaptive parameters. A 2D contour extraction algorithm is then used to extract contours from the obtained image. The extracted image contours are fitted with least squares to obtain 2D line segments. These 2D line segments are projected back onto the original 3D plane to obtain the corresponding 3D point cloud line segments. Adjacent line segments are merged to finally obtain the contour line segment point cloud extracted from the color point cloud.

3. The method for automatic extraction and measurement of planar quadrilateral contours based on colored scattered point clouds according to claim 1, characterized in that... Step 3, obtaining adjacent edge pairs, specifically includes the following steps: The entire point cloud is represented as For each line segment in the point cloud, the direction vector of the line is fitted or calculated using various methods. ,in ; Calculate the angle between any two lines. and ,in Calculate the included angle between them. : in Represents the dot product of vectors. Describe the norm of a vector; determine the included angle. Whether it is within the vertical range, i.e. satisfy: ,in As an adjustable factor, it will be used when the point cloud data is incomplete or the line fitting is inaccurate. The value increases.

4. The method for automatic extraction and measurement of planar quadrilateral contours based on colored scattered point clouds according to claim 3, characterized in that... The specific process of calculating the straight-line point cloud distance in step 3 includes the following steps: Step 3.1: Represent any point in the point cloud. Choose any point in the point cloud as... And its coordinates are ; Step 3.2: Find the distance The point furthest from the European-style distance is For all points in the point cloud Calculate them with Euclidean distance: ; Step 3.3: Find the one that makes The largest point Its coordinates are ; Step 3.4: Find the distance The point furthest from the European-style distance is Similarly, calculate the sum of all points in the point cloud. Find the Euclidean distance and locate the point that maximizes this distance. Its coordinates are ;point and points The distance between them is the length of this straight-line point cloud.

5. The method for automatic extraction and measurement of planar quadrilateral contours based on colored scattered point clouds according to claim 1, characterized in that: The process of calculating the average distance of the opposite edge group in step 5 is as follows: take any straight line point cloud in the opposite edge point cloud as the starting point cloud to build a kdtree index, use the kdtree to find the minimum and maximum distance records of each point distance, and calculate the average value.