A dynamic point cloud data compression method and device based on depth map matrix

By constructing a depth map matrix and dynamically adjusting preset column indices, combined with window filtering and column compression algorithms, the problems of low efficiency and accuracy in point cloud data compression are solved, achieving efficient point cloud data compression.

CN120692409BActive Publication Date: 2025-10-28SOUTH SURVEYING & MAPPING INSTR
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511180274.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-22
Publication Date
2025-10-28
Estimated Expiration
2045-08-22

AI Technical Summary

Technical Problem

The compression process of point cloud data in existing technologies is computationally complex, and the compression efficiency and accuracy are not high. Especially when LiDAR generates massive point cloud data, existing methods result in large file sizes and low compression accuracy.

Method used

By constructing a depth map matrix, point cloud data is compressed based on preset column indices and window filtering algorithms. The columns to be filled and compressed are dynamically adjusted using column compression algorithms and preset column transition conditions to achieve streaming compression of point cloud data.

Benefits of technology

It improves the compression efficiency and accuracy of point cloud data, avoids the efficiency drop caused by frequent coordinate transformations, and realizes real-time point cloud data compression.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120692409B_ABST
    Figure CN120692409B_ABST
Patent Text Reader

Abstract

This invention discloses a dynamic point cloud data compression method and apparatus based on a depth map matrix, belonging to the field of point cloud data compression technology. By constructing a depth map matrix and directly filling the first point cloud data into it, this invention avoids the decrease in point cloud compression efficiency caused by frequent coordinate transformations in existing technologies. By marking the column to be filled as the column to be compressed when the column transition condition is met, and redefining the column to be filled, as well as performing filtering on the individual columns to be compressed, noise interference can be reduced, and the depth value distribution of the second point cloud data in the column to be compressed can be smoothed, improving the efficiency and accuracy of subsequent point cloud compression. Furthermore, by compressing the third point cloud data in the column to be compressed after the column transition condition is met, it is not necessary to cache all data in the depth map matrix, enabling streaming, real-time compression operations, thereby improving the efficiency of point cloud data compression.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of point cloud data compression technology, and particularly relates to a dynamic point cloud data compression method and apparatus based on a depth map matrix. Background Technology

[0002] Point cloud data is a collection of discrete points in three-dimensional space. Each point is located using three-dimensional coordinates and can be associated with attributes such as color (RGB), intensity, and surface normal. In some scenarios, depth values ​​are used to represent the distance of each point relative to the sensor (i.e., the Euclidean distance from the point to the sensor origin). This depth value can be calculated from the coordinates or provided directly by the device. Point cloud data is currently widely used in fields such as 3D reconstruction and modeling, autonomous driving and robot navigation, terrain mapping and geological analysis. Most point cloud data is currently obtained through LiDAR scanning, which generates massive amounts of point cloud data. This data requires high real-time performance and needs to be transmitted instantly.

[0003] Because point cloud data contains a large amount of information, it needs to be compressed to facilitate transmission and alleviate data transfer pressure. Current point cloud data compression schemes mostly map polar coordinates to a Cartesian coordinate system, then recursively subdivide these mapped points, and finally use algorithms such as binary encoding and PCL compression to convert the point cloud data into a bitstream. However, this frequent coordinate transformation and recursive subdivision method leads to high computational complexity in the point cloud data compression process, reducing compression efficiency. Furthermore, the conversion to Cartesian coordinates before compression results in massive point cloud data volumes, leading to low compression accuracy and efficiency when dealing with the massive amounts of point cloud data generated by LiDAR. Therefore, there is an urgent need for a dynamic point cloud data compression method and device based on depth map matrices to overcome the shortcomings of existing technologies. Summary of the Invention

[0004] The present invention aims to provide a dynamic point cloud data compression method and apparatus based on a depth map matrix to solve the above-mentioned technical problems. By combining the columns to be filled and the columns to be compressed in the depth map matrix with a column compression algorithm, the compression of point cloud data is achieved, thereby improving the efficiency and accuracy of point cloud data compression.

[0005] To address the aforementioned technical problems, embodiments of the present invention provide a dynamic point cloud data compression method based on a depth map matrix, comprising:

[0006] Several first point cloud data are acquired based on a preset lidar, and a depth map matrix is ​​constructed based on the lidar;

[0007] Based on the azimuth angle of the first point cloud data, the column to be filled in the depth map matrix is ​​determined, and the first point cloud data is sequentially filled into the column to be filled until the elevation angle of the first point cloud data in the column to be filled meets the preset column jump condition.

[0008] The column to be filled is marked as the column to be compressed based on the preset column index cursor, and several second point cloud data in the column to be compressed are obtained, and the column to be filled is re-determined;

[0009] The second point cloud data is filtered according to a preset window filtering algorithm to obtain several third point cloud data.

[0010] The third point cloud data is compressed according to a preset column compression algorithm to obtain the bit stream corresponding to the third point cloud data in the column to be compressed;

[0011] The first point cloud data that was not filled into the depth map matrix is ​​sequentially filled into the newly determined columns to be filled, and then the columns to be compressed are re-marked, and the bit stream corresponding to the third point cloud data in the columns to be compressed is obtained, until all the first point cloud data is filled into the depth map matrix, the compression of the first point cloud data is completed, and the bit stream set of the first point cloud data is obtained.

[0012] Understandably, compared to existing technologies, this invention acquires several first point cloud data and constructs a depth map matrix using lidar, enabling the depth map matrix to adapt to the first point cloud data. It fills the first point cloud data into the columns to be filled in the depth map matrix, and when a preset column transition condition is met, marks the column to be filled as a column to be compressed, and re-determines new columns to be filled. Then, it filters the second point cloud data in the column to be compressed using a preset window filtering algorithm and compresses the third point cloud data in the column to be compressed using a column compression algorithm, obtaining the bitstream corresponding to the third point cloud data in the column to be compressed. Then, it continues to fill the re-determined columns to be filled with the first point cloud data that has not yet been filled into the depth map matrix, re-marking the columns to be compressed, and then calculating the bitstream corresponding to the third point cloud data in the new columns to be compressed, until all the first point cloud data is filled into the depth map matrix, completing the compression of the first point cloud data and obtaining a set of bitstreams of the first point cloud data, thus achieving dynamic compression of point cloud data based on the depth map matrix. This invention avoids the decrease in point cloud compression efficiency caused by frequent coordinate transformations in existing technologies by constructing a depth map matrix and directly filling the first point cloud data into the depth map matrix. By marking the column to be filled as the column to be compressed when the column transition condition is met, and redefining the column to be filled, as well as performing filtering processing on the individual column to be compressed, noise interference can be reduced, the depth value distribution of the second point cloud data in the column to be compressed can be smoothed, and the efficiency and accuracy of subsequent point cloud compression can be improved. By compressing the third point cloud data of the column to be compressed after the column transition condition is met, it is not necessary to cache all the data of the depth map matrix, which can realize streaming and real-time compression operation, thereby improving the efficiency of point cloud data compression.

[0013] As a preferred embodiment, the step of acquiring several first point cloud data based on a preset lidar and constructing a depth map matrix based on the lidar includes:

[0014] The maximum elevation angle scanning value is determined based on the preset number of elevation angle encoding grids of the lidar, and the maximum azimuth angle scanning value is determined based on the number of azimuth angle encoding grids of the lidar.

[0015] The lidar is controlled to scan point cloud data in the order of azimuth angle from zero to the maximum azimuth angle and elevation angle from zero to the maximum elevation angle, and the data is collected in combination with a preset measurement accuracy to obtain a number of initial point cloud data. The number of initial point cloud data are arranged in the order of azimuth angle from small to large and elevation angle from small to large.

[0016] Based on the azimuth, elevation and depth values ​​of the initial point cloud data, the initial point cloud data are preprocessed to obtain a number of first point cloud data, wherein the number of first point cloud data are arranged in order of azimuth from smallest to largest and elevation from smallest to largest.

[0017] The number of rows in the depth map matrix is ​​determined based on the number of elevation angle encoding grids of the lidar, and the number of columns in the depth map matrix is ​​combined with the preset number of columns in the depth map matrix to determine the construction of the depth map matrix.

[0018] This preferred solution determines the scanning range of elevation and azimuth angles using relevant parameters of the lidar, and collects point cloud data according to preset measurement accuracy and sequence. This ensures that the initial point cloud data can be arranged in a certain order, providing a structured data foundation for the subsequent filling and compression of the depth map matrix. Furthermore, the depth map matrix is ​​constructed based on the number of elevation angle encoding grids of the lidar, enabling the depth map matrix to better adapt to the first point cloud data, further improving the efficiency and accuracy of subsequent point cloud compression.

[0019] As a preferred embodiment, the initial point cloud data is preprocessed based on the azimuth, elevation, and depth values ​​to obtain a plurality of first point cloud data, including:

[0020] Based on the depth value of the initial point cloud data, abnormal initial point cloud data in the initial point cloud data are identified, and the abnormal initial point cloud data are removed to obtain several fourth point cloud data.

[0021] Based on the depth value of the fourth point cloud data, data of the fourth point cloud data with the same azimuth and elevation angle are removed so that only one fourth point cloud data exists at each azimuth and elevation angle, resulting in several first point cloud data.

