Point cloud data processing method and device, computer equipment and storage medium
By determining the target weight of the point pair in point cloud data processing and calculating the transformation parameters, the problem of low alignment accuracy between point cloud data is solved, and high-precision modeling of target objects in large scenarios is achieved, suitable for urban planning and cultural heritage Protection and other applications.
Patent Information
- Application Number
- CN202411087786.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-11-22
AI Technical Summary
The existing point cloud data fusion technology is difficult to achieve high-precision alignment in large-scene modeling, especially in applications that require the rapid acquisition of large-scene structure information and refined modeling at the same time, the alignment accuracy between point cloud data is low.
By obtaining the intersection of feature point areas of the first point cloud data and the second point cloud data, multiple point pairs are determined, and the current transformation parameters are calculated based on the target weight of the point pair, determining whether to comply with the convergence rules, and determining whether to perform point cloud alignment processing is performed. , improve the alignment accuracy between point cloud data.
The alignment accuracy between point cloud data is improved, the precision of target objects and the integrity of macro-space layout in large-scene modeling is ensured, and it is suitable for applications such as urban planning and cultural heritage protection.
Smart Images

Figure CN119006542A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a point cloud data processing method, device, computer equipment and storage medium. Background Art
[0002] The laser radar scanning device can obtain the data of all target points on the target by continuously scanning the target and receiving the reflected laser signals, and then perform imaging processing to obtain a model of the target. When it is necessary to model a large scene, the laser radar scanning device can quickly obtain the structural information of the large scene, thereby modeling the large scene.
[0003] In practical applications, such as urban planning and construction, cultural heritage protection, etc., sometimes in addition to the need to quickly obtain the structural information of the entire large scene, it is also necessary to simultaneously perform refined modeling on some objects of interest. Although lidar scanning equipment can achieve rapid modeling of large scenes, it cannot capture the fine data of the scene. In order to solve this problem, some people have proposed a multi-platform scanning data fusion technology that combines different scanning devices. This means that it is necessary to fuse multiple scanning data (point cloud data) to construct a model. However, the current scanning data fusion technology generally only performs rough alignment between point pairs between cloud data through the initial transformation matrix obtained by the joint calibration between acquisition devices, and the alignment accuracy between point cloud data is low. Summary of the invention
[0004] The embodiments of the present application provide a point cloud data processing method, apparatus, computer equipment and storage medium, which can improve the alignment accuracy between point cloud data.
[0005] In a first aspect, an embodiment of the present application provides a point cloud data processing method, which includes:
[0006] Acquire first point cloud data and second point cloud data, wherein feature point regions in the first point cloud data and the second point cloud data intersect;
[0007] Determine a plurality of point pairs from the first point cloud data and the second point cloud data according to a preset point pair distance threshold;
[0008] For each of the point pairs, determining a target weight of the point pair;
[0009] Determining current transformation parameters according to each of the point pairs and each of the target weights;
[0010] Determine whether the current transformation parameters meet the preset convergence rules, and obtain a determination result;
[0011] According to the judgment result, it is determined whether to perform point cloud alignment processing on the first point cloud data and the second point cloud data.
[0012] In a second aspect, an embodiment of the present application further provides a point cloud data processing device, which includes:
[0013] A transceiver unit, used for acquiring first point cloud data and second point cloud data, wherein the point cloud accuracy of the second point cloud data is higher than the point cloud accuracy of the first point cloud data, and feature point areas in the first point cloud data and the second point cloud data intersect;
[0014] A processing unit, used to determine multiple point pairs from the first point cloud data and the second point cloud data according to a preset point pair distance threshold; determine the target weight of each point pair; determine the current transformation parameters according to each point pair and each target weight; judge whether the current transformation parameters meet the preset convergence rules to obtain a judgment result; and decide whether to perform point cloud alignment processing on the first point cloud data and the second point cloud data according to the judgment result.
[0015] In a third aspect, an embodiment of the present application further provides a computer device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above method when executing the computer program.
[0016] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the storage medium stores a computer program, wherein the computer program includes program instructions, and wherein the program instructions can implement the above method when executed by a processor.
[0017] The embodiment of the present application provides a point cloud data processing method, device, computer equipment and storage medium. The method includes: first obtaining the first point cloud data and the second point cloud data, wherein the feature point area in the first point cloud data and the second point cloud data has an intersection; determining multiple point pairs from the first point cloud data and the second point cloud data according to a preset point pair distance threshold; then determining the target weight of the point pair for each point pair; and determining the current transformation parameters according to each point pair and each target weight; judging whether the current transformation parameters meet the preset convergence rules to obtain a judgment result; and deciding whether to perform point cloud alignment processing on the first point cloud data and the second point cloud data according to the judgment result. When calculating the transformation parameters, the embodiment of the present application not only considers whether the point pair is within the current point pair distance threshold, but also considers the weight of each point pair, so that the obtained transformation parameters are more accurate. Point cloud alignment processing can be performed using the transformation matrix obtained according to the transformation parameters, which can improve the alignment accuracy between point clouds. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] 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 will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 A schematic diagram of an application scenario of the point cloud data processing method provided in an embodiment of the present application;
[0020] Figure 2 A schematic diagram of a process for processing point cloud data provided in an embodiment of the present application;
[0021] Figure 3 A schematic diagram of a sub-process of a point cloud data processing method provided in an embodiment of the present application;
[0022] Figure 4 A schematic diagram of a sub-process of a point cloud data processing method provided in an embodiment of the present application;
[0023] Figure 5 A schematic diagram of a sub-process of a point cloud data processing method provided in an embodiment of the present application;
[0024] Figure 6 A schematic block diagram of a point cloud data processing device provided in an embodiment of the present application;
[0025] Figure 7 A schematic block diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0027] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0028] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0029] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0030] The embodiments of the present application provide a point cloud data processing method, apparatus, computer equipment and storage medium.
[0031] The executor of the point cloud data processing method may be the point cloud data processing device provided in the embodiment of the present application, or a computer device integrating the point cloud data processing device, wherein the point cloud data processing device may be implemented in hardware or software, and the computer device may be a terminal or a server.
[0032] Among them, the computer device is a computer device in a point cloud data processing system, and the cloud data processing system is the computer device, or includes the computer device, a first scanning device and a second scanning device.
[0033] See also Figure 1 , Figure 1 Schematic diagram of an application scenario of the point cloud data processing method provided in the embodiment of the present application. The point cloud data processing method is applied to Figure 1 In the point cloud data processing system 10, the point cloud data processing system 10 can perform fine alignment processing on point cloud data with intersections of feature points.
[0034] Among them, the point cloud data processing system 10 of the embodiment of the present application can quickly scan the target scene through the first scanning device 20 to obtain the overall point cloud data (first point cloud data) of the target scene, and scan the target object in the target scene through the second scanning device 30 to obtain the target object point cloud data (second point cloud data), and then perform precise point cloud alignment processing on the overall point cloud data and the target object point cloud data.
[0035] Specifically, the first scanning device 20 can be a laser radar scanning device or other scanning devices that can achieve a fast scanning function. The present application does not limit the specific type of the first scanning device. In order to facilitate flexible scanning by the staff, the device can be a handheld laser radar scanning device. The second scanning device 30 can be a structured light scanning device or other scanning devices that can achieve a high-precision scanning function. The present application does not limit the specific type of the second scanning device. In order to facilitate flexible scanning by the staff, its structure can be a handheld structured light scanning device.
[0036] Among them, the scanning accuracy of the second scanning device 30 is higher than that of the first scanning device 20. The point cloud data processing system 10 needs to perform more precision calculations on the point cloud data collected by the second scanning device 30. The scanning speed of the first scanning device 20 is higher than that of the second scanning device 30. This application uses the first scanning device 20 to scan the point cloud data of a large scene, and uses the second scanning device 30 to scan the target object that needs to reflect the detailed information in the large scene, and then aligns and fuses the point cloud data of the two scanning devices, so that the obtained three-dimensional model data has both macro spatial layout and micro detail expression.
[0037] The point cloud data processing method provided in the embodiment of the present application can be applied to large scenarios such as urban planning and construction, cultural heritage protection, etc. At this time, the target scene can be a street scene that requires urban planning and construction, a site that requires cultural heritage protection, etc., and the target object can be a relatively important item in the target scene. Therefore, when modeling, it is necessary to construct a precise structure of the target object, for example, buildings that need to be paid attention to in street scenes of urban planning and construction, cultural relics in the site of cultural heritage protection, etc.
[0038] Figure 2 is a flow chart of the point cloud data processing method provided in the embodiment of the present application. Figure 2 As shown, the method includes the following steps S110-S160.
[0039] Among them, this embodiment takes the first scanning device as a laser radar scanning device and the second scanning device as a structured light scanning device as an example to explain in detail the point cloud data processing method provided by this application.
[0040] S110, obtaining first point cloud data and second point cloud data.
[0041] There is an intersection between the feature point areas in the first point cloud data and the second point cloud data.
[0042] In this embodiment, the first point cloud data and the second point cloud data are two point cloud data that need to be aligned and fused. The two point cloud data include point cloud data of the same area, and the point cloud data of the same area is the feature point area where there is an intersection between the first point cloud data and the second point cloud data.
[0043] Specifically, the scanning paths of the first scanning device and the second scanning device are planned respectively, and the scanning resolution and scanning speed of each scanning path are set; then, the first scanning device is controlled to perform point cloud data scanning of a large scene (target scene) according to the corresponding scanning path, the corresponding scanning resolution and the scanning speed; and the second scanning device is controlled to perform point cloud data scanning of a small object (target object) in a large scene according to the corresponding scanning path, the corresponding scanning resolution and the scanning speed.
[0044] Before the system collects point cloud data through the first scanning device and the second scanning device, it is necessary to first perform joint calibration processing on the first scanning device and the second scanning device to obtain an initial transformation matrix M0. Specifically, the initial transformation matrix M0 is determined by the following steps:
[0045] First, before formally performing joint calibration processing on the first scanning device and the second scanning device, it is necessary to perform device calibration on the first scanning device and the second scanning device.
[0046] When the first scanning device is a laser radar scanning device and the second scanning device is a structured light scanning device, before the joint calibration process, the laser radar scanning device needs to be calibrated first, and the structured light scanning device needs to be calibrated.
[0047] Radar calibration includes determining the exact position and orientation of each sensor in the radar system (laser transmitter, receiver, IMU, GPS, etc.), as well as the time synchronization of radar data, and correcting the ranging deviation of the laser beam. Structured light calibration includes ensuring the geometric and optical alignment between the projected light pattern (usually a series of light stripes with known patterns) and the camera that captures these patterns, including measuring the relative position and angle of the camera and the light source, and ensuring that the structured light scanning system can accurately resolve the structured light pattern reflected from the surface of the object. The calibration of the structured light scanning system usually also involves the calibration of the camera itself.
[0048] In this embodiment, the joint calibration processing means that in a system that uses radar and structured light scanning at the same time, in addition to calibrating the system of each scanning device individually, it is also necessary to calibrate between the scanning device systems to obtain the initial transformation matrix M0 between the two point cloud data, ensuring that the data generated by the radar scanning system and the structured light scanning system can be accurately integrated in the same coordinate system.
[0049] In some embodiments, the initial transformation matrix M0 is determined specifically by the following steps:
[0050] 1. Select a suitable common reference object. Specifically, select a common reference object suitable for both scanning technologies. This reference object should have clear geometric features and be easy for both scanning devices to identify, such as a calibration plate, a three-dimensional object with obvious marking points, or an object with a specific shape and size.
[0051] 2. Scan the common reference object. Specifically, two scanning devices scan the common reference object respectively. Each scanning device should obtain data of the reference object from a different angle to ensure that as comprehensive information as possible is obtained.
[0052] 3. Extract feature matching point pairs. Specifically, extract key feature points from the scanning data obtained by each scanning device. These feature points should be easy to match points, such as corner points, edge intersection points, etc. This step usually involves the use of computer vision algorithms, such as corner point detectors, to ultimately obtain a set of feature matching point pairs (the points corresponding to the same feature point in two data sets are called a feature matching point pair).
[0053] 4. Calculate the initial transformation matrix M0 based on the feature matching point pairs. Specifically, use basic mathematical models, such as direct linear transform (DLT), to calculate an initial transformation matrix M0 based on these feature matching points. This matrix is used to convert the coordinate system of one scanning device to the coordinate system of another scanning device to ensure that after the conversion, the positions of the same physical points in the two coordinate systems are as consistent as possible.
[0054] Among them, DLT is a technology for calculating the camera projection matrix and other geometric transformations, which can be used to calculate the linear transformation relationship from one coordinate system to another. In this embodiment, DLT can estimate the transformation matrix from the structured light scanning terminal coordinate system to the lidar coordinate system based on multiple sets of corresponding feature points.
[0055] 5. Verification and adjustment. Specifically, verify the calculated initial transformation matrix M0 to check whether all feature points can maintain good consistency after transformation. If deviations are found, it is necessary to readjust the transformation matrix or reselect feature points for calculation to recalculate the initial transformation matrix M0 until the obtained initial transformation matrix M0 is verified and the verified initial transformation matrix M0 is output as the final initial transformation matrix M0.
[0056] After acquiring the point cloud data scanned by the second scanning device, the system will multiply the cloud data by the initial transformation matrix M0, and transform the point cloud data into the coordinate system where the point cloud data acquired by the first scanning device is located. At this time, the first point cloud data and the second point cloud data are acquired, including:
[0057] A target scene is scanned by a first scanning device to obtain first point cloud data; and a target object in the target scene is scanned by a second scanning device to obtain third point cloud data, wherein the scanning accuracy of the second scanning device is higher than the scanning accuracy of the first scanning device; based on a preset initial transformation matrix, the third point cloud data is converted to the coordinate system of the first point cloud data to convert the third point cloud data into second point cloud data.
[0058] Specifically, after obtaining the first point cloud data scanned by the first scanning device and the third point cloud data scanned by the second scanning device, the third point cloud data is multiplied by the initial transformation matrix M0 to convert the third point cloud data to the coordinates of the first point cloud data, thereby completing the preliminary alignment of the two point cloud data.
[0059] Among them, in order to further improve the accuracy of the subsequently constructed model, this embodiment will also perform data preprocessing on the first point cloud data and the second point cloud data after acquiring the first point cloud data and the second point cloud data. Specifically, the first point cloud data and the second point cloud data are preprocessed to obtain candidate point cloud data of the processed first point cloud data and the second point cloud data, and the data preprocessing includes denoising processing, point cloud filtering processing and normalization processing; then, edge detection processing and high-precision feature extraction processing are performed on the candidate point cloud data to obtain the processed second point cloud data, and the high-precision feature extraction processing includes key point detection processing, descriptor generation processing and feature matching processing.
[0060] Among them, the key point detection processing specifically includes: selecting points with unique or significant geometric shapes in the second point cloud data as key points. The key point detection algorithm used in the key point detection processing in this embodiment includes Harris 3D (three-dimensional Harris corner point detection algorithm) or inherent shape feature identification (Intrinsic Shape Signatures, ISS) algorithm.
[0061] The descriptor generation process specifically includes: generating a descriptor for each key point, the descriptor captures the local geometric features around the key point, and the 3D descriptor used in this embodiment includes fast point feature histograms (Fast Point Feature Histograms, FPFH) or orientation histogram features (Signature of Histograms of Orientations, SHOT).
[0062] The feature matching process specifically includes: in the process of fusing the single-frame point cloud data in the second point cloud data, feature matching is performed on the single-frame point cloud and the fused point cloud to improve the accuracy of the final complete point cloud data.
[0063] The above data preprocessing can remove outliers in point cloud data, smooth data, and make multi-source data consistent, thereby improving data clarity, usability, and post-processing model accuracy.
[0064] From the above description, it can be seen that the present application requires data preprocessing and high-precision feature extraction processing for the second point cloud data, and only data preprocessing is required for the first point cloud data. The processing steps for the first point cloud data are relatively few, thereby reducing the overall data volume, realizing the rapid construction of large scene models and ensuring the fineness of the targets in the large scenes in the constructed models.
[0065] S120: Determine a plurality of point pairs from the first point cloud data and the second point cloud data according to a preset point pair distance threshold.
[0066] In this embodiment, an initial point pair distance threshold is pre-set in the system. In each iteration, the preset point pair distance threshold will gradually shrink. After the first point cloud data and the second point cloud data are initially aligned, point pairs whose distance is less than the preset point pair distance threshold are found from the first point cloud data and the second point cloud data.
[0067] S130: For each point pair, determine a target weight of the point pair.
[0068] In this embodiment, after finding a plurality of point pairs that meet the conditions, the target weight of each point pair is further calculated.
[0069] In some embodiments, specifically, the target weight of the point pair is determined based on at least one of the curvature difference of the point pair, the normal of each point, the point density difference, and the distance difference.
[0070] Including at least one of these four parameters means that in addition to these four parameters, other parameters may or may not be included; but the parameters for determining the target weight should include at least one of these four parameters, and the number of parameters and the distribution of weights will be related to the accuracy and the amount of calculation.
[0071] For further information, see Figure 3 In this embodiment, the combination of the four is preferably used to determine the target weight. Specifically, the target weight W of each point pair is calculated respectively through steps S1301-S1306. i .
[0072] S1301, obtaining curvature difference, normal of each point, point density difference and distance difference.
[0073] In some embodiments, see Figure 4 , step S1301 specifically includes steps S13011-SS13016:
[0074] S13011, determining a first feature point group based on feature points located within a first preset area of a first feature point in the first point cloud data; and determining a second feature point group based on feature points located within a first preset area of a second feature point in the second point cloud data.
[0075] Specifically, the first preset area is a pre-set area within a fixed range with the corresponding feature point as the center, wherein the shape of the fixed range can be a direction or a circle, etc., and the present application does not limit the shape of the area.
[0076] In the first point cloud data, the first feature point is taken as the center of the first preset area, and multiple feature points in the first point cloud data within the first preset area are determined as a first feature point group; in the second point cloud data, the second feature point is taken as the center of the first preset area, and multiple feature points in the second point cloud data within the first preset area are determined as a second feature point group.
[0077] S13012, performing plane fitting processing on the first feature point group to obtain a first local plane; and performing plane fitting processing on the second feature point group to obtain a second local plane.
[0078] In this embodiment, after obtaining the first feature point group, the first feature point group is subjected to plane fitting processing by the least squares method to obtain a first local plane, and the second feature point group is subjected to plane fitting processing by the least squares method to obtain a second local plane.
[0079] S13013. Determine a curvature difference and a normal according to the first local plane and the second local plane.
[0080] In this embodiment, after obtaining the first local plane and the second local plane, the distance from each point in the first feature point group to the first local plane is calculated, and then the variance of these distances is used as the first curvature C1 corresponding to the first feature point; the distance from each point in the second feature point group to the second local plane is calculated, and then the variance of these distances is used as the second curvature C2 corresponding to the second feature point, and then the curvature difference is calculated by formula (1).
[0081] ΔC=|C1-C2|; (1)
[0082] In formula (1), ΔC is the curvature difference, C1 is the first curvature corresponding to the first feature point, and C2 is the second curvature corresponding to the second feature point.
[0083] Furthermore, the normal line corresponding to the first local plane is used as the first normal line N1 of the first feature point, and the normal line corresponding to the second local plane is used as the second normal line N2 of the second feature point.
[0084] S13014, obtaining the number of first feature points located in the second preset area of the first feature point in the first point cloud data; and obtaining the number of second feature points located in the second preset area of the second feature point in the second point cloud data.
[0085] Among them, the second preset area can be a spherical area with a preset radius r. The present application can also set the second preset area to an area of other shapes and sizes according to actual needs. This embodiment does not limit the shape and size of the second preset area.
[0086] When the second preset area can be a spherical area with a preset radius r, in the first point cloud data, the first feature point is taken as the center of the second preset area, and then the first feature point number Num1 of the feature points in the first point cloud data located in the second preset area is obtained; and in the second point cloud data, the second feature point is taken as the center of the second preset area, and then the second feature point number Num2 of the feature points in the second point cloud data located in the second preset area is obtained.
[0087] S13015. Determine the density difference according to the number of first feature points, the amount of second feature point data, and the area volume of the second preset area.
[0088] In this embodiment, after the number of the first feature points and the number of the second feature points are determined, the density difference Δρ is determined according to the number of the first feature points Num1, the number of the second feature points Num2 and the area volume V of the second preset area. Specifically, the density difference is determined according to formula (2):
[0089] Δρ=|ρ1-ρ2|; (2)
[0090] Among them, Δρ is the density difference, ρ1 is the first density corresponding to the first feature point, and ρ2 is the second density corresponding to the second feature point.
[0091] S13016: Determine the Euclidean distance between the first feature point and the second feature point, and use the Euclidean distance as the distance difference.
[0092] In this embodiment, in the coordinate system of the first point cloud data, the Euclidean distance between the first feature point and the second feature point is calculated, and the Euclidean distance is used as the distance difference.
[0093] In this embodiment, the execution order of the steps of calculating the curvature difference, the normal of each point, the point density difference and the distance difference is not limited.
[0094] S1302: Determine the curvature weight according to the curvature difference and a preset curvature weight calculation rule.
[0095] In this embodiment, the curvature weight can be determined specifically by formula (3):
[0096]
[0097] Among them, w c is the curvature weight, ΔC is the curvature difference, and σ is an adjustment parameter used to control the decay rate of the curvature weight as the distance increases.
[0098] S1303: Determine the normal consistency weight according to the normal of each point and a preset normal consistency weight calculation rule.
[0099] In this embodiment, the normal consistency weight can be determined specifically by formula (4):
[0100] w n =max(0,N1·N2); (4)
[0101] Among them, w n is the normal consistency weight, N1 is the first normal, and N2 is the second normal.
[0102] S1304: Determine the point density weight according to the point density difference and a preset point density calculation rule.
[0103] In this embodiment, the point density weight can be determined specifically by formula (5):
[0104]
[0105] Among them, w ρ is the point density weight, Δρ is the density difference, and σ is an adjustment parameter used to control the decay rate of the point density weight as the distance increases.
[0106] S1305: Determine the distance weight according to the distance difference and a preset distance weight calculation rule.
[0107] In this embodiment, the point distance weight can be determined specifically by formula (6):
[0108]
[0109] Among them, w d is the distance weight, d is the distance difference, and σ is an adjustment parameter used to control the decay rate of the distance weight as the distance increases.
[0110] Among them, this application does not limit the execution order of each step between step S1302 to step S1305.
[0111] S1306. Determine the target weight according to the curvature weight, the normal consistency weight, the point density weight, and the distance weight.
[0112] In this embodiment, the target weight can be determined specifically by formula (7):
[0113] W i =a·w c +b·w n +c·w ρ +d·w d ; (7)
[0114] Among them, W i is the target weight of the i-th point pair, a, b, c, d are the coefficients of curvature weight, normal consistency weight, point density weight and distance weight respectively, and w c is the curvature weight, w n is the normal consistency weight, w ρ is the point density weight, w d is the distance weight.
[0115] S140: Determine current transformation parameters according to each point pair and each target weight.
[0116] In this embodiment, the target transformation matrix M1 is defined as an affine matrix, corresponding to formula (8):
[0117]
[0118] Wherein, R is the rotation matrix, t is the translation vector, and the current transformation parameters in this embodiment include the rotation matrix R and the translation vector t.
[0119] In this embodiment, the rotation matrix R and the translation vector t are calculated specifically by the following steps:
[0120] Define the first point cloud data as A, the second point cloud data as B, and the point pair currently obtained by pairing A and B that meets the threshold condition as (p i ,q i ), where pi∈B and qi∈A.
[0121] First, the weighted centroids (centers of gravity) of the two point clouds A and B are calculated, where: the centroid of B is calculated by formula (9), and the centroid of A is calculated by formula (10) A .
[0122]
[0123] Among them, c B is the center of mass of B, p i is the point in the pair that belongs to B, W i For p iTarget weights for corresponding point pairs.
[0124]
[0125] Among them, c A is the center of mass of A, q i is the point in the pair that belongs to A, W i for q i Target weights for corresponding point pairs.
[0126] Then, A and B are de-centroided, that is, all points in A and B are moved to a new coordinate system with the center of mass as the origin to simplify the rotation solution process. Specifically, B is de-centroided by formula (11) and A is de-centroided by formula (12).
[0127] p′ i =p i -c B ; (11)
[0128] Among them, p′ i is the center of mass c in B B is p after the origin is moved i .
[0129] q′ i =q i -c A ; (12)
[0130] Among them, q′ i is the center of mass c in A A is q after the origin is moved i .
[0131] Then, according to the obtained p′ i and q′ i Construct the covariance matrix H. Specifically, construct the covariance matrix H by formula (13):
[0132] H=∑ i W i p′ i T q′ i ; (13)
[0133] The covariance matrix H is subjected to singular value decomposition. Specifically, the singular value decomposition is performed using formula (14):
[0134] H=UΣV T ; (14)
[0135] Among them, U and V are orthogonal matrices, and Σ is a diagonal matrix.
[0136] The rotation matrix R is calculated by formula (15):
[0137] R=VU T ; (15)
[0138] Then calculate the translation vector t using formula (16):
[0139] t=c A -Rc B ; (16)
[0140] Thus, the current transformation parameters of the current iteration cycle are calculated.
[0141] S150: Determine whether the current transformation parameters meet the preset convergence rules and obtain a determination result.
[0142] In this embodiment, after the current transformation parameters are calculated, it is further determined whether the current transformation parameters of the current iteration cycle meet the preset convergence rules, and a judgment result that the current transformation parameters meet the convergence rules or a judgment result that the current transformation parameters do not meet the convergence rules is obtained.
[0143] In some embodiments, see Figure 5 Specifically, the following steps can be used to determine whether the current transformation parameters meet the preset convergence rules and obtain the judgment result:
[0144] S1501. Determine whether the current number of iterations reaches the preset maximum number of iterations; if so, execute step S1504; if not, execute step S1502.
[0145] S1502: Based on the preset loss function calculation rules, determine the current loss function value according to the current transformation parameters, each point pair and each target weight.
[0146] Specifically, the loss function calculation rule includes formula (17), which specifically substitutes the current transformation parameters, each point pair and each target weight into formula (17) to determine the current loss function value:
[0147]
[0148] Among them, E(R, t) is the current loss function value, (p i ,q i ) is the i-th point pair, W i is the target weight of the i-th point pair, R is the rotation matrix in the current transformation parameters, t is the translation vector in the current transformation parameters, and |||| represents the Euclidean distance.
[0149] S1503. Determine whether the loss function difference between the current loss function value and the loss function value of the previous iteration cycle is less than a preset loss function threshold; if so, execute step S1504; if not, execute step S1505.
[0150] In this embodiment, after obtaining the current loss function value of the current iteration cycle, the loss function difference between the current loss function value and the loss function value of the previous iteration cycle is calculated, and it is determined whether the loss function difference is less than the preset loss function threshold T.
[0151] S1504: Determine whether the current transformation parameters meet the convergence rule.
[0152] In this embodiment, if the current number of iterations reaches the maximum number of iterations, or the loss function difference between the current loss function value and the loss function value of the previous iteration cycle is less than a preset loss function threshold, it is determined that the current transformation parameters meet the convergence rules.
[0153] S1505: Determine that the judgment result is that the current transformation parameters do not meet the convergence rules.
[0154] In this embodiment, if the loss function difference is greater than or equal to the loss function threshold, it is determined that the current transformation parameters do not meet the convergence rule. At this time, it is necessary to enter the next iteration cycle and recalculate the transformation parameters.
[0155] S160: Determine whether to perform point cloud alignment processing on the first point cloud data and the second point cloud data according to the judgment result.
[0156] Specifically, if the judgment result is that the current transformation parameters do not meet the convergence conditions, the next iteration cycle is entered, the preset point pair distance threshold is tightened according to the preset distance threshold adjustment rule, and then the step of determining multiple point pairs from the first point cloud data and the second point cloud data according to the preset point pair distance threshold is returned to execute.
[0157] Among them, the distance threshold adjustment rule indicates tightening the preset point-to-point distance threshold. As the number of iterations increases, the value of the preset point-to-point distance threshold becomes smaller. A fixed value can be tightened in each iteration, or different values can be set to tighten in different iteration cycles. This embodiment does not limit the specific tightening method.
[0158] If the judgment result is that the current transformation parameters meet the convergence condition, a target transformation matrix is determined according to the current transformation parameters, and point cloud alignment processing is performed on the first point cloud data and the second point cloud data according to the target transformation matrix.
[0159] Specifically, the current transformation parameters are substituted into formula (8) to obtain the target transformation matrix M1, and then the second point cloud data is multiplied by the target transformation matrix M1 to complete the point cloud alignment processing between the first point cloud data and the second point cloud data.
[0160] Furthermore, after completing the point cloud alignment processing between the first point cloud data and the second point cloud data, the method further includes:
[0161] Redundant point cloud data in the first point cloud data that overlaps with the second point cloud data is determined, and the redundant point cloud data is deleted to obtain a candidate model; texture mapping processing, color correction processing, and seam processing are performed on the candidate model to obtain a target model.
[0162] It can be seen that in this embodiment, when the areas overlap, the detail layer of the scanning data of the structured light scanning device will be given priority, and the non-overlapping area maintains the scanning data of the lidar scanning device to ensure the integrity of the large scene.
[0163] This embodiment can select texture images in texture mapping processing through three aspects: preprocessing of texture images, evaluating texture quality, and automatic texture selection. Specifically:
[0164] 1. Texture image preprocessing includes:
[0165] Image Normalization: Ensure that all texture images are normalized in brightness and contrast to remove the effects of lighting variations.
[0166] Image correction: Perform geometric correction, such as distortion correction, to ensure that the texture image corresponds to the geometry of the 3D model.
[0167] 2. Evaluating texture quality includes:
[0168] Sharpness evaluation: Use image sharpness algorithms such as the Laplacian operator to evaluate the sharpness and details of the image.
[0169] Viewing angle evaluation: Calculate the angle between the image capturing viewing angle and the normal of the 3D model surface, and give priority to images with angles close to vertical.
[0170] Overlap area evaluation: Calculate the overlap between the camera viewing angle and the image, and give priority to textures with an overlap of more than 60%.
[0171] 3. Automatic texture selection includes:
[0172] Rule-based selection: Define a set of selection criteria, including clarity, perspective proximity, and perspective and texture overlap, and select the most reasonable texture image through weight analysis.
[0173] The color correction process specifically includes: collecting a set of images of standard color plates as references, and using a color correction algorithm to adjust the color of the model so that it remains consistent under different lighting conditions.
[0174] The above-mentioned seam processing specifically includes: using image fusion technology to process texture seams of data of different scales, such as using Poisson fusion or multi-band mixing technology.
[0175] In summary, the embodiment of the present application not only considers whether the point pair is within the current point pair distance threshold when calculating the transformation parameters, but also considers the weight of each point pair, so that the obtained transformation parameters are more accurate. Using the transformation matrix obtained according to the transformation parameters to perform point cloud alignment processing can improve the alignment accuracy between point clouds.
[0176] Figure 6 6 is a schematic block diagram of a point cloud data processing device provided by an embodiment of the present application. As shown in 6, corresponding to the above point cloud data processing method, the present application also provides a point cloud data processing device 600. The point cloud data processing device 600 includes a unit for executing the above point cloud data processing method, and the point cloud data processing device 600 can be configured in a terminal or a server. Specifically, please refer to Figure 6 , the point cloud data processing device 600 includes a transceiver unit 601 and a processing unit 602, wherein:
[0177] The transceiver unit 601 is used to obtain first point cloud data and second point cloud data, wherein the point cloud accuracy of the second point cloud data is higher than the point cloud accuracy of the first point cloud data, and feature point areas in the first point cloud data and the second point cloud data intersect;
[0178] The processing unit 602 is used to determine multiple point pairs from the first point cloud data and the second point cloud data according to a preset point pair distance threshold; determine the target weight of each point pair; determine the current transformation parameters according to each point pair and each target weight; determine whether the current transformation parameters meet the preset convergence rules to obtain a judgment result; and decide whether to perform point cloud alignment processing on the first point cloud data and the second point cloud data according to the judgment result.
[0179] In some embodiments, when the processing unit 602 determines the target weight of the point pair, it is specifically configured to:
[0180] The target weight of the point pair is determined based on at least one of a curvature difference of the point pair, a normal of each point, a point density difference, and a distance difference.
[0181] In some embodiments, when the processing unit 602 performs the step of determining the target weight of the point pair according to at least one of the curvature difference of the point pair, the normal of each point, the point density difference, and the distance difference, it is specifically configured to:
[0182] Obtain the curvature difference, the normal of each point, the point density difference and the distance difference; and / or determine the curvature weight according to the curvature difference and a preset curvature weight calculation rule; and / or determine the normal consistency weight according to the normal of each point and a preset normal consistency weight calculation rule; and / or determine the point density weight according to the point density difference and a preset point density calculation rule; and / or determine the distance weight according to the distance difference and a preset distance weight calculation rule; determine the target weight according to at least one of the curvature weight, the normal consistency weight, the point density weight and the distance weight.
[0183] In some embodiments, when the processing unit 602 performs the step of determining the target weight of the point pair according to at least one of the curvature difference of the point pair, the normal of each point, the point density difference, and the distance difference, it is specifically configured to:
[0184] The target weight is determined according to the curvature weight, the normal consistency weight, the point density weight, and the distance weight.
[0185] In some embodiments, the point pair includes a first feature point and a second feature point; when the processing unit 602 executes the step of obtaining the curvature difference, the normal of each point, the point density difference, and the distance difference, it is specifically used to:
[0186] Determine a first feature point group based on feature points located in a first preset area of the first feature point in the first point cloud data; and determine a second feature point group based on feature points located in the first preset area of the second feature point in the second point cloud data; perform plane fitting processing on the first feature point group to obtain a first local plane; and perform plane fitting processing on the second feature point group to obtain a second local plane; determine the curvature difference and the normal based on the first local plane and the second local plane; obtain the number of first feature points located in a second preset area of the first feature point in the first point cloud data; and obtain the number of second feature points located in the second preset area of the second feature point in the second point cloud data; determine the density difference based on the number of the first feature points, the amount of data of the second feature points and the area volume of the second preset area; determine the Euclidean distance between the first feature point and the second feature point, and use the Euclidean distance as the distance difference.
[0187] In some embodiments, when the processing unit 602 executes the step of determining whether to perform point cloud alignment processing on the first point cloud data and the second point cloud data according to the judgment result, it is specifically used to:
[0188] If the judgment result is that the current transformation parameter does not meet the convergence condition, tighten the preset point pair distance threshold according to the preset distance threshold adjustment rule, and return to execute the step of determining a plurality of point pairs from the first point cloud data and the second point cloud data according to the preset point pair distance threshold, wherein the distance threshold adjustment rule indicates tightening the preset point pair distance threshold, and as the number of iterations increases, the value of the preset point pair distance threshold becomes smaller;
[0189] If the judgment result is that the current transformation parameters meet the convergence condition, a target transformation matrix is determined according to the current transformation parameters, and point cloud alignment processing is performed on the first point cloud data and the second point cloud data according to the target transformation matrix.
[0190] In some embodiments, when the processing unit 602 performs the step of determining whether the current transformation parameters meet the preset convergence rule and obtaining the determination result, it is specifically configured to:
[0191] Determine whether the current number of iterations reaches the preset maximum number of iterations; if the current number of iterations does not reach the maximum number of iterations, determine the current loss function value based on the preset loss function calculation rules, according to the current transformation parameters, each of the point pairs and each of the target weights; calculate the loss function difference between the current loss function value and the loss function value of the previous iteration cycle, and determine whether the loss function difference is less than the preset loss function threshold; if the current number of iterations reaches the maximum number of iterations, or the loss function difference is less than the preset loss function threshold, determine that the judgment result is that the current transformation parameters meet the convergence rules; if the loss function difference is greater than or equal to the loss function threshold, determine that the judgment result is that the current transformation parameters do not meet the convergence rules.
[0192] In some embodiments, when executing the step of acquiring the first point cloud data and the second point cloud data, the transceiver unit 601 is specifically used to:
[0193] The first point cloud data is obtained by scanning a target scene with a first scanning device; and the third point cloud data is obtained by scanning a target object in the target scene with a second scanning device, wherein the scanning accuracy of the second scanning device is higher than the scanning accuracy of the first scanning device; and the third point cloud data is converted into the coordinate system of the first point cloud data based on a preset initial transformation matrix by using the processing unit 602, so as to convert the third point cloud data into the second point cloud data.
[0194] In some embodiments, before executing the step of converting the third point cloud data into the coordinate system of the first point cloud data based on a preset initial conversion matrix, the processing unit 602 is further configured to:
[0195] The first scanning device and the second scanning device are jointly calibrated to obtain the initial conversion matrix.
[0196] In some embodiments, the first scanning device is a lidar scanning device, and the second scanning device is a structured light scanning device.
[0197] In some embodiments, after the transceiver unit 601 executes the step of acquiring the first point cloud data and the second point cloud data, the processing unit 602 is further configured to:
[0198] Performing data preprocessing on the first point cloud data and the second point cloud data to obtain processed candidate point cloud data of the first point cloud data and the second point cloud data, wherein the data preprocessing includes denoising processing, point cloud filtering processing, and normalization processing; performing edge detection processing and high-precision feature extraction processing on the candidate point cloud data to obtain processed second point cloud data, wherein the high-precision feature extraction processing includes key point detection processing, descriptor generation processing, and feature matching processing;
[0199] At this time, when the processing unit 602 executes the step of determining multiple point pairs from the first point cloud data and the second point cloud data according to the preset point pair distance threshold, it is specifically used to: determine multiple point pairs from the processed first point cloud data and the processed second point cloud data according to the preset point pair distance threshold.
[0200] In some embodiments, after executing the step of performing point cloud alignment processing on the first point cloud data and the second point cloud data according to the target transformation matrix, the processing unit 602 is further configured to:
[0201] Redundant point cloud data in the first point cloud data that overlaps with the second point cloud data is determined, and the redundant point cloud data is deleted to obtain a candidate model; texture mapping processing, color correction processing and seam processing are performed on the candidate model to obtain a target model.
[0202] In summary, the point cloud data processing device 600 in the embodiment of the present application not only considers whether the point pair is within the current point pair distance threshold when calculating the transformation parameters, but also considers the weight of each point pair, so that the obtained transformation parameters are more accurate, and the point cloud alignment processing is performed using the transformation matrix obtained according to the transformation parameters, which can improve the alignment accuracy between point clouds.
[0203] It should be noted that technicians in the relevant field can clearly understand that the specific implementation process of the above-mentioned point cloud data processing device and each unit can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and conciseness of the description, it will not be repeated here.
[0204] The above-mentioned point cloud data processing device can be implemented in the form of a computer program. The computer program can be used in Figure 7 Runs on the computer device shown.
[0205] See also Figure 7 , Figure 7 700 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 700 may be a terminal or a server.
[0206] See also Figure 7 The computer device 700 includes a processor 702 , a memory and a network interface 705 connected via a system bus 701 , wherein the memory may include a non-volatile storage medium 703 and an internal memory 704 .
[0207] The non-volatile storage medium 703 may store an operating system 7031 and a computer program 7032. The computer program 7032 includes program instructions, and when the program instructions are executed, the processor 702 may execute a point cloud data processing method.
[0208] The processor 702 is used to provide computing and control capabilities to support the operation of the entire computer device 700 .
[0209] The internal memory 704 provides an environment for the operation of the computer program 7032 in the non-volatile storage medium 703. When the computer program 7032 is executed by the processor 702, the processor 702 can execute a point cloud data processing method.
[0210] The network interface 705 is used to communicate with other devices over the network. Figure 7 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 700 to which the solution of the present application is applied. The specific computer device 700 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0211] The processor 702 is used to run the computer program 7032 stored in the memory to implement the following steps:
[0212] Acquire first point cloud data and second point cloud data, wherein feature point regions in the first point cloud data and the second point cloud data intersect;
[0213] Determine a plurality of point pairs from the first point cloud data and the second point cloud data according to a preset point pair distance threshold;
[0214] For each of the point pairs, determine a target weight of the point pair according to the curvature difference of the point pair, the normal of each point, the point density difference, and the distance difference;
[0215] Determining current transformation parameters according to each of the point pairs and each of the target weights;
[0216] Determine whether the current transformation parameters meet the preset convergence rules, and obtain a determination result;
[0217] According to the judgment result, it is determined whether to perform point cloud alignment processing on the first point cloud data and the second point cloud data.
[0218] It should be understood that in the embodiment of the present application, the processor 702 may be a central processing unit (CPU), and the processor 702 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0219] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.
[0220] Therefore, the present application also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the following steps:
[0221] Acquire first point cloud data and second point cloud data, wherein feature point regions in the first point cloud data and the second point cloud data intersect;
[0222] Determine a plurality of point pairs from the first point cloud data and the second point cloud data according to a preset point pair distance threshold;
[0223] For each of the point pairs, determine a target weight of the point pair according to the curvature difference of the point pair, the normal of each point, the point density difference, and the distance difference;
[0224] Determining current transformation parameters according to each of the point pairs and each of the target weights;
[0225] Determine whether the current transformation parameters meet the preset convergence rules, and obtain a determination result;
[0226] According to the judgment result, it is determined whether to perform point cloud alignment processing on the first point cloud data and the second point cloud data.
[0227] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.
[0228] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0229] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0230] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present application can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0231] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.
[0232] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A point cloud data processing method, characterized in that: include: Acquire first point cloud data and second point cloud data, wherein feature point regions in the first point cloud data and the second point cloud data intersect; Determine a plurality of point pairs from the first point cloud data and the second point cloud data according to a preset point pair distance threshold; For each of the point pairs, determining a target weight of the point pair; Determining current transformation parameters according to each of the point pairs and each of the target weights; Determine whether the current transformation parameters meet the preset convergence rules, and obtain a determination result; According to the judgment result, it is determined whether to perform point cloud alignment processing on the first point cloud data and the second point cloud data.
2. The method according to claim 1, characterized in that Determining the target weight of the point pair includes: The target weight of the point pair is determined based on at least one of a curvature difference of the point pair, a normal of each point, a point density difference, and a distance difference.
3. The method according to claim 2, characterized in that The determining the target weight of the point pair according to at least one of the curvature difference of the point pair, the normal of each point, the point density difference and the distance difference comprises: Obtaining the curvature difference, the normal of each point, the point density difference, and the distance difference; and / or determining a curvature weight according to the curvature difference and a preset curvature weight calculation rule; and / or determining a normal consistency weight according to the normal of each point and a preset normal consistency weight calculation rule; and / or determining a point density weight according to the point density difference and a preset point density calculation rule; and / or determining a distance weight according to the distance difference and a preset distance weight calculation rule; The target weight is determined according to at least one of the curvature weight, the normal consistency weight, the point density weight, and the distance weight.
4. The method according to claim 3, characterized in that The determining the target weight of the point pair according to at least one of the curvature difference of the point pair, the normal of each point, the point density difference and the distance difference comprises: The target weight is determined according to the curvature weight, the normal consistency weight, the point density weight, and the distance weight.
5. The method according to claim 3, characterized in that: The point pair includes a first feature point and a second feature point; and obtaining the curvature difference, the normal of each point, the point density difference, and the distance difference includes: Determine a first feature point group based on feature points in the first point cloud data that are located within a first preset area of the first feature point; and determine a second feature point group based on feature points in the second point cloud data that are located within a first preset area of the second feature point; Performing plane fitting processing on the first feature point group to obtain a first local plane; and performing plane fitting processing on the second feature point group to obtain a second local plane; Determine the curvature difference and the normal line according to the first local plane and the second local plane; Acquire the number of first feature points in the first point cloud data that are located within a second preset area of the first feature point; and acquire the number of second feature points in the second point cloud data that are located within a second preset area of the second feature point; Determine the density difference according to the number of the first feature points, the amount of data of the second feature points, and the area volume of the second preset area; A Euclidean distance between the first feature point and the second feature point is determined, and the Euclidean distance is used as the distance difference.
6. The method according to claim 1, characterized in that The step of determining whether to perform point cloud alignment processing on the first point cloud data and the second point cloud data according to the judgment result includes: If the judgment result is that the current transformation parameter does not meet the convergence condition, tighten the preset point pair distance threshold according to the preset distance threshold adjustment rule, and return to execute the step of determining a plurality of point pairs from the first point cloud data and the second point cloud data according to the preset point pair distance threshold, wherein the distance threshold adjustment rule indicates tightening the preset point pair distance threshold, and as the number of iterations increases, the value of the preset point pair distance threshold becomes smaller; If the judgment result is that the current transformation parameters meet the convergence condition, a target transformation matrix is determined according to the current transformation parameters, and point cloud alignment processing is performed on the first point cloud data and the second point cloud data according to the target transformation matrix.
7. The method according to claim 1, characterized in that The determining whether the current transformation parameters meet the preset convergence rule to obtain the determination result includes: Determine whether the current number of iterations reaches the preset maximum number of iterations; If the current number of iterations does not reach the maximum number of iterations, determining a current loss function value based on a preset loss function calculation rule according to the current transformation parameters, each of the point pairs, and each of the target weights; Calculate the loss function difference between the current loss function value and the loss function value of the previous iteration cycle, and determine whether the loss function difference is less than a preset loss function threshold; If the current number of iterations reaches the maximum number of iterations, or the loss function difference is less than the loss function threshold, determining that the judgment result is that the current transformation parameters meet the convergence rule; If the loss function difference is greater than or equal to the loss function threshold, it is determined that the judgment result is that the current transformation parameters do not meet the convergence rule.
8. The method according to claim 1, characterized in that The obtaining of the first point cloud data and the second point cloud data includes: Scanning a target scene with a first scanning device to obtain the first point cloud data; and scanning a target object in the target scene with a second scanning device to obtain third point cloud data, wherein the scanning accuracy of the second scanning device is higher than the scanning accuracy of the first scanning device; The third point cloud data is converted into a coordinate system of the first point cloud data based on a preset initial conversion matrix, so as to convert the third point cloud data into the second point cloud data.
9. The method according to claim 8, characterized in that Before converting the third point cloud data to the coordinate system of the first point cloud data based on a preset initial conversion matrix, the method further includes: The first scanning device and the second scanning device are jointly calibrated to obtain the initial conversion matrix.
10. The method according to claim 8, characterized in that The first scanning device is a laser radar scanning device, and the second scanning device is a structured light scanning device.
11. The method according to claim 1, characterized in that: After obtaining the first point cloud data and the second point cloud data, the method further includes: Performing data preprocessing on the first point cloud data and the second point cloud data to obtain processed candidate point cloud data of the first point cloud data and the second point cloud data, wherein the data preprocessing includes denoising processing, point cloud filtering processing, and normalization processing; Performing edge detection processing and high-precision feature extraction processing on the candidate point cloud data to obtain the processed second point cloud data, wherein the high-precision feature extraction processing includes key point detection processing, descriptor generation processing, and feature matching processing; The determining a plurality of point pairs from the first point cloud data and the second point cloud data according to a preset point pair distance threshold comprises: A plurality of point pairs are determined from the processed first point cloud data and the processed second point cloud data according to the preset point pair distance threshold.
12. The method according to any one of claims 1 to 11, characterized in that After performing point cloud alignment processing on the first point cloud data and the second point cloud data, the method further includes: Determine redundant point cloud data in the first point cloud data that overlaps with the second point cloud data, and delete the redundant point cloud data to obtain a candidate model; The candidate model is subjected to texture mapping processing, color correction processing and seam processing to obtain a target model.
13. A point cloud data processing device, characterized in that: include: A transceiver unit, used for acquiring first point cloud data and second point cloud data, wherein the point cloud accuracy of the second point cloud data is higher than the point cloud accuracy of the first point cloud data, and feature point areas in the first point cloud data and the second point cloud data intersect; a processing unit, configured to determine a plurality of point pairs from the first point cloud data and the second point cloud data according to a preset point pair distance threshold; For each of the point pairs, determining a target weight of the point pair; Determining current transformation parameters according to each of the point pairs and each of the target weights; Determine whether the current transformation parameters meet the preset convergence rules to obtain a determination result; and determine whether to perform point cloud alignment processing on the first point cloud data and the second point cloud data according to the determination result.
14. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the point cloud data processing method according to any one of claims 1 to 12 is implemented.
15. A storage medium, characterized in that: The storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, the processor executes the point cloud data processing method according to any one of claims 1 to 12.
Citation Information
Cited By
Unmanned vehicle obstacle identification method and system
CN119649339A