[0022] This preferred solution first removes abnormal initial point cloud data, improving the accuracy and efficiency of subsequent point cloud filtering and compression. Then, it removes duplicate data with the same azimuth and elevation angles, ensuring that each azimuth and elevation angle uniquely corresponds to one data point, avoiding data redundancy, reducing the amount of data, thereby reducing the complexity of subsequent point cloud filtering and compression, and improving the efficiency and accuracy of point cloud compression.

[0023] As a preferred embodiment, the step of determining the column to be filled in the depth map matrix based on the azimuth angle of the first point cloud data, and sequentially filling the column with the first point cloud data until the elevation angle of the first point cloud data in the column to be filled meets the preset column transition condition, includes:

[0024] Based on the azimuth and elevation angles of each of the first point cloud data, determine the row index and column index of each of the first point cloud data;

[0025] The column to be filled in the depth map matrix is ​​determined based on the column index of the first point cloud data, and the depth values ​​of the first point cloud data are sequentially filled into the column to be filled based on the row index of the first point cloud data until the elevation angle of the first point cloud data in the column to be filled meets the preset column jump condition.

[0026] This preferred solution determines the row and column indices by using azimuth and elevation angles, which establishes an intuitive and concise data mapping relationship and enables precise positioning of the first point cloud data in the depth map matrix. Subsequently, by combining the column jump condition and the judgment between elevation angles, the ordered nature of the data to be filled in the column is ensured, thereby improving the efficiency and accuracy of subsequent point cloud data compression.

[0027] As a preferred embodiment, determining the row index and column index of each first point cloud data based on the azimuth and elevation angles of each first point cloud data includes:

[0028] Use the elevation angle of each first point cloud data as the row index of each first point cloud data;

[0029] The remainder of dividing the azimuth angle of each first point cloud data by the preset number of columns in the depth map matrix is ​​used as the column index of each first point cloud data.

[0030] This preferred solution simplifies the index construction process by using the elevation angle as the row index and the remainder of the azimuth angle divided by the number of columns in the depth map matrix as the column index. This enables rapid mapping between point cloud data and the depth map matrix and preserves the spatial correlation of the first point cloud data, thereby improving the efficiency of subsequent depth map matrix filling and ultimately improving the efficiency and accuracy of point cloud compression.

[0031] As a preferred embodiment, the column to be filled in the depth map matrix is ​​determined based on the column index of the first point cloud data, and the depth values ​​of the first point cloud data are sequentially filled into the column to be filled based on the row index of the first point cloud data until the elevation angle of the first point cloud data in the column to be filled meets the preset column transition condition, including:

[0032] Compare the column indexes of the first point cloud data to determine the minimum value of all column indexes;

[0033] The column of the depth map matrix corresponding to the minimum value of all column indices is taken as the column to be filled in the depth map matrix, and the depth values ​​of the first point cloud data are sequentially filled into the column to be filled in.

[0034] Before each time the depth value of the first point cloud data is filled into the column to be filled, the row index of the first point cloud data corresponding to the last depth value filled in the current column to be filled is detected.

[0035] If the row index of the first point cloud data corresponding to the last depth value to be filled in the current column is equal to the maximum elevation angle scan value, it is determined that the elevation angle of the first point cloud data in the column to be filled meets the preset column jump condition, and the filling of the column to be filled is stopped.

[0036] This preferred solution determines the columns to be filled by comparing column indices and fills the depth values ​​into these columns. Simultaneously, it uses the row index to perform column transitions, achieving dynamic filling and automatic column switching of the depth map matrix. This ensures the continuity of elevation angle data corresponding to each depth value in the columns to be filled. Furthermore, it stops filling the column after meeting preset column transition conditions, guaranteeing consistency in the quantity of each column to be filled, avoiding excessive data accumulation, reducing the data complexity of each column, and enabling streaming depth map matrix filling. This, in turn, improves the efficiency and accuracy of subsequent point cloud compression.

[0037] As a preferred embodiment, the step of marking the column to be filled as the column to be compressed based on a preset column index cursor, obtaining several second point cloud data in the column to be compressed, and redetermining the column to be filled includes:

[0038] Move the preset column index cursor in the depth map matrix to align the column index cursor with the column to be filled, thereby marking the column to be filled as the column to be compressed;

[0039] Based on the maximum integer depth value of the lidar, the depth value of each first point cloud data in the column to be compressed is mapped to obtain several second point cloud data in the column to be compressed.

[0040] If the column to be compressed is the last column of the depth map matrix, then the first column of the depth map matrix is ​​used as the new column to be filled in the depth map matrix;

[0041] If the column to be compressed is not the last column of the depth map matrix, then the next column of the column to be compressed is taken as the new column to be filled in the depth map matrix.

[0042] This preferred scheme uses column index cursors to mark the columns to be filled that meet the column transition conditions, enabling precise positioning of the columns to be compressed. This parallelizes depth map matrix filling and point cloud compression, ensuring the accuracy and efficiency of subsequent point cloud filtering and compression. By mapping the maximum integer depth value of the LiDAR to the depth value of each first point cloud data in the column to be compressed, the depth values ​​are unified into the same dimensional range, avoiding data tearing and improving the efficiency and accuracy of subsequent point cloud compression. By determining whether the column to be compressed is the last column of the depth map matrix, the column to be filled is redefined, enabling the reuse of the depth map matrix and ensuring the continuity and efficiency of point cloud compression.

[0043] As a preferred embodiment, the step of filtering the second point cloud data according to a preset window filtering algorithm to obtain several third point cloud data specifically includes:

[0044] Obtain the neighborhood window for each of the second point cloud data;

[0045] When the depth value of the second point cloud data is an invalid depth value, the minimum valid depth value in the neighborhood window is selected and replaced with the depth value of the second point cloud data.

[0046] Calculate and filter the difference between each effective depth value and the depth value of the second point cloud data in the neighborhood window of the second point cloud data to obtain the extreme value of the depth difference of each second point cloud data.

[0047] Based on the depth difference extreme value and the preset gradient threshold, the depth value of each second point cloud data is corrected to obtain several third point cloud data.

[0048] This preferred solution uses a window filtering algorithm to filter the second point cloud data, eliminating invalid depth values ​​and improving the effectiveness and accuracy of subsequent point cloud compression. By calculating the depth difference extreme value and a preset gradient threshold, the second point cloud data in the column to be compressed can be smoothed, effectively correcting anomalies in the second point cloud data and further ensuring the accuracy and consistency of the second point cloud data, thereby improving the accuracy of subsequent point cloud compression.

[0049] As a preferred embodiment, the step of compressing the third point cloud data according to a preset column compression algorithm to obtain the bitstream corresponding to the third point cloud data in the column to be compressed includes:

[0050] The difference between the depth values ​​of two adjacent third point cloud data in the column to be compressed is calculated sequentially to obtain an initial depth value difference sequence;

[0051] According to the preset positive and negative number remapping formula, all data in the initial depth value difference sequence are mapped to obtain the first depth value difference sequence;

[0052] Identify a continuous zero-value sequence in the first depth value difference sequence, and perform zero-value run-length encoding on the first depth value difference sequence based on the continuous zero-value sequence to obtain a second depth value difference sequence;

[0053] Each data point in the second depth value difference sequence is converted into binary data to obtain the third depth value difference sequence;

[0054] Based on the preset grouping bit length, each binary data in the third depth value difference sequence is grouped starting from the least significant bit to obtain several initial grouping data for each binary data.

[0055] Add a control bit to the most significant bit of each initial group data to obtain the first group data corresponding to each initial group data;

[0056] All the first group data are used as the bit stream corresponding to the third point cloud data in the column to be compressed.

[0057] This preferred scheme achieves compression of third-point cloud data by combining differential coding, positive and negative remapping, zero-value run-length encoding, and binary grouping conversion. Differential coding reduces data redundancy, and the positive and negative remapping formula ensures the sign consistency of all data in the initial depth value difference sequence. Zero-value run-length encoding further reduces the data space occupied. By grouping binary data and adding control bits, variable-length encoding is achieved, thereby improving the accuracy of point cloud compression.

[0058] Accordingly, this invention provides a dynamic point cloud data compression device based on a depth map matrix, comprising: a data acquisition module, a depth map matrix filling module, a column to be compressed determination module, a point cloud data filtering module, a point cloud data compression module, and a point cloud data iterative processing module;

[0059] The data acquisition module is used to acquire several first point cloud data based on a preset lidar, and to construct a depth map matrix based on the lidar.

[0060] The depth map matrix filling module is used to determine the column to be filled in the depth map matrix based on the azimuth angle of the first point cloud data, and fill the first point cloud data into the column to be filled in sequentially until the elevation angle of the first point cloud data in the column to be filled meets the preset column jump condition.

[0061] The column to be compressed determination module is used to mark the column to be filled as the column to be compressed based on a preset column index cursor, obtain several second point cloud data in the column to be compressed, and redetermine the column to be filled;

[0062] The point cloud data filtering module is used to filter the second point cloud data according to a preset window filtering algorithm to obtain several third point cloud data.

[0063] The point cloud data compression module is used to compress the third point cloud data according to a preset column compression algorithm to obtain the bit stream corresponding to the third point cloud data in the column to be compressed.

[0064] The point cloud data iterative processing module is used to sequentially fill the first point cloud data that has not been filled into the depth map matrix into the newly determined columns to be filled, and then re-mark the columns to be compressed, and obtain the bit stream corresponding to the third point cloud data in the columns to be compressed, until all the first point cloud data is filled into the depth map matrix, thereby completing the compression of the first point cloud data and obtaining the bit stream set of the first point cloud data.

[0065] Understandably, compared to existing technologies, this embodiment acquires several first point cloud data and constructs a depth map matrix using LiDAR, enabling the depth map matrix to adapt to the first point cloud data. The first point cloud data is then filled into the columns to be filled in the depth map matrix. When a preset column transition condition is met, the column to be filled is marked as a column to be compressed, and a new column to be filled is determined. Then, a preset window filtering algorithm is used to filter the second point cloud data in the column to be compressed, and a column compression algorithm is used to compress the third point cloud data in the column to be compressed, obtaining the bitstream corresponding to the third point cloud data in the column to be compressed. Then, the first point cloud data not yet filled into the depth map matrix is ​​sequentially filled into the newly determined columns to be filled, and the columns to be compressed are re-marked. The bitstream corresponding to the third point cloud data in the new columns to be compressed is then calculated, until all the first point cloud data is filled into the depth map matrix, completing the compression of the first point cloud data and obtaining a set of bitstreams of the first point cloud data. This achieves dynamic compression of point cloud data based on the depth map matrix. This invention avoids the decrease in point cloud compression efficiency caused by frequent coordinate transformations in existing technologies by constructing a depth map matrix and directly filling the first point cloud data into the depth map matrix. By marking the column to be filled as the column to be compressed when the column transition condition is met, and redefining the column to be filled, as well as performing filtering processing on the individual column to be compressed, noise interference can be reduced, the depth value distribution of the second point cloud data in the column to be compressed can be smoothed, and the efficiency and accuracy of subsequent point cloud compression can be improved. By compressing the third point cloud data of the column to be compressed after the column transition condition is met, it is not necessary to cache all the data of the depth map matrix, which can realize streaming and real-time compression operation, thereby improving the efficiency of point cloud data compression. Attached Figure Description

[0066] Figure 1 A flowchart illustrating the steps of a dynamic point cloud data compression method based on a depth map matrix, provided in an embodiment of the present invention;

[0067] Figure 2 This is a schematic diagram of a dynamic point cloud data compression device based on a depth map matrix, provided in an embodiment of the present invention. Detailed Implementation

[0068] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0069] Example 1

[0070] Please refer to Figure 1 , Figure 1The flowchart of a dynamic point cloud data compression method based on a depth map matrix provided in this embodiment of the invention includes steps S101 to S106.

[0071] It should be noted that LiDAR (Light Detection and Ranging) is an active optical remote sensing technology that measures spatial information by emitting laser pulses and receiving reflected signals from targets, thereby outputting point cloud data. The point cloud data output by LiDAR is generally in polar coordinate form; that is, each point cloud data output by each LiDAR typically represents the following format: ; It is the azimuth angle. Angle of elevation The depth value represents the depth of the LiDAR. Azimuth represents the horizontal rotation angle of the LiDAR, and elevation represents the vertical rotation angle. The depth value is the mapped value of the actual distance measured by the LiDAR under the azimuth and phase angles. The elevation encoding resolution of the LiDAR refers to the minimum number of angular units in the vertical direction; the azimuth encoding resolution refers to the minimum number of angular units in the horizontal direction.

[0072] Step S101: Acquire several first point cloud data based on a preset lidar, and construct a depth map matrix based on the lidar.

[0073] In this embodiment, the step of acquiring several first point cloud data based on a preset lidar and constructing a depth map matrix based on the lidar includes:

[0074] The maximum elevation angle scanning value is determined based on the preset number of elevation angle encoding grids of the lidar, and the maximum azimuth angle scanning value is determined based on the number of azimuth angle encoding grids of the lidar.

[0075] The lidar is controlled to scan point cloud data in the order of azimuth angle from zero to the maximum azimuth angle and elevation angle from zero to the maximum elevation angle, and the data is collected in combination with a preset measurement accuracy to obtain a number of initial point cloud data. The number of initial point cloud data are arranged in the order of azimuth angle from small to large and elevation angle from small to large.

[0076] Based on the azimuth, elevation and depth values ​​of the initial point cloud data, the initial point cloud data are preprocessed to obtain a number of first point cloud data, wherein the number of first point cloud data are arranged in order of azimuth from smallest to largest and elevation from smallest to largest.

[0077] The number of rows in the depth map matrix is ​​determined based on the number of elevation angle encoding grids of the lidar, and the number of columns in the depth map matrix is ​​combined with the preset number of columns in the depth map matrix to determine the construction of the depth map matrix.

[0078] This embodiment determines the scanning range of elevation and azimuth angles using relevant parameters of the lidar, and collects point cloud data according to preset measurement accuracy and sequence. This ensures that the initial point cloud data can be arranged in a certain order, providing a structured data foundation for the subsequent filling and compression of the depth map matrix. Furthermore, the depth map matrix is ​​constructed based on the number of elevation angle encoding grids of the lidar, enabling the depth map matrix to better adapt to the first point cloud data, further improving the efficiency and accuracy of subsequent point cloud compression.

[0079] In this embodiment, based on the azimuth, elevation, and depth values ​​of the initial point cloud data, the several initial point cloud data are preprocessed to obtain several first point cloud data, including:

[0080] Based on the depth value of the initial point cloud data, abnormal initial point cloud data in the initial point cloud data are identified, and the abnormal initial point cloud data are removed to obtain several fourth point cloud data.

[0081] Based on the depth value of the fourth point cloud data, data of the fourth point cloud data with the same azimuth and elevation angle are removed so that only one fourth point cloud data exists at each azimuth and elevation angle, resulting in several first point cloud data.

[0082] This embodiment first removes abnormal initial point cloud data, improving the accuracy and efficiency of subsequent point cloud filtering and compression. Then, it removes duplicate data with the same azimuth and elevation angles, ensuring that each azimuth and elevation angle uniquely corresponds to one data point, avoiding data redundancy, simplifying the data volume, thereby reducing the complexity of subsequent point cloud filtering and compression, and improving the efficiency and accuracy of point cloud compression.

[0083] In an optional embodiment, the number of elevation angle coding grids of the lidar is defined as The number of azimuth coding grids for a lidar is defined as follows: Therefore, the maximum value of the elevation angle scan is The maximum value of the azimuth scan is The preset measurement accuracy is set to the minimum measurement accuracy of the lidar. Then, control the lidar to scan from zero to the maximum azimuth angle. And the elevation angle from zero to The order of measurement accuracy Point cloud data is collected, resulting in several initial point cloud data sets. These initial point cloud data sets are arranged in ascending order of azimuth and elevation angles; and the azimuth angle of each initial point cloud data set satisfies... The elevation angle satisfies The depth value satisfies ; Indicates the first The azimuth angle of the initial point cloud data. Indicates the first The elevation angle of the initial point cloud data Indicates the first The depth value of the initial point cloud data. Indicates the first The actual distance to the target corresponding to each initial point cloud data. Indicates to Rounding operation;

[0084] It should be noted that after acquiring point cloud data, the lidar needs to quantize the azimuth angle to the nearest azimuth encoding grid and the elevation angle to the nearest elevation encoding grid, and convert the measured target distance into a depth value. Therefore, this optional embodiment determines the maximum elevation scanning value by the number of elevation encoding grids and the maximum azimuth scanning value by the number of azimuth encoding grids. It also acquires point cloud data with the minimum measurement accuracy of the lidar, which can omit the quantization process of azimuth and elevation angles and ensure that the quantization method of depth value is consistent with the angle encoding (i.e., the quantization of azimuth and elevation angles). This results in the azimuth, elevation, and depth values ​​of the initial point cloud data all being integers. This reduces the data processing flow and thus improves the overall compression efficiency of point cloud data.

[0085] It should be noted that, at each azimuth and elevation angle, LiDAR will generate multiple echo points due to laser reflection, equipment vibration, and other reasons. This means that multiple depth values ​​will be generated in the same angular direction. These multiple depth values ​​cause data redundancy and errors. Therefore, these data need to be preprocessed before point cloud compression.

[0086] In one optional embodiment, abnormal initial point cloud data refers to a depth value of zero, a negative value, or a value exceeding the maximum ranging range of the lidar. Abnormal initial point cloud data is identified in the initial point cloud data, and the abnormal initial point cloud data is removed to obtain several fourth point cloud data. Then, for the fourth point cloud data with the same azimuth and elevation angles, the point cloud data with the smallest depth value is identified and retained, and the remaining fourth point cloud data with the same azimuth and elevation angles are removed, so that there is only one fourth point cloud data with the smallest depth value at each azimuth and elevation angle, thus obtaining several first point cloud data.

[0087] It should be noted that since the laser emitted by the lidar can only penetrate a transparent or semi-transparent object once, the closer the object is, the greater the true distance to the target, i.e., the smallest depth value. Therefore, this optional embodiment can improve the effectiveness and accuracy of the first point cloud data by retaining the fourth point cloud data with the smallest depth value among the fourth point cloud data with the same azimuth and elevation angles, thereby improving the accuracy and precision of subsequent point cloud compression.

[0088] In an alternative embodiment, the elevation angle of the lidar is encoded in grids. As the row number of the depth map matrix The default depth map matrix column count is set to 100, which is the number of columns in the depth map matrix. The number of rows in the depth map matrix In particular, by setting the number of rows in the depth map matrix to the number of elevation angle encoding grids, it can be adapted to the elevation angle of the first point cloud data. The number of columns in the depth map matrix is ​​set to 100 because this embodiment performs column filling and column compression in parallel, so the columns can be refreshed cyclically. Therefore, there is no need to set the number of columns too large. The number of columns in the depth map matrix in this embodiment is not limited to 100 and can be modified according to actual needs.

[0089] Step S102: Determine the column to be filled in the depth map matrix based on the azimuth angle of the first point cloud data, and fill the column to be filled in the first point cloud data in sequence until the elevation angle of the first point cloud data in the column to be filled meets the preset column jump condition.

[0090] In this embodiment, the step of determining the column to be filled in the depth map matrix based on the azimuth angle of the first point cloud data, and sequentially filling the column with the first point cloud data until the elevation angle of the first point cloud data in the column to be filled meets the preset column transition condition, includes:

[0091] Based on the azimuth and elevation angles of each of the first point cloud data, determine the row index and column index of each of the first point cloud data;

[0092] The column to be filled in the depth map matrix is ​​determined based on the column index of the first point cloud data, and the depth values ​​of the first point cloud data are sequentially filled into the column to be filled based on the row index of the first point cloud data until the elevation angle of the first point cloud data in the column to be filled meets the preset column jump condition.

[0093] This embodiment determines the row and column indices by using azimuth and elevation angles, which enables the establishment of an intuitive and concise data mapping relationship and achieves accurate positioning of the first point cloud data in the depth map matrix. Subsequently, by combining the column jump condition and the judgment between elevation angle, the order of the data to be filled in the column is ensured, thereby improving the efficiency and accuracy of subsequent point cloud data compression.

[0094] In this embodiment, determining the row index and column index of each first point cloud data based on the azimuth and elevation angles of each first point cloud data includes:

[0095] Use the elevation angle of each first point cloud data as the row index of each first point cloud data;

[0096] The remainder of dividing the azimuth angle of each first point cloud data by the preset number of columns in the depth map matrix is ​​used as the column index of each first point cloud data.

[0097] This embodiment simplifies the index construction process by using the elevation angle as the row index and the remainder of the azimuth angle divided by the number of columns in the depth map matrix as the column index. This enables rapid mapping between point cloud data and the depth map matrix and preserves the spatial correlation of the first point cloud data, thereby improving the efficiency of subsequent depth map matrix filling and ultimately improving the efficiency and accuracy of point cloud compression.

[0098] In this embodiment, the column to be filled in the depth map matrix is ​​determined based on the column index of the first point cloud data, and the depth values ​​of the first point cloud data are sequentially filled into the column to be filled based on the row index of the first point cloud data until the elevation angle of the first point cloud data in the column to be filled meets the preset column transition condition, including:

[0099] Compare the column indexes of the first point cloud data to determine the minimum value of all column indexes;

[0100] The column of the depth map matrix corresponding to the minimum value of all column indices is taken as the column to be filled in the depth map matrix, and the depth values ​​of the first point cloud data are sequentially filled into the column to be filled in.

[0101] Before each time the depth value of the first point cloud data is filled into the column to be filled, the row index of the first point cloud data corresponding to the last depth value filled in the current column to be filled is detected.

[0102] If the row index of the first point cloud data corresponding to the last depth value to be filled in the current column is equal to the maximum elevation angle scan value, it is determined that the elevation angle of the first point cloud data in the column to be filled meets the preset column jump condition, and the filling of the column to be filled is stopped.

[0103] This embodiment determines the column to be filled by comparing column indices and fills the depth value into the column. At the same time, it combines the size of the row index to perform column switching, realizing dynamic filling and automatic column switching of the depth map matrix. This ensures the continuity of the elevation angle data corresponding to each depth value in the column to be filled, and stops filling the column after the preset column switching condition is met. This can ensure the consistency of the quantity of each column to be filled, avoid excessive data accumulation, reduce the data complexity of each column to be filled, realize streaming depth map matrix filling, and thus improve the efficiency and accuracy of subsequent point cloud compression.

[0104] In an optional embodiment, the elevation angle of each first point cloud data is used as the row index of each first point cloud data, and the remainder of the azimuth angle of each first point cloud data divided by the preset number of columns of the depth map matrix is ​​used as the column index of each first point cloud data. That is, for each first point cloud data, its row index is denoted as... Its column index is denoted as ;in, Indicates the first The row index of the first point cloud data. Indicates the first The column index of the first point cloud data; Indicates the first The azimuth angle of the initial point cloud data. Indicates the first The elevation angle of the initial point cloud data; This indicates the modulo operation.

[0105] It should be noted that, in the initial point cloud data acquisition process described above, the maximum elevation angle scan value was determined by the number of elevation angle encoding grids, and the maximum azimuth angle scan value was determined by the number of azimuth angle encoding grids. Point cloud data acquisition was performed using the minimum measurement accuracy of the lidar. Furthermore, the elevation angle encoding grids were used when constructing the depth map matrix. Therefore, when calculating the row index of each first point cloud data, floating-point operations are not required. The elevation angle can be directly used as the row index, which enables fast index calculation and indirectly improves the efficiency of point cloud compression. When calculating the column index, the remainder of the azimuth angle divided by the number of columns in the depth map matrix is ​​used to ensure that all azimuth angles can be cyclically mapped to the range of 0 to 99.

[0106] In one optional embodiment, the column indices of the first point cloud data are compared, and the column of the depth map matrix corresponding to the smallest column index value is taken as the column to be filled in the depth map matrix, that is, as the current column of the depth map matrix; after determining the column to be filled in, the depth values ​​of the first point cloud data are sequentially filled into the column to be filled in.

[0107] It should be noted that, since the initial point cloud data in this embodiment is arranged in ascending order of azimuth and elevation angles, and the first point cloud data is also arranged in ascending order of azimuth and elevation angles, in order to avoid the first point cloud data being missed in the depth map matrix, and to ensure the consistency and continuity of the first point cloud data in compression and acquisition, this embodiment uses the column of the depth map matrix corresponding to the smallest column index value as the initial column to be filled. This ensures that each first point cloud data can be filled into the depth map matrix and compressed in subsequent steps, thereby ensuring the integrity and accuracy of point cloud compression.

[0108] It should be noted that since the first point cloud data is already arranged in order of azimuth from smallest to largest and elevation from smallest to largest, and the row index is the azimuth, the corresponding depth value can be directly filled into the column to be filled without having to search for the corresponding filling position in the depth map based on the row index. This can further improve the filling efficiency of the depth map matrix, thereby improving the efficiency of point cloud compression.

[0109] In one optional embodiment, after the first point cloud data is first filled into the column to be filled, the azimuth angle of the first point cloud data is used as the azimuth angle value of the column to be filled.

[0110] In an optional embodiment, each time the depth value of the first point cloud data is filled into the column to be filled in the depth map matrix, the row index of the first point cloud data corresponding to the last depth value filled in the current column to be filled is detected. When this row index is equal to the maximum elevation angle scan value, it is determined that the elevation angle of the first point cloud data in the column to be filled meets the preset column jump condition, that is, the column to be filled is full, and the filling of the current column to be filled is stopped.

[0111] Furthermore, when the first point cloud data is first filled into the column to be filled, since the column is empty at this time, that is, there is no depth value, and therefore no corresponding row index. It also cannot be equal to the maximum elevation angle scan value. Therefore, the first point cloud data can be directly input into the column to be filled. When the column to be filled is not empty, the row index of the first point cloud data corresponding to the last filled depth value in the current column to be filled can be compared. Since the elevation angle of the first point cloud data in this embodiment is arranged in ascending order, and the range of elevation angle is from zero to the maximum elevation angle scan value, and the row index is equal to the size of the elevation angle, when the row index is equal to the maximum elevation angle scan value, it indicates that the column index of the next first point cloud data to be input has changed. That is, the next first point cloud data to be input does not belong to the column to be filled. At this time, it is necessary to switch columns for input.

[0112] It should be noted that, due to the scanning method of the LiDAR described above, the first point cloud data is already arranged in ascending order of azimuth and elevation angles, and the row index equals the elevation angle. Therefore, it is only necessary to check the row index of the last first point cloud data to be filled in the column. If it equals the maximum elevation angle, it indicates that the row index of the next first point cloud data to be filled in that column is zero. Since the first point cloud data is already arranged in ascending order of azimuth and elevation angles, it can be seen that the column index of the next first point cloud data to be filled in that column has changed, requiring a change of column input. This embodiment uses the jump from the maximum elevation angle (i.e., elevation angle) to the minimum elevation angle (i.e., zero) as a sign that the column to be filled is full and a change of column input is required. This has high reliability, can further avoid data fluctuation problems, and can also avoid the complex calculations required by existing technologies to continuously perform depth map queries based on row and column indices. By comparing values ​​alone, data complexity can be reduced, thereby improving the efficiency and accuracy of point cloud compression.

[0113] Step S103: Mark the column to be filled as the column to be compressed based on the preset column index cursor, obtain several second point cloud data in the column to be compressed, and redetermine the column to be filled.

[0114] In this embodiment, the step of marking the column to be filled as the column to be compressed based on a preset column index cursor, obtaining several second point cloud data in the column to be compressed, and redetermining the column to be filled includes:

[0115] Move the preset column index cursor in the depth map matrix to align the column index cursor with the column to be filled, thereby marking the column to be filled as the column to be compressed;

[0116] Based on the maximum integer depth value of the lidar, the depth value of each first point cloud data in the column to be compressed is mapped to obtain several second point cloud data in the column to be compressed.

[0117] If the column to be compressed is the last column of the depth map matrix, then the first column of the depth map matrix is ​​used as the new column to be filled in the depth map matrix;

[0118] If the column to be compressed is not the last column of the depth map matrix, then the next column of the column to be compressed is taken as the new column to be filled in the depth map matrix.

[0119] This embodiment uses a column index cursor to mark the columns to be filled that meet the column transition conditions, enabling precise positioning of the columns to be compressed. This parallelizes depth map matrix filling and point cloud compression, ensuring the accuracy and efficiency of subsequent point cloud filtering and compression. By mapping the depth value of each first point cloud data in the column to be compressed to the maximum integer depth value of the LiDAR, the depth values ​​are unified into the same dimensional range, avoiding data tearing and improving the efficiency and accuracy of subsequent point cloud compression. By determining whether the column to be compressed is the last column of the depth map matrix to redetermine the columns to be filled, the depth map matrix is ​​reused, ensuring the continuity and efficiency of point cloud compression.

[0120] In an optional embodiment, a preset column index cursor is used to mark the column to be filled that has been filled with the first point cloud data. Therefore, the column index cursor is moved in the depth map matrix to align the column to be filled with the column to be filled, so as to mark the column to be filled as the column to be compressed.

[0121] Furthermore, since the rate of point cloud compression and the rate of filling the first point cloud data in subsequent steps may be inconsistent, in order to avoid accumulating too much first point cloud data that has not been filled into the depth map matrix, this optional embodiment sets the column index cursor to 20 columns, that is, the column index cursor can mark a maximum of 20 columns that have been filled with the first point cloud data.

[0122] In an alternative embodiment, based on the maximum integer depth value of the lidar The depth value of each first point cloud data in the column to be compressed is mapped to obtain several second point cloud data in the column to be compressed; the specific mapping formula is as follows: ;

[0123] in, This represents the mapped depth value, which is a short integer. This is the maximum integer depth value of the lidar, which can be obtained directly from the lidar. This represents the rounding function.

[0124] It should be noted that mapping depth values ​​based on the maximum integer depth value of the LiDAR can further compress the data space occupied by the depth values ​​in the column to be compressed, thereby further improving the efficiency and accuracy of point cloud compression.

[0125] In one optional embodiment, the column index of the column to be compressed is determined. If the column index is equal to 99, that is, the column to be compressed is the last column of the depth map matrix, then the first column of the depth map matrix needs to be used as the new column to be filled in the depth map matrix. If the column index is not equal to 99, then the column to be compressed is not the last column of the depth map matrix, and the next column of the column to be compressed is used as the new column to be filled in the depth map matrix.

[0126] Furthermore, since multiple columns can be set in the column index cursor, when the number of columns in the column index cursor is not 1, the maximum value of the column index of all columns to be compressed is determined. If the maximum value of the column index of all columns to be compressed is equal to 99, the first column of the depth map matrix is ​​used as the new column to be filled in the depth map matrix; if the maximum value of the column index of all columns to be compressed is not equal to 99, the next column of the column to be compressed corresponding to the maximum value of the column index of all columns to be compressed is used as the new column to be filled in the depth map matrix.

[0127] Step S104: Filter the second point cloud data according to the preset window filtering algorithm to obtain several third point cloud data.

[0128] In this embodiment, the step of filtering the second point cloud data according to a preset window filtering algorithm to obtain several third point cloud data specifically includes:

[0129] Obtain the neighborhood window for each of the second point cloud data;

[0130] When the depth value of the second point cloud data is an invalid depth value, the minimum valid depth value in the neighborhood window is selected and replaced with the depth value of the second point cloud data.

[0131] Calculate and filter the difference between each effective depth value and the depth value of the second point cloud data in the neighborhood window of the second point cloud data to obtain the extreme value of the depth difference of each second point cloud data.

[0132] Based on the depth difference extreme value and the preset gradient threshold, the depth value of each second point cloud data is corrected to obtain several third point cloud data.

[0133] This embodiment uses a window filtering algorithm to filter the second point cloud data, eliminating invalid depth values ​​and improving the effectiveness and accuracy of subsequent point cloud compression. By calculating the depth difference extreme value and a preset gradient threshold, the second point cloud data in the column to be compressed can be smoothed, effectively correcting anomalies in the second point cloud data and further ensuring the accuracy and consistency of the second point cloud data, thereby improving the accuracy of subsequent point cloud compression.

[0134] In an optional embodiment, a neighborhood window is obtained for each of the second point cloud data. In this embodiment, the size of the neighborhood window is set to... (The size of the neighborhood window can be set according to actual needs. The size of the neighborhood window in this embodiment is not limited to that of the actual needs.) It can also be set to (and other sizes); if the depth value of the second point cloud data is an invalid depth value, this embodiment defines the invalid depth value as a missing value and the valid depth value as a non-missing value; at this time, the minimum value of all valid depth values ​​in the neighborhood window of the second point cloud data is selected and replaced with the depth value of the second point cloud data so that the depth value of the second point cloud data is a valid depth value; then, each valid depth value in the neighborhood window of the second point cloud data is traversed, the difference between each valid depth value and the depth value of the second point cloud data is calculated, and the largest absolute value among these differences is selected as the extreme value of the depth difference of the second point cloud data; specifically, the formula for calculating the extreme value of the depth difference is: ;in, Indicates the extreme value of the depth difference. Represents the first in the neighborhood window One effective depth value, This represents the depth value of the second point cloud data; then, based on a preset gradient threshold and the extreme value of the depth difference, the depth value of the second point cloud data is corrected to obtain several third point cloud data. Specifically, the gradient threshold is defined as... Gradient threshold If the depth difference is extreme Less than the gradient threshold Then, the minimum effective depth value in the neighborhood window is taken as the depth value of the second point cloud data; if the depth difference is extreme... Greater than or equal to the gradient threshold If the depth value of the second point cloud data remains unchanged, then perform the above operation on each second point cloud data to obtain the third point cloud data corresponding to the second point cloud data, thereby obtaining several third point cloud data.

[0135] It should be noted that, because the point cloud data collected by lidar has highly structural characteristics—that is, the depth value changes little in flat areas (such as the ground, walls, etc.) and changes significantly in edge and occluded areas—a neighborhood window is used for filtering to preserve the structural boundary information of the second point cloud data while improving the compression ratio of subsequent point cloud compression. When the extreme depth difference of the second point cloud data... Less than the gradient threshold When the area is flat, perform minimum value filtering (i.e., take the minimum effective depth value in the neighborhood window as the depth value of the second point cloud data). If the depth difference of the second point cloud data is extreme... Less than the gradient threshold (i.e., edges, occluded areas) without changing the depth value of the second point cloud data, thereby avoiding the loss of boundary information and improving the accuracy and precision of subsequent point cloud compression.

[0136] Step S105: Compress the third point cloud data according to the preset column compression algorithm to obtain the bit stream corresponding to the third point cloud data in the column to be compressed.

[0137] In this embodiment, compressing the third point cloud data according to a preset column compression algorithm to obtain the bitstream corresponding to the third point cloud data in the column to be compressed includes:

[0138] The difference between the depth values ​​of two adjacent third point cloud data in the column to be compressed is calculated sequentially to obtain an initial depth value difference sequence;

[0139] According to the preset positive and negative number remapping formula, all data in the initial depth value difference sequence are mapped to obtain the first depth value difference sequence;

[0140] Identify a continuous zero-value sequence in the first depth value difference sequence, and perform zero-value run-length encoding on the first depth value difference sequence based on the continuous zero-value sequence to obtain a second depth value difference sequence;

[0141] Each data point in the second depth value difference sequence is converted into binary data to obtain the third depth value difference sequence;

[0142] Based on the preset grouping bit length, each binary data in the third depth value difference sequence is grouped starting from the least significant bit to obtain several initial grouping data for each binary data.

[0143] Add a control bit to the most significant bit of each initial group data to obtain the first group data corresponding to each initial group data;

[0144] All the first group data are used as the bit stream corresponding to the third point cloud data in the column to be compressed.

[0145] This embodiment achieves compression of third-point cloud data by combining differential coding, positive and negative remapping, zero-value run-length encoding, and binary grouping conversion. Differential coding reduces data redundancy, and the positive and negative remapping formula ensures the sign consistency of all data in the initial depth value difference sequence. Zero-value run-length encoding further reduces the data space occupied. By grouping binary data and adding control bits, variable-length encoding is achieved, thereby improving the accuracy of point cloud compression.

[0146] In an optional embodiment, assume that the depth values ​​of the third point cloud data in the column to be compressed are, in order: At this point, the difference between the depth values ​​of two adjacent third point cloud data points is calculated sequentially to obtain the initial depth value difference sequence. The initial depth value difference sequence is as follows: ;

[0147] Since negative numbers reduce compression efficiency, a pre-defined positive-negative number remapping formula is used to map all data in the initial depth value difference sequence to obtain the first depth value difference sequence. Specifically, the pre-defined positive-negative number remapping formula is as follows: ;in, This represents the data in the initial depth value difference sequence. This represents the data in the first depth value difference sequence. Based on this positive and negative number remapping formula, the signs of all data in the initial depth value difference sequence are eliminated, that is, positive numbers in the initial depth value difference sequence are mapped to even numbers, and negative numbers in the initial depth value difference sequence are mapped to odd numbers; therefore, the first depth value difference sequence is... ;

[0148] Next, consecutive zero-value sequences are identified in the first depth-value difference sequence, and zero-value run-length encoding is performed on the first depth-value difference sequence based on the number of consecutive zero-value sequences to obtain the second depth-value difference sequence; the second depth-value difference sequence is... ; This means a "0" followed by the number "2", that is... The "2" indicates two consecutive "0"s. Then, each data in the second depth value difference sequence is converted into binary data. The number "2000" becomes 011111010000 in binary. Similarly, each data in the second depth value difference sequence is converted into binary data to obtain the third depth value difference sequence.

[0149] Then, the preset grouping bit length is set to 3 bits. For each binary data, it is grouped starting from the least significant bit to obtain several initial group data for each binary data. Taking the binary data of the number "2000" as an example, its binary data is 011111010000. It is grouped into groups of 3 bits, starting from the least significant bit (i.e., starting from the rightmost bit), to obtain

[000]

[010]

[111]

[011] . Similarly, the remaining binary data is grouped starting from the least significant bit to obtain several initial group data for each binary data.

[0150] Then, a control bit is added to the most significant bit of each initial group of data. The control bit is used to indicate whether there is any data following the most significant bit. The number "1" indicates that there is data following the most significant bit, and the number "0" indicates that there is no data following the most significant bit. For example, the initial group of data with the number "2000"

[000]

[010]

[111] For example, for

[011] , there is still data following its highest bit (i.e., the leftmost bit) (i.e., the rightmost "0" in

[0101] ). At this time, add the number "1" to the left of the highest bit, and change

[000] to

[1000] ; for

[010] , there is still data following its highest bit (i.e., the rightmost "1" in

[111] ). At this time, add the number "1" to the left of the highest bit, and change

[010] to

[1010] ; for

[111] , there is still data following its highest bit (i.e., the rightmost "1" in

[011] ). At this time, change

[111] to

[1111] ; for

[011] , there is no data following its highest bit. At this time, change

[011] to

[0011] ; thus, the first group data

[1000]

[1010] corresponding to the initial group data

[000]

[010]

[111]

[011] is obtained.

[1111]

[0011] ; and so on, add control bits to the remaining initial group data to obtain the first group data corresponding to each initial group data; then use all the first group data as the bit stream corresponding to the third point cloud data in the column to be compressed.

[0151] It should be noted that Zero-Run-Length Encoding is an optimized run-length encoding technique for consecutive zero values. It is a lossless compression method. Its core principle is: count the length of consecutive zero values: record the number of consecutive zero values ​​(run length), and then encode the zero values ​​and their lengths into a compact form (such as (0, N)), where N is the number of consecutive zero values.

[0152] Step S106: The first point cloud data that has not been filled into the depth map matrix is ​​sequentially filled into the newly determined columns to be filled, and then the columns to be compressed are re-marked, and the bit stream corresponding to the third point cloud data in the columns to be compressed is obtained, until all the first point cloud data is filled into the depth map matrix, the compression of the first point cloud data is completed, and the bit stream set of the first point cloud data is obtained.

[0153] In an optional embodiment, after redetermining the columns to be filled, the first point cloud data that has not been filled into the depth map matrix is ​​sequentially filled into the current column to be filled. If the elevation angle of the first point cloud data in the current column to be filled meets the preset column transition condition, the current column to be filled is marked as the column to be compressed again, and the column to be filled is redetermined. Then, the column to be compressed is filtered and compressed to obtain the bitstream corresponding to the third point cloud data in the column to be compressed. The above operation is repeated until all the first point cloud data is filled into the depth map matrix, the compression of the first point cloud data is completed, all bitstreams are recorded, and the bitstream set of the first point cloud data is obtained.

[0154] In an optional embodiment, after obtaining the bitstream set (i.e., completing the compression of the first point cloud data), during decompression, the reverse operation of step S105 is performed on the bitstream to obtain the third point cloud data; then, the polar coordinate values ​​of the third point cloud data are restored column by column, where the azimuth angle is the azimuth angle value of the column.

[0155] The elevation angle is calculated by reversing the row index, and the calculation formula is:

[0156] ;

[0157] The depth value is then reverse-mapped back to the original depth value. The formula for the reverse mapping is:

[0158] .

[0159] It should be noted that the decompression process provided in this embodiment can be regarded as the reverse process of dynamic point cloud data compression based on depth map matrix. Based on the dynamic point cloud data compression based on depth map matrix provided in this embodiment, those skilled in the art can obtain the specific implementation of this reverse process, which will not be elaborated in detail here.

[0160] This embodiment acquires several first point cloud data and constructs a depth map matrix using LiDAR, enabling the depth map matrix to adapt to the first point cloud data. The first point cloud data is then filled into the columns to be filled in the depth map matrix. When a preset column transition condition is met, the column to be filled is marked as a column to be compressed, and a new column to be filled is determined. Then, a preset window filtering algorithm is used to filter the second point cloud data in the column to be compressed, and a column compression algorithm is used to compress the third point cloud data in the column to be compressed, obtaining the bitstream corresponding to the third point cloud data in the column to be compressed. Then, the first point cloud data not yet filled into the depth map matrix is ​​sequentially filled into the newly determined columns to be filled, and the columns to be compressed are re-marked. The bitstream corresponding to the third point cloud data in the new columns to be compressed is then calculated, until all the first point cloud data is filled into the depth map matrix, completing the compression of the first point cloud data and obtaining a set of bitstreams of the first point cloud data. This achieves dynamic compression of point cloud data based on the depth map matrix. This embodiment constructs a depth map matrix and directly fills the first point cloud data into it, avoiding the decrease in point cloud compression efficiency caused by frequent coordinate transformations in existing technologies. By marking the column to be filled as the column to be compressed when the column transition condition is met, and redefining the column to be filled, as well as performing filtering on the individual column to be compressed, noise interference can be reduced, the depth value distribution of the second point cloud data in the column to be compressed can be smoothed, and the efficiency and accuracy of subsequent point cloud compression can be improved. By compressing the third point cloud data in the column to be compressed after the column transition condition is met, it is not necessary to cache all the data of the depth map matrix, which can realize streaming and real-time compression operations, thereby improving the efficiency of point cloud data compression.

[0161] Example 2

[0162] Please refer to Figure 2 , Figure 2 A schematic diagram of a dynamic point cloud data compression device based on a depth map matrix provided in an embodiment of the present invention includes: a data acquisition module 201, a depth map matrix filling module 202, a column to be compressed determination module 203, a point cloud data filtering module 204, a point cloud data compression module 205, and a point cloud data iterative processing module 206.

[0163] The data acquisition module 201 is used to acquire several first point cloud data based on a preset lidar, and to construct a depth map matrix based on the lidar.

[0164] In this embodiment, the data acquisition module 201 includes: a data acquisition unit;

[0165] The data acquisition unit is used to determine the maximum elevation angle scanning value based on the preset elevation angle encoding grid number of the lidar, and to determine the maximum azimuth angle scanning value based on the azimuth angle encoding grid number of the lidar.

[0166] The lidar is controlled to scan point cloud data in the order of azimuth angle from zero to the maximum azimuth angle and elevation angle from zero to the maximum elevation angle, and the data is collected in combination with a preset measurement accuracy to obtain a number of initial point cloud data. The number of initial point cloud data are arranged in the order of azimuth angle from small to large and elevation angle from small to large.

[0167] Based on the azimuth, elevation and depth values ​​of the initial point cloud data, the initial point cloud data are preprocessed to obtain a number of first point cloud data, wherein the number of first point cloud data are arranged in order of azimuth from smallest to largest and elevation from smallest to largest.

[0168] The number of rows in the depth map matrix is ​​determined based on the number of elevation angle encoding grids of the lidar, and the number of columns in the depth map matrix is ​​combined with the preset number of columns in the depth map matrix to determine the construction of the depth map matrix.

[0169] In this embodiment, the data acquisition unit includes: a data preprocessing subunit;

[0170] The data preprocessing subunit is used to identify abnormal initial point cloud data in the initial point cloud data based on the depth value of the initial point cloud data, remove the abnormal initial point cloud data, and obtain several fourth point cloud data.

[0171] Based on the depth value of the fourth point cloud data, data of the fourth point cloud data with the same azimuth and elevation angle are removed so that only one fourth point cloud data exists at each azimuth and elevation angle, resulting in several first point cloud data.

[0172] The depth map matrix filling module 202 is used to determine the column to be filled in the depth map matrix based on the azimuth angle of the first point cloud data, and fill the first point cloud data into the column to be filled in sequentially until the elevation angle of the first point cloud data in the column to be filled meets the preset column jump condition.

[0173] In this embodiment, the depth map matrix filling module 202 includes: a depth map matrix filling unit;

[0174] The depth map matrix filling unit is used to determine the row index and column index of each first point cloud data based on the azimuth and elevation angles of each first point cloud data.

[0175] The column to be filled in the depth map matrix is ​​determined based on the column index of the first point cloud data, and the depth values ​​of the first point cloud data are sequentially filled into the column to be filled based on the row index of the first point cloud data until the elevation angle of the first point cloud data in the column to be filled meets the preset column jump condition.

[0176] In this embodiment, the depth map matrix filling unit includes: an index calculation subunit;

[0177] The index calculation subunit is used to use the elevation angle of each first point cloud data as the row index of each first point cloud data.

[0178] The remainder of dividing the azimuth angle of each first point cloud data by the preset number of columns in the depth map matrix is ​​used as the column index of each first point cloud data.

[0179] In this embodiment, the depth map matrix filling unit includes: a column filling subunit;

[0180] The column filling sub-unit is used to compare the column indices of the first point cloud data and determine the minimum value of all column indices;

[0181] The column of the depth map matrix corresponding to the minimum value of all column indices is taken as the column to be filled in the depth map matrix, and the depth values ​​of the first point cloud data are sequentially filled into the column to be filled in.

[0182] Before each time the depth value of the first point cloud data is filled into the column to be filled, the row index of the first point cloud data corresponding to the last depth value filled in the current column to be filled is detected.

[0183] If the row index of the first point cloud data corresponding to the last depth value to be filled in the current column is equal to the maximum elevation angle scan value, it is determined that the elevation angle of the first point cloud data in the column to be filled meets the preset column jump condition, and the filling of the column to be filled is stopped.

[0184] The column to be compressed determination module 203 is used to mark the column to be filled as the column to be compressed based on a preset column index cursor, obtain several second point cloud data in the column to be compressed, and redetermine the column to be filled.

[0185] In this embodiment, the column to be compressed determination module 203 includes: a column to be compressed determination unit;

[0186] The column to be compressed determination unit is used to move a preset column index cursor in the depth map matrix, aligning the column index cursor with the column to be filled, so as to mark the column to be filled as the column to be compressed;

[0187] Based on the maximum integer depth value of the lidar, the depth value of each first point cloud data in the column to be compressed is mapped to obtain several second point cloud data in the column to be compressed.

[0188] If the column to be compressed is the last column of the depth map matrix, then the first column of the depth map matrix is ​​used as the new column to be filled in the depth map matrix;

[0189] If the column to be compressed is not the last column of the depth map matrix, then the next column of the column to be compressed is taken as the new column to be filled in the depth map matrix.

[0190] The point cloud data filtering module 204 is used to filter the second point cloud data according to a preset window filtering algorithm to obtain several third point cloud data.

[0191] In this embodiment, the point cloud data filtering module 204 includes: a point cloud data filtering unit;

[0192] The point cloud data filtering unit is used to obtain a neighborhood window for each of the second point cloud data;

[0193] When the depth value of the second point cloud data is an invalid depth value, the minimum valid depth value in the neighborhood window is selected and replaced with the depth value of the second point cloud data.

[0194] Calculate and filter the difference between each effective depth value and the depth value of the second point cloud data in the neighborhood window of the second point cloud data to obtain the extreme value of the depth difference of each second point cloud data.

[0195] Based on the depth difference extreme value and the preset gradient threshold, the depth value of each second point cloud data is corrected to obtain several third point cloud data.

[0196] The point cloud data compression module 205 is used to compress the third point cloud data according to a preset column compression algorithm to obtain the bit stream corresponding to the third point cloud data in the column to be compressed.

[0197] In this embodiment, the point cloud data compression module 205 includes: a point cloud data compression unit;

[0198] The point cloud data compression unit is used to sequentially calculate the difference in depth values ​​of two adjacent third point cloud data in the column to be compressed, and obtain an initial depth value difference sequence.

[0199] According to the preset positive and negative number remapping formula, all data in the initial depth value difference sequence are mapped to obtain the first depth value difference sequence;

[0200] Identify a continuous zero-value sequence in the first depth value difference sequence, and perform zero-value run-length encoding on the first depth value difference sequence based on the continuous zero-value sequence to obtain a second depth value difference sequence;

[0201] Each data point in the second depth value difference sequence is converted into binary data to obtain the third depth value difference sequence;

[0202] Based on the preset grouping bit length, each binary data in the third depth value difference sequence is grouped starting from the least significant bit to obtain several initial grouping data for each binary data.

[0203] Add a control bit to the most significant bit of each initial group data to obtain the first group data corresponding to each initial group data;

[0204] All the first group data are used as the bit stream corresponding to the third point cloud data in the column to be compressed.

[0205] The point cloud data iterative processing module 206 is used to sequentially fill the first point cloud data that has not been filled into the depth map matrix into the newly determined columns to be filled, and then re-mark the columns to be compressed, and obtain the bit stream corresponding to the third point cloud data in the columns to be compressed, until all the first point cloud data is filled into the depth map matrix, thereby completing the compression of the first point cloud data and obtaining the bit stream set of the first point cloud data.

[0206] This embodiment acquires several first point cloud data and constructs a depth map matrix using LiDAR, enabling the depth map matrix to adapt to the first point cloud data. The first point cloud data is then filled into the columns to be filled in the depth map matrix. When a preset column transition condition is met, the column to be filled is marked as a column to be compressed, and a new column to be filled is determined. Then, a preset window filtering algorithm is used to filter the second point cloud data in the column to be compressed, and a column compression algorithm is used to compress the third point cloud data in the column to be compressed, obtaining the bitstream corresponding to the third point cloud data in the column to be compressed. Then, the first point cloud data not yet filled into the depth map matrix is ​​sequentially filled into the newly determined columns to be filled, and the columns to be compressed are re-marked. The bitstream corresponding to the third point cloud data in the new columns to be compressed is then calculated, until all the first point cloud data is filled into the depth map matrix, completing the compression of the first point cloud data and obtaining a set of bitstreams of the first point cloud data. This achieves dynamic compression of point cloud data based on the depth map matrix. This embodiment constructs a depth map matrix and directly fills the first point cloud data into it, avoiding the decrease in point cloud compression efficiency caused by frequent coordinate transformations in existing technologies. By marking the column to be filled as the column to be compressed when the column transition condition is met, and redefining the column to be filled, as well as performing filtering on the individual column to be compressed, noise interference can be reduced, the depth value distribution of the second point cloud data in the column to be compressed can be smoothed, and the efficiency and accuracy of subsequent point cloud compression can be improved. By compressing the third point cloud data in the column to be compressed after the column transition condition is met, it is not necessary to cache all the data of the depth map matrix, which can realize streaming and real-time compression operations, thereby improving the efficiency of point cloud data compression.

[0207] In summary, this embodiment of the invention acquires several first point cloud data and constructs a depth map matrix using lidar, enabling the depth map matrix to adapt to the first point cloud data. The first point cloud data is then filled into the columns to be filled in the depth map matrix. When a preset column transition condition is met, the column to be filled is marked as a column to be compressed, and a new column to be filled is determined. Then, a preset window filtering algorithm is used to filter the second point cloud data in the column to be compressed, and a column compression algorithm is used to compress the third point cloud data in the column to be compressed, obtaining the bitstream corresponding to the third point cloud data in the column to be compressed. Then, the first point cloud data not yet filled into the depth map matrix is ​​sequentially filled into the newly determined columns to be filled, and the columns to be compressed are re-marked. The bitstream corresponding to the third point cloud data in the new columns to be compressed is then calculated, until all the first point cloud data is filled into the depth map matrix, completing the compression of the first point cloud data and obtaining a set of bitstreams of the first point cloud data. This achieves dynamic compression of point cloud data based on the depth map matrix. This invention constructs a depth map matrix and directly fills the first point cloud data into it, avoiding the decrease in point cloud compression efficiency caused by frequent coordinate transformations in the prior art. By marking the column to be filled as the column to be compressed when the column transition condition is met, and redefining the column to be filled and performing filtering on the individual column to be compressed, noise interference can be reduced, the depth value distribution of the second point cloud data in the column to be compressed can be smoothed, and the efficiency and accuracy of subsequent point cloud compression can be improved. By compressing the third point cloud data in the column to be compressed after the column transition condition is met, it is not necessary to cache all the data of the depth map matrix, which can realize streaming and real-time compression operation, thereby improving the efficiency of point cloud data compression.

[0208] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made by those skilled in the art within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A dynamic point cloud data compression method based on a depth map matrix, characterized in that, include: Several first point cloud data are acquired based on a preset lidar, and a depth map matrix is ​​constructed based on the lidar; Based on the azimuth angle of the first point cloud data, the column to be filled in the depth map matrix is ​​determined, and the first point cloud data is sequentially filled into the column to be filled until the elevation angle of the first point cloud data in the column to be filled meets the preset column jump condition. The column to be filled is marked as the column to be compressed based on the preset column index cursor, and several second point cloud data in the column to be compressed are obtained, and the column to be filled is re-determined; The second point cloud data is filtered according to a preset window filtering algorithm to obtain several third point cloud data. The third point cloud data is compressed according to a preset column compression algorithm to obtain the bit stream corresponding to the third point cloud data in the column to be compressed; The first point cloud data that was not filled into the depth map matrix is ​​sequentially filled into the newly determined columns to be filled, and then the columns to be compressed are re-marked, and the bit stream corresponding to the third point cloud data in the columns to be compressed is obtained, until all the first point cloud data is filled into the depth map matrix, the compression of the first point cloud data is completed, and the bit stream set of the first point cloud data is obtained.

2. The dynamic point cloud data compression method based on a depth map matrix as described in claim 1, characterized in that, The step of acquiring several first point cloud data based on a preset lidar and constructing a depth map matrix based on the lidar includes: The maximum elevation angle scanning value is determined based on the preset number of elevation angle encoding grids of the lidar, and the maximum azimuth angle scanning value is determined based on the number of azimuth angle encoding grids of the lidar. The lidar is controlled to scan point cloud data in the order of azimuth angle from zero to the maximum azimuth angle and elevation angle from zero to the maximum elevation angle, and the data is collected in combination with a preset measurement accuracy to obtain a number of initial point cloud data. The number of initial point cloud data are arranged in the order of azimuth angle from small to large and elevation angle from small to large. Based on the azimuth, elevation and depth values ​​of the initial point cloud data, the initial point cloud data are preprocessed to obtain a number of first point cloud data, wherein the number of first point cloud data are arranged in order of azimuth from smallest to largest and elevation from smallest to largest. The number of rows in the depth map matrix is ​​determined based on the number of elevation angle encoding grids of the lidar, and the number of columns in the depth map matrix is ​​combined with the preset number of columns in the depth map matrix to determine the construction of the depth map matrix.

3. The dynamic point cloud data compression method based on a depth map matrix as described in claim 2, characterized in that, Based on the azimuth, elevation, and depth values ​​of the initial point cloud data, the several initial point cloud data are preprocessed to obtain several first point cloud data, including: Based on the depth value of the initial point cloud data, abnormal initial point cloud data in the initial point cloud data are identified, and the abnormal initial point cloud data are removed to obtain several fourth point cloud data. Based on the depth value of the fourth point cloud data, data of the fourth point cloud data with the same azimuth and elevation angle are removed so that only one fourth point cloud data exists at each azimuth and elevation angle, resulting in several first point cloud data.

4. The dynamic point cloud data compression method based on a depth map matrix as described in claim 2, characterized in that, The step of determining the column to be filled in the depth map matrix based on the azimuth angle of the first point cloud data, and sequentially filling the column with the first point cloud data until the elevation angle of the first point cloud data in the column to be filled meets the preset column transition condition, includes: Based on the azimuth and elevation angles of each of the first point cloud data, determine the row index and column index of each of the first point cloud data; The column to be filled in the depth map matrix is ​​determined based on the column index of the first point cloud data, and the depth values ​​of the first point cloud data are sequentially filled into the column to be filled based on the row index of the first point cloud data until the elevation angle of the first point cloud data in the column to be filled meets the preset column jump condition.

5. The dynamic point cloud data compression method based on a depth map matrix as described in claim 4, characterized in that, The step of determining the row index and column index of each first point cloud data based on the azimuth and elevation angles of each first point cloud data includes: Use the elevation angle of each first point cloud data as the row index of each first point cloud data; The remainder of dividing the azimuth angle of each first point cloud data by the preset number of columns in the depth map matrix is ​​used as the column index of each first point cloud data.

6. The dynamic point cloud data compression method based on a depth map matrix as described in claim 5, characterized in that, The column index of the first point cloud data is used to determine the column to be filled in the depth map matrix, and the depth values ​​of the first point cloud data are sequentially filled into the column to be filled based on the row index of the first point cloud data until the elevation angle of the first point cloud data in the column to be filled meets the preset column transition condition, including: Compare the column indexes of the first point cloud data to determine the minimum value of all column indexes; The column of the depth map matrix corresponding to the minimum value of all column indices is taken as the column to be filled in the depth map matrix, and the depth values ​​of the first point cloud data are sequentially filled into the column to be filled in. Before each time the depth value of the first point cloud data is filled into the column to be filled, the row index of the first point cloud data corresponding to the last depth value filled in the current column to be filled is detected. If the row index of the first point cloud data corresponding to the last depth value to be filled in the current column is equal to the maximum elevation angle scan value, it is determined that the elevation angle of the first point cloud data in the column to be filled meets the preset column jump condition, and the filling of the column to be filled is stopped.

7. The dynamic point cloud data compression method based on a depth map matrix as described in claim 6, characterized in that, The process of marking the column to be filled as the column to be compressed based on a preset column index cursor, obtaining several second point cloud data in the column to be compressed, and redetermining the column to be filled includes: Move the preset column index cursor in the depth map matrix to align the column index cursor with the column to be filled, thereby marking the column to be filled as the column to be compressed; Based on the maximum integer depth value of the lidar, the depth value of each first point cloud data in the column to be compressed is mapped to obtain several second point cloud data in the column to be compressed. If the column to be compressed is the last column of the depth map matrix, then the first column of the depth map matrix is ​​used as the new column to be filled in the depth map matrix; If the column to be compressed is not the last column of the depth map matrix, then the next column of the column to be compressed is taken as the new column to be filled in the depth map matrix.

8. The dynamic point cloud data compression method based on a depth map matrix as described in claim 1, characterized in that, The step of filtering the second point cloud data according to a preset window filtering algorithm to obtain several third point cloud data specifically includes: Obtain the neighborhood window for each of the second point cloud data; When the depth value of the second point cloud data is an invalid depth value, the minimum valid depth value in the neighborhood window is selected and replaced with the depth value of the second point cloud data. Calculate and filter the difference between each effective depth value and the depth value of the second point cloud data in the neighborhood window of the second point cloud data to obtain the extreme value of the depth difference of each second point cloud data. Based on the depth difference extreme value and the preset gradient threshold, the depth value of each second point cloud data is corrected to obtain several third point cloud data.

9. The dynamic point cloud data compression method based on a depth map matrix as described in claim 1, characterized in that, The step of compressing the third point cloud data according to a preset column compression algorithm to obtain the bitstream corresponding to the third point cloud data in the column to be compressed includes: The difference between the depth values ​​of two adjacent third point cloud data in the column to be compressed is calculated sequentially to obtain an initial depth value difference sequence; According to the preset positive and negative number remapping formula, all data in the initial depth value difference sequence are mapped to obtain the first depth value difference sequence; Identify a continuous zero-value sequence in the first depth value difference sequence, and perform zero-value run-length encoding on the first depth value difference sequence based on the continuous zero-value sequence to obtain a second depth value difference sequence; Each data point in the second depth value difference sequence is converted into binary data to obtain the third depth value difference sequence; Based on the preset grouping bit length, each binary data in the third depth value difference sequence is grouped starting from the least significant bit to obtain several initial grouping data for each binary data. Add a control bit to the most significant bit of each initial group data to obtain the first group data corresponding to each initial group data; All the first group data are used as the bit stream corresponding to the third point cloud data in the column to be compressed.

10. A dynamic point cloud data compression device based on a depth map matrix, characterized in that, include: The system includes a data acquisition module, a depth map matrix filling module, a column to be compressed determination module, a point cloud data filtering module, a point cloud data compression module, and a point cloud data iterative processing module. The data acquisition module is used to acquire several first point cloud data based on a preset lidar, and to construct a depth map matrix based on the lidar. The depth map matrix filling module is used to determine the column to be filled in the depth map matrix based on the azimuth angle of the first point cloud data, and fill the first point cloud data into the column to be filled in sequentially until the elevation angle of the first point cloud data in the column to be filled meets the preset column jump condition. The column to be compressed determination module is used to mark the column to be filled as the column to be compressed based on a preset column index cursor, obtain several second point cloud data in the column to be compressed, and redetermine the column to be filled; The point cloud data filtering module is used to filter the second point cloud data according to a preset window filtering algorithm to obtain several third point cloud data. The point cloud data compression module is used to compress the third point cloud data according to a preset column compression algorithm to obtain the bit stream corresponding to the third point cloud data in the column to be compressed. The point cloud data iterative processing module is used to sequentially fill the first point cloud data that has not been filled into the depth map matrix into the newly determined columns to be filled, and then re-mark the columns to be compressed, and obtain the bit stream corresponding to the third point cloud data in the columns to be compressed, until all the first point cloud data is filled into the depth map matrix, thereby completing the compression of the first point cloud data and obtaining the bit stream set of the first point cloud data.

Citation Information

Patent Citations

  • Evaluation method and system of laser point cloud splicing result and computer equipment

    CN117726591A

  • Inter-frame prediction method and device

    EP3890325A1