Method and System for Processing LiDAR Data

By performing multi-level compression of the two-dimensional depth map of lidar data, the problem of large amount of lidar data is solved, and the data volume is significantly reduced and the efficiency of transmission and storage is improved.

CN114265035BActive Publication Date: 2025-06-17BEIJING JINGWEI HIRAIN TECH CO INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111475271.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-06
Publication Date
2025-06-17
Estimated Expiration
2041-12-06

AI Technical Summary

Technical Problem

Massive data of lidar data has brought great pressure in transmission and storage, and how to reduce the amount of data has become an important issue.

Method used

The data volume is reduced by intra-frame compression, inter-frame compression and overall compression of the two-dimensional depth map converted into the original data of the lidar, and the amount of data is reduced. The specific method includes obtaining a filter determined based on the ratio of the lateral angle resolution and the longitudinal angle resolution of the lidar, and compressing using the filter and the preset plane fitting algorithm.

Benefits of technology

It effectively reduces the amount of lidar data, improves the efficiency of data transmission and storage, and reduces the pressure on the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114265035B_ABST
    Figure CN114265035B_ABST
Patent Text Reader

Abstract

The present application discloses a method and system for processing lidar data. The method includes: obtaining multiple frames of two-dimensional depth maps converted from the original lidar data and a filter determined according to the ratio of the horizontal angular resolution to the vertical angular resolution of the lidar; performing intra-frame compression on each frame of the two-dimensional depth maps according to the filter and a preset plane fitting algorithm to obtain multiple frames of intra-frame compressed two-dimensional depth maps; for a group of two-dimensional depth maps, performing inter-frame compression on the group of two-dimensional depth maps according to the differences between the second to the last intra-frame compressed two-dimensional depth maps and the first intra-frame compressed two-dimensional depth map in the group of two-dimensional depth maps; after performing inter-frame compression on all groups of two-dimensional depth maps, performing overall compression on all the inter-frame compressed two-dimensional depth maps to obtain overall compressed two-dimensional depth maps. The present application can achieve data compression from multiple perspectives, thereby reducing the data volume.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and more specifically, to a method and system for processing laser radar data. Background Art

[0002] Lidar is a radar system that emits laser beams to detect the position, speed and other characteristic quantities of a target. Its working principle is to first emit a detection signal (i.e., a laser beam) to the target, and then compare the received signal reflected from the target (i.e., the target echo) with the transmitted signal. After appropriate processing, relevant information about the target can be obtained, such as target distance, direction, height, speed, attitude, and even shape parameters, thereby realizing the detection, tracking and identification of objects around the vehicle, aircraft, missiles and other targets.

[0003] As one of the mainstream vehicle-mounted sensors, LiDAR has the advantages of high measurement accuracy, long measurement distance, fast response speed and easy acquisition of three-dimensional information. It is often used as the main sensor for vehicle-side, roadside perception or other intelligent equipment. However, due to the high accuracy and large amount of information of laser point cloud, in application scenarios such as LiDAR data transmission and storage, the massive amount of data has brought tremendous pressure to the transmission and storage links of the system. Therefore, how to reduce the amount of data stored or transmitted by LiDAR is an important issue that needs to be solved urgently. Summary of the invention

[0004] The present application provides a method and system for processing laser radar data, which can perform intra-frame compression, inter-frame compression, and overall compression on a two-dimensional depth map converted from raw laser radar data, thereby greatly reducing the amount of data.

[0005] The specific technical solutions are as follows:

[0006] In a first aspect, an embodiment of the present application provides a method for processing laser radar data, the method comprising:

[0007] Obtain a multi-frame two-dimensional depth map converted from laser radar raw data, and obtain a filter determined according to the ratio of the horizontal angle resolution and the vertical angle resolution of the laser radar;

[0008] Performing intra-frame compression on each frame of the two-dimensional depth map according to the filter and the preset plane fitting algorithm to obtain two-dimensional depth maps after intra-frame compression of multiple frames;

[0009] For a two-dimensional depth map group, perform inter-frame compression on the two-dimensional depth map group according to the differences between the second intra-frame compressed two-dimensional depth map to the last intra-frame compressed two-dimensional depth map in the two-dimensional depth map group and the first intra-frame compressed two-dimensional depth map, where each two-dimensional depth group includes multiple consecutive intra-frame compressed two-dimensional depth maps with the number of frames being a preset number of frames;

[0010] After performing inter-frame compression on all two-dimensional depth map groups, perform overall compression on all the inter-frame compressed two-dimensional depth maps to obtain the overall compressed two-dimensional depth map.

[0011] In one implementation, obtaining a filter determined according to the ratio of the horizontal angular resolution to the vertical angular resolution of a lidar includes: obtaining a filter with the ratio of height to width being the ratio of the horizontal angular resolution to the vertical angular resolution of the lidar;

[0012] Before performing intra-frame compression on each two-dimensional depth map according to the filter and a preset plane fitting algorithm to obtain multiple intra-frame compressed two-dimensional depth maps, the method further includes: if the compression rate and / or signal-to-noise ratio of the filter with the ratio of height to width being the ratio of the horizontal angular resolution to the vertical angular resolution of the lidar do not meet the preset compression requirements, then adjust the size of the filter according to the horizontal distance resolution of the lidar at an interested distance, the vertical distance resolution at the interested distance, and the size of the target object at the interested distance until the compression rate and signal-to-noise ratio of the adjusted filter meet the preset compression requirements, and then obtain the finally required filter, where the interested distance is the distance corresponding to the original data of the lidar, and the size includes height and width.

[0013] In one implementation, adjusting the size of the filter according to the horizontal distance resolution of the lidar at an interested distance, the vertical distance resolution at the interested distance, and the size of the target object at the interested distance includes:

[0014] Calculate the ratio of the height of the target object at the interested distance to the horizontal distance resolution of the lidar at the interested distance and the ratio of the width of the target object to the vertical distance resolution respectively;

[0015] If the ratio of the height of the target object to the horizontal distance resolution is greater than the ratio of the width of the target object to the vertical distance resolution, then increase the size proportion of the height of the filter;

[0016] If the ratio of the height of the target object to the horizontal distance resolution is less than the ratio of the width of the target object to the vertical distance resolution, increase the size proportion of the width of the filter.

[0017] In one implementation, perform intra-frame compression on each two-dimensional depth map according to the filter and a preset plane fitting algorithm to obtain multiple intra-frame compressed two-dimensional depth maps, including:

[0018] Perform plane fitting on a first target area on the two-dimensional depth map to be intra-frame compressed filtered by the filter according to the preset plane fitting algorithm to obtain a first fitting plane;

[0019] Calculate a first fitting error according to the difference between the coordinates of multiple data points on the first fitting plane and the coordinates of the corresponding same data point on the two-dimensional depth map to be intra-frame compressed;

[0020] If the first fitting error is less than a preset error threshold, retain the first fitting record, where the first fitting record includes the fitting position of the first fitting plane and the fitting parameters of the first fitting plane, the fitting position of the first fitting plane is the position of the first target area on the two-dimensional depth map to be intra-frame compressed, and the fitting parameters of the first fitting plane include the normal vector and geometric equation of the first fitting plane;

[0021] If the first fitting error is greater than or equal to the preset error threshold, do not retain the first fitting record;

[0022] After sliding the filter to a second target area, perform plane fitting on the first target area and the second target area as a whole area according to the preset plane fitting algorithm to obtain a second fitting plane;

[0023] Calculate a second fitting error according to the difference between the coordinates of multiple data points on the second fitting plane and the coordinates of the corresponding same data point on the two-dimensional depth map before plane fitting;

[0024] If the second fitting error is less than the preset error threshold, replace the first fitting record with the second fitting record, where the second fitting record includes the fitting position of the second fitting plane and the fitting parameters of the second fitting plane, the fitting position of the second fitting plane includes the position of the first target area and the position of the second target area, and the fitting parameters of the second fitting plane include the normal vector and geometric equation of the second fitting plane;

[0025] If the second fitting error is greater than or equal to the preset error threshold, re-perform plane fitting on the second target area until, after performing plane fitting on the last target area of the two-dimensional depth map to be intra-frame compressed, a two-dimensional depth map after intra-frame compression of the two-dimensional depth map to be intra-frame compressed is obtained, where the two-dimensional depth map after intra-frame compression includes the finally retained fitting record and the original data of the target areas without retained fitting records on the two-dimensional depth map to be intra-frame compressed;

[0026] After completing intra-frame compression of the multi-frame two-dimensional depth maps, multi-frame two-dimensional depth maps after intra-frame compression are obtained.

[0027] In one implementation, for a group of two-dimensional depth maps, perform inter-frame compression on the group of two-dimensional depth maps according to the differences between the second to the last two-dimensional depth maps after intra-frame compression in the group of two-dimensional depth maps and the first two-dimensional depth map after intra-frame compression, including:

[0028] For each two-dimensional depth map after intra-frame compression in a group of two-dimensional depth maps except for the first two-dimensional depth map after intra-frame compression, calculate the differences between multiple target areas in the current two-dimensional depth map after intra-frame compression and the corresponding target areas in the first two-dimensional depth map after intra-frame compression, to obtain the inter-frame deviation of the current two-dimensional depth map after intra-frame compression relative to the first two-dimensional depth map after intra-frame compression, where the target area is the area size filtered by the filter once;

[0029] Retain the first two-dimensional depth map after intra-frame compression, and replace the current two-dimensional depth map after intra-frame compression with the position and the corresponding inter-frame deviation of the current two-dimensional depth map after intra-frame compression.

[0030] In one implementation, obtaining multiple frames of two-dimensional depth maps converted from lidar raw data includes:

[0031] Receiving the lidar raw data sent by the lidar;

[0032] Converting the lidar raw data into multiple frames of lidar point cloud data;

[0033] According to the conversion order of the lidar raw data, sequentially add each frame of lidar point cloud data to the point cloud first-in-first-out (FIFO) queue;

[0034] According to the principle of first-in-first-out of the point cloud FIFO queue, sequentially obtain each frame of lidar point cloud data from the point cloud FIFO queue, and convert each frame of lidar point cloud data into a two-dimensional depth map;

[0035] According to the conversion order of lidar point cloud data, the converted two-dimensional depth maps are sequentially added to the depth map FIFO queue;

[0036] According to the principle of first in first out of the depth map FIFO queue, each frame of lidar two-dimensional depth map in the depth map FIFO queue is sequentially obtained.

[0037] In one implementation, after inter-frame compression of all two-dimensional depth maps in groups, overall compression is performed on all the two-dimensional depth maps after inter-frame compression to obtain the overall compressed two-dimensional depth maps, including:

[0038] According to the inter-frame compression order of the two-dimensional depth map groups, each two-dimensional depth group after inter-frame compression is sequentially added to the data transfer FIFO queue;

[0039] After all the two-dimensional depth groups after inter-frame compression are added to the data transfer FIFO queue, overall compression is performed on the data transfer FIFO queue to obtain the overall compressed two-dimensional depth maps.

[0040] In one implementation, after overall compression is performed on all the two-dimensional depth maps after inter-frame compression to obtain the overall compressed two-dimensional depth maps, the method includes:

[0041] When decompression of the overall compressed two-dimensional depth maps is required, the overall compressed two-dimensional depth maps are determined as the two-dimensional depth maps to be decompressed;

[0042] Overall decompression is performed on the two-dimensional depth maps to be decompressed to obtain multiple two-dimensional depth map groups to be inter-frame decompressed, where the two-dimensional depth map groups to be inter-frame decompressed are two-dimensional depth map groups obtained by inter-frame compression of multiple consecutive frames of intra-frame compressed two-dimensional depth maps with a preset number of frames;

[0043] According to the differences between the second to the last intra-frame compressed two-dimensional depth maps and the first intra-frame compressed two-dimensional depth map in the two-dimensional depth map groups to be inter-frame decompressed, inter-frame decompression is performed on the two-dimensional depth map groups to be inter-frame decompressed to obtain multiple two-dimensional depth maps to be intra-frame decompressed, where the two-dimensional depth maps to be intra-frame decompressed include at least one fitting position, the fitting parameters corresponding to the fitting position, and the original data at the unfitted positions of the two-dimensional depth maps to be intra-frame decompressed before intra-frame compression, and the fitting parameters include the normal vector of the fitting plane and the geometric equation of the fitting plane;

[0044] For each two-dimensional depth map to be intra-frame decompressed, according to the fitting position and the fitting parameters corresponding to the fitting position, perform intra-frame decompression on the fitting position of the two-dimensional depth map to be intra-frame decompressed, and obtain the original data at the fitting position on the two-dimensional depth map after intra-frame decompression, so as to obtain all the original data on the two-dimensional depth map after intra-frame decompression of the two-dimensional depth map to be intra-frame decompressed, and obtain the two-dimensional depth map after intra-frame decompression of the two-dimensional depth map to be intra-frame decompressed.

[0045] In one implementation, when the two-dimensional depth map group to be inter-frame decompressed includes the two-dimensional depth map after intra-frame compression of the first frame in the two-dimensional depth map group to be inter-frame decompressed, the positions of the two-dimensional depth maps after intra-frame compression of other frames except the two-dimensional depth map after intra-frame compression of the first frame, and the inter-frame deviation of the positions of the two-dimensional depth maps after intra-frame compression of other frames relative to the two-dimensional depth map after intra-frame compression of the first frame, according to the differences between the two-dimensional depth map after intra-frame compression of the second frame to the last frame in the two-dimensional depth map group to be inter-frame decompressed and the two-dimensional depth map after intra-frame compression of the first frame respectively, perform inter-frame decompression on the two-dimensional depth map group to be inter-frame decompressed, and obtain multiple two-dimensional depth maps to be intra-frame decompressed, including:

[0046] For each two-dimensional depth map after intra-frame compression in the two-dimensional depth map group to be inter-frame decompressed except the two-dimensional depth map after intra-frame compression of the first frame, determine the two-dimensional depth map after intra-frame compression according to the position of the two-dimensional depth map after intra-frame compression currently, the inter-frame deviation of the two-dimensional depth map after intra-frame compression currently relative to the two-dimensional depth map after intra-frame compression of the first frame, and the two-dimensional depth map after intra-frame compression of the first frame;

[0047] After determining each two-dimensional depth map after intra-frame compression in the two-dimensional depth map group to be inter-frame decompressed, determine the two-dimensional depth map after intra-frame compression as the two-dimensional depth map to be intra-frame decompressed, so as to obtain multiple two-dimensional depth maps to be intra-frame decompressed.

[0048] In a second aspect, an embodiment of the present application provides a processing device for lidar data, and the device includes:

[0049] A depth map acquisition unit, configured to acquire multiple frames of two-dimensional depth maps converted from lidar raw data;

[0050] A filter acquisition unit, configured to acquire a filter determined according to the ratio of the horizontal angular resolution and the vertical angular resolution of the lidar;

[0051] An intra-frame compression unit, configured to perform intra-frame compression on each frame of two-dimensional depth map according to the filter and a preset plane fitting algorithm, and obtain multiple frames of two-dimensional depth maps after intra-frame compression;

[0052] An inter-frame compression unit, configured to perform inter-frame compression on a two-dimensional depth map group according to the differences between the second intra-frame compressed two-dimensional depth map to the last intra-frame compressed two-dimensional depth map in the two-dimensional depth map group and the first intra-frame compressed two-dimensional depth map, where each two-dimensional depth group includes multiple continuously intra-frame compressed two-dimensional depth maps with a preset number of frames;

[0053] An overall compression unit, configured to perform overall compression on all the inter-frame compressed two-dimensional depth maps after inter-frame compression of all the two-dimensional depth map groups to obtain an overall compressed two-dimensional depth map.

[0054] In one implementation, a depth map acquisition unit is configured to acquire a filter whose ratio of height to width is the ratio of the horizontal angular resolution to the vertical angular resolution of the lidar;

[0055] The apparatus further includes:

[0056] An adjustment unit, configured to, before performing intra-frame compression on each two-dimensional depth map according to the filter and a preset plane fitting algorithm to obtain multiple intra-frame compressed two-dimensional depth maps, if the compression rate and / or signal-to-noise ratio of the filter whose ratio of height to width is the ratio of the horizontal angular resolution to the vertical angular resolution of the lidar do not meet the preset compression requirements, adjust the size of the filter according to the horizontal distance resolution of the lidar at the interested distance, the vertical distance resolution at the interested distance, and the size of the target object at the interested distance until the compression rate and signal-to-noise ratio of the adjusted filter meet the preset compression requirements, and then obtain the finally required filter, where the interested distance is the distance corresponding to the original data of the lidar, and the size includes height and width.

[0057] In one implementation, the adjustment unit includes:

[0058] A ratio calculation module, configured to calculate the ratio of the height of the target object at the interested distance to the horizontal distance resolution of the lidar at the interested distance and the ratio of the width of the target object to the vertical distance resolution respectively;

[0059] An adjustment module, configured to, if the ratio of the height of the target object to the horizontal distance resolution is greater than the ratio of the width of the target object to the vertical distance resolution, increase the size proportion of the height of the filter, and if the ratio of the height of the target object to the horizontal distance resolution is less than the ratio of the width of the target object to the vertical distance resolution, increase the size proportion of the width of the filter.

[0060] In one embodiment, the intra-frame compression unit includes:

[0061] A fitting module, configured to perform plane fitting on a first target region on the two-dimensional depth map to be intra-frame compressed filtered by the filter according to the preset plane fitting algorithm, so as to obtain a first fitting plane;

[0062] An error calculation module, configured to calculate a first fitting error according to the difference between the coordinates of multiple data points on the first fitting plane and the coordinates of the same corresponding data point on the two-dimensional depth map to be intra-frame compressed;

[0063] A first retention module, configured to retain a first fitting record if the first fitting error is less than a preset error threshold, where the first fitting record includes the fitting position of the first fitting plane and the fitting parameters of the first fitting plane, the fitting position of the first fitting plane is the position of the first target region on the two-dimensional depth map to be intra-frame compressed, and the fitting parameters of the first fitting plane include the normal vector and geometric equation of the first fitting plane; if the first fitting error is greater than or equal to the preset error threshold, the first fitting record is not retained;

[0064] A fitting module, configured to, after sliding the filter to a second target region, perform plane fitting on the first target region and the second target region as a whole region according to the preset plane fitting algorithm, so as to obtain a second fitting plane;

[0065] An error calculation module, configured to calculate a second fitting error according to the difference between the coordinates of multiple data points on the second fitting plane and the coordinates of the same corresponding data point on the two-dimensional depth map to be intra-frame compressed before plane fitting;

[0066] A first replacement module, configured to replace the first fitting record with a second fitting record if the second fitting error is less than the preset error threshold, where the second fitting record includes the fitting position of the second fitting plane and the fitting parameters of the second fitting plane, the fitting position of the second fitting plane includes the positions of the first target region and the second target region, and the fitting parameters of the second fitting plane include the normal vector and geometric equation of the second fitting plane;

[0067] A fitting module, configured to re - perform plane fitting for the second target region if the second fitting error is greater than or equal to the preset error threshold, until after plane fitting processing is performed on the last target region of the to - be intra - frame - compressed two - dimensional depth map, a two - dimensional depth map after intra - frame compression of the to - be intra - frame - compressed two - dimensional depth map is obtained, where the two - dimensional depth map after intra - frame compression includes the finally retained fitting records and the original data of the target regions without retained fitting records on the to - be intra - frame - compressed two - dimensional depth map;

[0068] A first acquisition module, configured to obtain multiple two - dimensional depth maps after intra - frame compression after completing intra - frame compression of the multiple two - dimensional depth maps.

[0069] In one embodiment, the inter - frame compression unit includes:

[0070] A deviation calculation module, configured to calculate, for each two - dimensional depth map after intra - frame compression in a two - dimensional depth map group except for the first two - dimensional depth map after intra - frame compression, the difference between multiple target regions in the current two - dimensional depth map after intra - frame compression and the corresponding target regions in the first two - dimensional depth map after intra - frame compression, to obtain the inter - frame deviation of the current two - dimensional depth map after intra - frame compression relative to the first two - dimensional depth map after intra - frame compression, where the target region is the area size filtered by the filter once;

[0071] A second retention module, configured to retain the first two - dimensional depth map after intra - frame compression;

[0072] A second replacement module, configured to replace the current two - dimensional depth map after intra - frame compression with the position of the current two - dimensional depth map after intra - frame compression and the corresponding inter - frame deviation.

[0073] In one embodiment, the depth map acquisition unit includes:

[0074] A receiving module, configured to receive the raw lidar data sent by the lidar;

[0075] A first conversion module, configured to convert the raw lidar data into multiple frames of lidar point cloud data;

[0076] A first addition module, configured to sequentially add each frame of lidar point cloud data to the point cloud first - in - first - out (FIFO) queue according to the conversion order of the raw lidar data;

[0077] A second conversion module, configured to sequentially obtain each frame of lidar point cloud data from the point cloud FIFO queue according to the first - in - first - out principle of the point cloud FIFO queue, and convert each frame of lidar point cloud data into a two - dimensional depth map;

[0078] A second addition module, configured to sequentially add the converted two-dimensional depth maps to a depth map FIFO queue according to the conversion order of the lidar point cloud data;

[0079] A second acquisition module, configured to sequentially acquire each frame of lidar two-dimensional depth map in the depth map FIFO queue according to the principle of first in first out of the depth map FIFO queue.

[0080] In one embodiment, the overall compression unit includes:

[0081] A third addition module, configured to sequentially add each two-dimensional depth group after inter-frame compression to a data transmission FIFO queue according to the inter-frame compression order of the two-dimensional depth map grouping;

[0082] An overall compression module, configured to perform overall compression on the data transmission FIFO queue after adding all the two-dimensional depth groups after inter-frame compression to the data transmission FIFO queue, to obtain an overall compressed two-dimensional depth map.

[0083] In one embodiment, the apparatus further includes:

[0084] A determination unit, configured to, after performing overall compression on all the two-dimensional depth maps after inter-frame compression to obtain an overall compressed two-dimensional depth map, when it is necessary to decompress the overall compressed two-dimensional depth map, determine the overall compressed two-dimensional depth map as the two-dimensional depth map to be decompressed;

[0085] An overall decompression unit, configured to perform overall decompression on the two-dimensional depth map to be decompressed, to obtain a plurality of two-dimensional depth map groups to be inter-frame decompressed, where the two-dimensional depth map groups to be inter-frame decompressed are two-dimensional depth map groups obtained by performing inter-frame compression on multiple consecutive frames of two-dimensional depth maps after intra-frame compression with a preset number of frames;

[0086] An inter-frame decompression unit, configured to perform inter-frame decompression on the two-dimensional depth map groups to be inter-frame decompressed according to the differences between the second to the last intra-frame compressed two-dimensional depth maps and the first intra-frame compressed two-dimensional depth map in the two-dimensional depth map groups to be inter-frame decompressed, to obtain multiple two-dimensional depth maps to be intra-frame decompressed, where the two-dimensional depth maps to be intra-frame decompressed include at least one fitting position, fitting parameters corresponding to the fitting position, and original data at positions that are not fitted before intra-frame compression of the two-dimensional depth maps to be intra-frame decompressed, and the fitting parameters include the normal vector of the fitting plane and the geometric equation of the fitting plane;

[0087] An intra-frame decompression unit is configured to perform intra-frame decompression on the fitting position of the two-dimensional depth map to be intra-frame decompressed for each frame, according to the fitting position and the fitting parameters corresponding to the fitting position, so as to obtain the original data at the fitting position on the two-dimensional depth map after intra-frame decompression, and when all the original data on the two-dimensional depth map after intra-frame decompression of the two-dimensional depth map to be intra-frame decompressed is obtained, obtain the two-dimensional depth map after intra-frame decompression of the two-dimensional depth map to be intra-frame decompressed.

[0088] In one embodiment, the inter-frame decompression unit includes:

[0089] An inter-frame decompression module is configured to, when the group of two-dimensional depth maps to be inter-frame decompressed includes the two-dimensional depth map after intra-frame compression of the first frame in the group of two-dimensional depth maps to be inter-frame decompressed, the positions of the other two-dimensional depth maps after intra-frame compression except the two-dimensional depth map after intra-frame compression of the first frame, and the inter-frame deviation of the positions of the other two-dimensional depth maps after intra-frame compression relative to the two-dimensional depth map after intra-frame compression of the first frame, for each two-dimensional depth map after intra-frame compression in the group of two-dimensional depth maps to be inter-frame decompressed except the two-dimensional depth map after intra-frame compression of the first frame, determine the current two-dimensional depth map after intra-frame compression according to the position of the current two-dimensional depth map after intra-frame compression, the inter-frame deviation of the current two-dimensional depth map after intra-frame compression relative to the two-dimensional depth map after intra-frame compression of the first frame, and the two-dimensional depth map after intra-frame compression of the first frame;

[0090] A determination module is configured to, after determining each two-dimensional depth map after intra-frame compression in the group of two-dimensional depth maps to be inter-frame decompressed, determine the two-dimensional depth map after intra-frame compression as the two-dimensional depth map to be intra-frame decompressed, so as to obtain multiple two-dimensional depth maps to be intra-frame decompressed.

[0091] In a third aspect, an embodiment of the present application provides a processing system for lidar data, where the system includes a lidar, a terminal device, and a server;

[0092] The lidar is configured to acquire lidar raw data and send the lidar raw data to the terminal device;

[0093] The terminal device is configured to obtain the overall compressed two-dimensional depth map by executing the method in any one of the first aspects, and send the overall compressed two-dimensional depth map to the server;

[0094] The server is configured to receive the overall compressed two-dimensional depth map sent by the terminal device, determine the overall compressed two-dimensional depth map as the two-dimensional depth map to be decompressed, perform overall decompression on the two-dimensional depth map to be decompressed, and obtain multiple groups of two-dimensional depth maps to be decompressed frame-by-frame. Among them, the group of two-dimensional depth maps to be decompressed frame-by-frame is a group of two-dimensional depth maps obtained by performing inter-frame compression on multiple intra-frame compressed two-dimensional depth maps with a preset number of frames and consecutive frames. According to the differences between the second to the last intra-frame compressed two-dimensional depth maps in the group of two-dimensional depth maps to be decompressed frame-by-frame and the first intra-frame compressed two-dimensional depth map, perform inter-frame decompression on the group of two-dimensional depth maps to be decompressed frame-by-frame, and obtain multiple frames of two-dimensional depth maps to be decompressed intra-frame. Among them, the two-dimensional depth map to be decompressed intra-frame includes at least one fitting position, the fitting parameters corresponding to the fitting position, and the original data at the unfitted positions of the two-dimensional depth map to be decompressed intra-frame before intra-frame compression. The fitting parameters include the normal vector of the fitting plane and the geometric equation of the fitting plane. For each frame of the two-dimensional depth map to be decompressed intra-frame, according to the fitting position and the fitting parameters corresponding to the fitting position, perform intra-frame decompression on the fitting position of the two-dimensional depth map to be decompressed intra-frame, and obtain the original data at the fitting position on the two-dimensional depth map after intra-frame decompression, so as to obtain the two-dimensional depth map after intra-frame decompression of the two-dimensional depth map to be decompressed intra-frame when all the original data on the two-dimensional depth map after intra-frame decompression of the two-dimensional depth map to be decompressed intra-frame is obtained.

[0095] In one implementation, the server is configured to, when the group of two-dimensional depth maps to be decompressed frame-by-frame includes the first intra-frame compressed two-dimensional depth map in the group of two-dimensional depth maps to be decompressed frame-by-frame, the positions of the other intra-frame compressed two-dimensional depth maps except the first intra-frame compressed two-dimensional depth map, and the inter-frame deviation of the positions of the other intra-frame compressed two-dimensional depth maps relative to the first intra-frame compressed two-dimensional depth map, for each intra-frame compressed two-dimensional depth map except the first intra-frame compressed two-dimensional depth map in the group of two-dimensional depth maps to be decompressed frame-by-frame, determine the current intra-frame compressed two-dimensional depth map according to the position of the current intra-frame compressed two-dimensional depth map, the inter-frame deviation of the current intra-frame compressed two-dimensional depth map relative to the first intra-frame compressed two-dimensional depth map, and the first intra-frame compressed two-dimensional depth map. After determining each intra-frame compressed two-dimensional depth map in the group of two-dimensional depth maps to be decompressed frame-by-frame, determine the intra-frame compressed two-dimensional depth map as the two-dimensional depth map to be decompressed intra-frame, so as to obtain multiple frames of two-dimensional depth maps to be decompressed intra-frame.

[0096] Fourthly, an embodiment of the present application provides a storage medium, on which executable instructions are stored. When the instructions are executed by a processor, the processor implements the method described in any one of the embodiments of the first aspect.

[0097] Fifthly, an embodiment of the present application provides an electronic device, including:

[0098] One or more processors;

[0099] A storage device for storing one or more programs,

[0100] wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any one of the embodiments of the first aspect.

[0101] As can be seen from the above, the method and system for processing lidar data provided by the embodiments of the present application can obtain multiple frames of two-dimensional depth maps converted from lidar raw data, and obtain a filter determined according to the ratio of the horizontal angular resolution to the vertical angular resolution of the lidar. Then, according to the filter and a preset plane fitting algorithm, each frame of the two-dimensional depth map is intra-frame compressed to obtain multiple frames of intra-frame compressed two-dimensional depth maps. Then, inter-frame compression is performed on a group of two-dimensional depth maps composed of multiple frames of intra-frame compressed two-dimensional depth maps with a preset number of frames and continuous frames. Finally, overall compression is performed on all the two-dimensional depth maps after inter-frame compression to obtain a final compression result. It can be seen that the embodiments of the present application can not only implement intra-frame compression, inter-frame compression, and overall compression of the two-dimensional depth maps converted from lidar raw data, greatly reducing the data volume of the two-dimensional depth maps from multiple aspects of compression, but also filter the two-dimensional depth maps according to the filter determined by the horizontal and vertical angular resolutions, rather than directly using a filter with the same width and height to filter the two-dimensional depth maps, thereby improving the compression ratio and compression speed. When local storage of lidar data (i.e., lidar raw data or two-dimensional depth maps) is required, the embodiments of the present application can save storage space, and when external transmission is required, the transmission efficiency can be improved.

[0102] The technical effects that can also be achieved by the embodiments of the present application at least include:

[0103] 1. If the compression ratio and / or signal-to-noise ratio of a filter with a ratio of height to width being the ratio of the horizontal angular resolution to the vertical angular resolution of the lidar do not meet the preset compression requirements, the size of the filter can be quickly adjusted according to the horizontal distance resolution, vertical distance resolution of the lidar at the interested distance, and the size of the target object at the interested distance, without blind adjustment, thereby improving the adjustment efficiency.

[0104] 2. During the data format conversion (including converting the original lidar data into lidar point cloud data and converting the lidar point cloud data into a two-dimensional depth map) and data compression processes, different FIFO (First Input First Output) queues can be used for writing and reading. By running multiple threads simultaneously, the frame rate of the algorithm for processing lidar data can be increased. Moreover, under the condition that the lidar model and environment are relatively stable, the size of each frame of data is also relatively stable. The memory occupied by each FIFO can be calculated in advance and applied for during the initialization stage of the algorithm operation, avoiding frequent memory applications and accelerating the calculation speed.

[0105] Of course, it is not necessary for any product or method implementing the present application to achieve all the above-mentioned advantages simultaneously. BRIEF DESCRIPTION OF THE DRAWINGS

[0106] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0107] Figure 1 It is a schematic flowchart diagram of a method for processing lidar data provided by an embodiment of the present application;

[0108] Figure 2 It is an example diagram of parallel processing of lidar data provided by an embodiment of the present application;

[0109] Figure 3 It is a schematic flowchart diagram of another method for processing lidar data provided by an embodiment of the present application;

[0110] Figure 4 It is a schematic structural diagram of a system for processing lidar data provided by an embodiment of the present application;

[0111] Figure 5 It is a block diagram of the composition of a device for processing lidar data provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0112] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0113] It should be noted that the terms "including" and "having" in the embodiments of the present application and the accompanying drawings, and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally further include steps or units not listed, or may optionally further include other steps or units inherent to these processes, methods, products, or devices.

[0114] The present application provides a method and system for processing lidar data, which can compress lidar data from multiple angles, thereby greatly reducing the data volume of lidar data. The embodiments of the present application will be described in detail below.

[0115] Figure 1 It is a schematic flowchart of a method for processing lidar data provided by an embodiment of the present application. This method can be applied to terminal devices such as vehicles and mobile terminals, and this method may include the following steps:

[0116] Step S110: Obtain multiple frames of two-dimensional depth maps converted from the original lidar data, and obtain a filter determined according to the ratio of the horizontal angular resolution and the vertical angular resolution of the lidar.

[0117] As Figure 2 shown, the specific implementation manner of obtaining multiple frames of two-dimensional depth maps converted from the original lidar data may include: receiving the original lidar data sent by the lidar; converting the original lidar data into multiple frames of lidar point cloud data; in accordance with the conversion order of the original lidar data, sequentially adding each frame of lidar point cloud data to the point cloud FIFO queue; in accordance with the principle of first in first out of the point cloud FIFO queue, sequentially obtaining each frame of lidar point cloud data from the point cloud FIFO queue, and converting each frame of lidar point cloud data into a two-dimensional depth map; in accordance with the conversion order of the lidar point cloud data, sequentially adding the converted two-dimensional depth maps to the depth map FIFO queue; in accordance with the principle of first in first out of the depth map FIFO queue, sequentially obtaining each frame of lidar two-dimensional depth map in the depth map FIFO queue.

[0118] Among them, when converting the original lidar data into multiple frames of lidar point cloud data, it can be implemented based on the lidar driver; when converting each frame of lidar point cloud data into a two-dimensional depth map, it can be implemented based on the conversion module. When obtaining each frame of lidar two-dimensional depth map in the depth map FIFO queue, it can be obtained and intra-frame and inter-frame compression can be implemented based on the compression module, and the inter-frame compressed two-dimensional depth map is added to the data transmission FIFO queue, so that after the overall compression of the data transmission FIFO queue, the overall compressed two-dimensional depth map is transmitted to the server.

[0119] Point cloud data refers to a set of vectors in a three-dimensional coordinate system. The scanning data of point cloud data is recorded in the form of points, and each point contains three-dimensional coordinates. Some may contain color information or reflection intensity information. The maximum scanning range of the lidar in the embodiments of the present application can be 360 degrees or other ranges. One frame of lidar point cloud data corresponds to the original lidar data scanned by the lidar in one maximum scanning range. The two-dimensional depth map (here refers to the original data of the uncompressed two-dimensional depth map) includes a plurality of data points (also called pixel points), and the coordinates of each data point include depth information and intensity information. The depth information represents the distance between the target object represented by the data point and the lidar, and the intensity information represents the intensity of the lidar pulse echo that generates a certain data point.

[0120] For each FIFO, when the quantity reaches the length limit, the earliest enqueued data can be deleted to prevent memory overflow. By adopting this mechanism, the functions of the lidar driver, conversion module, and compression module can be run simultaneously through multiple threads, which can improve the frame rate of the algorithm for processing lidar data. And under the condition that the lidar model and environment are relatively stable, the size of each frame of data is also relatively stable. The memory occupied by each FIFO can be calculated in advance and applied for during the initialization stage of the algorithm operation, avoiding frequent memory applications and accelerating the calculation speed. At the same time, this method can artificially specify the length of each FIFO by applying for the size of the memory. When a blockage occurs in a certain link, the data will accumulate in the corresponding FIFO. After reaching the maximum value, the earliest obtained data will be popped out, which will not cause the entire link to stop, increasing the robustness of the program. And during the program operation, the length of each FIFO will be monitored in real time, and the blocked link can be quickly located.

[0121] In one implementation, the specific implementation method of obtaining the filter determined according to the ratio of the horizontal angular resolution and the vertical angular resolution of the lidar includes: obtaining a filter with the ratio of height to width being the ratio of the horizontal angular resolution and the vertical angular resolution of the lidar. For example, when the ratio of the horizontal angular resolution and the vertical angular resolution is 1:5, a filter with a height of 1 and a width of 5, that is, a filter with a size of 1×5, can be selected, or a filter with a size of 2×10 can also be selected. Angular resolution refers to the resolution ability of an imaging system or a component of the system, that is, the ability of the imaging system or system component to distinguish the minimum distance between two adjacent objects differently.

[0122] However, in practical applications, when directly using the ratio of the lateral angular resolution to the longitudinal angular resolution of the lidar as the ratio of the height to the width of the filter for compression, there may be a situation where the compression rate is appropriate, but the signal-to-noise ratio is low, resulting in a high distortion rate of the decompressed lidar data. To balance the compression rate and the signal-to-noise ratio so that both the compression rate and the signal-to-noise ratio meet the preset compression requirements, the size of the filter can be adjusted based on the ratio of the lateral angular resolution to the longitudinal angular resolution of the lidar. To improve the adjustment efficiency, before performing step S120, if the compression rate and / or the signal-to-noise ratio of the filter with the ratio of the height to the width being the ratio of the lateral angular resolution to the longitudinal angular resolution of the lidar does not meet the preset compression requirements, then the size of the filter is adjusted according to the lateral distance resolution of the lidar at the distance of interest, the longitudinal distance resolution at the distance of interest, and the size of the target object at the distance of interest until the compression rate and the signal-to-noise ratio of the adjusted filter meet the preset compression requirements, and the finally required filter is obtained. Wherein, the distance of interest is the distance corresponding to the original lidar data, and the size includes height and width. The preset compression requirements include that the compression rate is less than or equal to the preset compression rate threshold and the signal-to-noise ratio is greater than or equal to the preset signal-to-noise ratio threshold.

[0123] The above compression rate refers to the compression rate calculated for the inter-frame compressed two-dimensional depth map obtained after performing steps S120 and S130 on multiple frames of two-dimensional depth maps. The calculation method includes: Where η represents the compression rate, c key represents the size of the first inter-frame compressed two-dimensional depth map in a group of two-dimensional depth maps mentioned below, c i represents the size of the (i + 1)-th inter-frame compressed two-dimensional depth map in this group of two-dimensional depth maps, represents the size before intra-frame compression for each frame of the two-dimensional depth map. For a scene with little environmental change, it can be approximately considered a constant value. n represents the number of frames in a group of two-dimensional depth maps, that is, the preset number of frames mentioned below. 0 ≤ i ≤ n - 1, c0 = c key , and n is a positive integer.

[0124] In the lidar image, when two targets are at the same azimuth angle but at different distances from the lidar, the minimum distance at which they can be distinguished by the lidar is the distance resolution. The calculation method of the distance resolution includes: calculating the lateral distance resolution of the lidar at the distance of interest according to the distance of interest, the lateral angular resolution, and the installation height of the lidar; calculating the longitudinal distance resolution of the lidar at the distance of interest according to the distance of interest, the longitudinal angular resolution, and the installation height of the lidar.

[0125] The calculation process of the horizontal distance resolution includes: substituting the interested distance l, the horizontal angular resolution α of the lidar heng and the installation height h into the first formula to calculate the horizontal distance resolution d of the lidar at the interested distance heng , where the first formula is

[0126] And / or, the calculation process of the vertical distance resolution includes: substituting the interested distance l, the vertical angular resolution α of the lidar zong and the installation height h into the second formula to calculate the vertical distance resolution d of the lidar at the interested distance zong , where the second formula is

[0127] The method for adjusting the size of the filter according to the horizontal distance resolution of the lidar at the interested distance, the vertical distance resolution at the interested distance, and the size of the target object at the interested distance includes: respectively calculating the ratio of the height of the target object at the interested distance to the horizontal distance resolution of the lidar at the interested distance, and the ratio of the width of the target object to the vertical distance resolution; if the ratio of the height of the target object to the horizontal distance resolution is greater than the ratio of the width of the target object to the vertical distance resolution, then increase the size ratio of the height of the filter; if the ratio of the height of the target object to the horizontal distance resolution is less than the ratio of the width of the target object to the vertical distance resolution, then increase the size ratio of the width of the filter. The size ratio of the height = height / (height + width), and the size ratio of the width = width / (height + width).

[0128] In an embodiment, if the horizontal angular resolution and the vertical angular resolution of the lidar are 0.1 degree and 0.5 degree respectively, the interested distance is 80 m, and the installation height is 6 m, and the calculated horizontal distance resolution and vertical distance resolution are 0.14 m and 0.7 m respectively, then the ratio of the horizontal distance resolution to the vertical distance resolution is 1:5. Thus, the filter can be set to a size of 1×5 first. However, when compressing based on the filter of this size, the obtained signal-to-noise ratio does not meet the preset compression requirement. Therefore, it can be adjusted based on the horizontal distance resolution and the vertical distance resolution. Assuming that the height and width of the target object at the interested distance are 1.5 m and 5 m respectively, then the ratio of the height of the target object to the horizontal distance resolution is greater than the ratio of the width of the target object to the vertical distance resolution. Thus, the size ratio of the height can be increased, and finally a filter of 2×6 is obtained.

[0129] It should be noted that since there is no dependency relationship between "obtaining multiple frames of two-dimensional depth maps converted from lidar raw data" and "obtaining a filter determined according to the horizontal angular resolution and vertical angular resolution of the lidar", the execution order of the two in the implementation of this application is not limited.

[0130] Step S120: Perform intra-frame compression on each frame of the two-dimensional depth map according to the filter and a preset plane fitting algorithm to obtain multiple frames of intra-frame compressed two-dimensional depth maps.

[0131] Perform plane fitting on a first target area on the two-dimensional depth map to be intra-frame compressed filtered by the filter according to the preset plane fitting algorithm to obtain a first fitting plane; calculate a first fitting error according to the difference between the coordinates of multiple data points on the first fitting plane and the coordinates of the same corresponding data point on the two-dimensional depth map to be intra-frame compressed; if the first fitting error is less than a preset error threshold, retain the first fitting record, where the first fitting record includes the fitting position of the first fitting plane and the fitting parameters of the first fitting plane, the fitting position of the first fitting plane is the position of the first target area on the two-dimensional depth map to be intra-frame compressed, and the fitting parameters of the first fitting plane include the normal vector and geometric equation of the first fitting plane; if the first fitting error is greater than or equal to the preset error threshold, do not retain the first fitting record; after sliding the filter to a second target area, perform plane fitting on the first target area and the second target area as a whole area according to the preset plane fitting algorithm to obtain a second fitting plane; calculate a second fitting error according to the difference between the coordinates of multiple data points on the second fitting plane and the coordinates of the same corresponding data point on the two-dimensional depth map to be intra-frame compressed before plane fitting; if the second fitting error is less than the preset error threshold, replace the first fitting record with the second fitting record, where the second fitting record includes the fitting position of the second fitting plane and the fitting parameters of the second fitting plane, the fitting position of the second fitting plane includes the position of the first target area and the position of the second target area, and the fitting parameters of the second fitting plane include the normal vector and geometric equation of the second fitting plane; if the second fitting error is greater than or equal to the preset error threshold, re-perform plane fitting on the second target area until after performing plane fitting processing on the last target area of the two-dimensional depth map to be intra-frame compressed, obtain a two-dimensional depth map after intra-frame compression of the two-dimensional depth map to be intra-frame compressed, where the two-dimensional depth map after intra-frame compression includes the finally retained fitting record and the original data of the target areas without retained fitting records on the two-dimensional depth map to be intra-frame compressed; after completing intra-frame compression on the multiple frames of two-dimensional depth maps, obtain multiple frames of intra-frame compressed two-dimensional depth maps.

[0132] The preset plane fitting algorithm can be the linear least squares method or other plane fitting algorithms. The calculation method of the fitting error (including the first fitting error and the second fitting error) can include: calculating the mean square error of the differences for multiple data points based on the differences between the coordinates of multiple data points on the fitting plane (including the first fitting plane and the second fitting plane) and the coordinates of the same data point on the two-dimensional depth map, and taking this mean square error as the fitting error.

[0133] Assume that the two-dimensional depth map to be intra-frame compressed can be divided into target regions of 3 filter sizes, namely the first target region, the second target region, and the third target region. Then, if the first fitting error of the first fitting plane for the first target region is less than the preset error threshold, the first fitting record is retained, including the fitting position of the first fitting plane (the position of the first target region) and the fitting parameters of the first fitting plane; after the filter slides to the second target region, the first target region and the second target region are taken as an overall region for plane fitting to obtain the second fitting plane. If the second fitting error of the second fitting plane is less than the preset error threshold, the second fitting record is used to replace the first fitting record. The second fitting record includes the fitting position of the second fitting plane (the position of the first target region and the second target region) and the fitting parameters of the second fitting plane; the filter continues to slide to the third target region, and the first target region to the third target region are taken as an overall region for plane fitting to obtain the third fitting plane. If the third fitting error of the third fitting plane is greater than or equal to the preset error threshold, the plane fitting is continued only for the third target region to obtain the fourth fitting plane. If the fourth fitting error of the fourth fitting plane is greater than or equal to the preset error threshold, the original data of the third target region on the two-dimensional depth map is retained. The finally obtained intra-frame compressed two-dimensional depth map includes: the positions of the first target region and the second target region, the fitting parameters of the second fitting plane for plane fitting of the overall region composed of the first target region and the second target region, and the original data of the third target region on the two-dimensional depth map before intra-frame compression.

[0134] Step S130: For a group of two-dimensional depth maps, perform inter-frame compression on the group of two-dimensional depth maps according to the differences between the second intra-frame compressed two-dimensional depth map to the last intra-frame compressed two-dimensional depth map in the group of two-dimensional depth maps and the first intra-frame compressed two-dimensional depth map.

[0135] Each group of two-dimensional depth maps includes multiple intra-frame compressed two-dimensional depth maps with a preset number of consecutive frames. At any time from when the original lidar data is converted into a two-dimensional depth map until before inter-frame compression, the two-dimensional depth map can be grouped. Through the above compression ratio calculation formula It can be known that the larger the preset number of frames n is, the smaller the compression ratio is, and the better the compressibility is. However, the better the compressibility is, the smaller the signal-to-noise ratio is, and the higher the distortion rate of the two-dimensional depth map is. Therefore, the value of n needs to be determined according to actual experience to meet the preset compression requirements set according to the compression ratio and the signal-to-noise ratio. For example, the value can be 10.

[0136] For each intra-frame compressed two-dimensional depth map in a two-dimensional depth map group except the first intra-frame compressed two-dimensional depth map, calculate the difference between multiple target regions in the current intra-frame compressed two-dimensional depth map and the corresponding target regions in the first intra-frame compressed two-dimensional depth map to obtain the inter-frame deviation corresponding to the current intra-frame compressed two-dimensional depth map. The target region is the area size of one filtering by the filter, that is, including the above-mentioned first target region, second target region, etc.; retain the first intra-frame compressed two-dimensional depth map, and replace the current intra-frame compressed two-dimensional depth map with the position of the current intra-frame compressed two-dimensional depth map and the corresponding inter-frame deviation.

[0137] When calculating the difference between multiple target regions in the current intra-frame compressed two-dimensional depth map and the corresponding target regions in the first intra-frame compressed two-dimensional depth map, if the data included in a certain target region in the current intra-frame compressed two-dimensional depth map and the corresponding target region at the corresponding position in the first intra-frame compressed two-dimensional depth map are all fitting parameters, then the difference between the two is the difference between the normal vectors of the two fitting planes and the difference between the geometric equations of the two fitting planes. If the data included in a certain target region in the current intra-frame compressed two-dimensional depth map and the corresponding target region at the corresponding position in the first intra-frame compressed two-dimensional depth map are all the original data on the two-dimensional depth map before intra-frame compression, then the difference between the two is the difference between their original data (i.e., the coordinate difference of the data points). If the data included in a certain target region in the current intra-frame compressed two-dimensional depth map and the corresponding target region at the corresponding position in the first intra-frame compressed two-dimensional depth map include fitting parameters and original data, then the fitting parameters can be first converted into the original data on the two-dimensional depth map before intra-frame compression, that is, determine the coordinates of each data point on the fitting plane, and then calculate the difference between their original data.

[0138] Step S140: After performing inter-frame compression on all two-dimensional depth map groups, perform overall compression on all inter-frame compressed two-dimensional depth maps to obtain an overall compressed two-dimensional depth map.

[0139] The overall compression can be a file compression method or other compression methods. For example, it can be file compression methods such as zip and rar. After obtaining the overall compressed two-dimensional depth map, the overall compressed two-dimensional depth map can be stored locally or sent to the server so that after the server decompresses it, operations such as statistics and analysis can be performed on the decompressed data.

[0140] When it is necessary to transmit the overall compressed two-dimensional depth map to the server, the inter-frame compressed two-dimensional depth groups can be added to the data transmission FIFO queue in sequence according to the inter-frame compression order of the two-dimensional depth map grouping. After all the inter-frame compressed two-dimensional depth groups are added to the data transmission FIFO queue, the data transmission FIFO queue is overall compressed to obtain the overall compressed two-dimensional depth map. Specifically, the entire data transmission FIFO queue can be overall compressed, or the data in the data transmission queue can be compressed in batches, and the overall compressed two-dimensional depth maps are sent to the server in sequence according to the first-in first-out principle.

[0141] The method for processing lidar data provided by the embodiments of the present application can obtain multiple frames of two-dimensional depth maps converted from lidar raw data, and obtain a filter determined according to the ratio of the horizontal angular resolution and the vertical angular resolution of the lidar. Then, according to this filter and a preset plane fitting algorithm, each frame of the two-dimensional depth map is intra-frame compressed to obtain multiple frames of intra-frame compressed two-dimensional depth maps. Then, inter-frame compression is performed on the two-dimensional depth map grouping composed of multiple consecutive intra-frame compressed two-dimensional depth maps with a preset number of frames, and finally, all the two-dimensional depth maps after inter-frame compression are overall compressed to obtain the final compression result. It can be seen that the embodiments of the present application can not only achieve intra-frame compression, inter-frame compression, and overall compression of the two-dimensional depth map converted from lidar raw data, greatly reducing the data volume of the two-dimensional depth map in terms of multi-angle compression, but also filter the two-dimensional depth map according to the filter determined by the horizontal and vertical angular resolutions, rather than directly using a filter with the same width and height to filter the two-dimensional depth map, thereby improving the compression ratio and compression speed. When it is necessary to locally store lidar data (i.e., lidar raw data or two-dimensional depth map), the embodiments of the present application can save storage space, and when it is necessary to transmit outward, the transmission efficiency can be improved.

[0142] Based on the above method embodiments, the present application also provides a method for processing lidar data, which can be applied to a terminal device or a server. When applied to a terminal device, after compression based on the Figure 1 method shown, the compressed two-dimensional depth map (i.e., Figure 1 the overall compressed two-dimensional depth map finally obtained) can be saved locally. When it is necessary to read it, the overall compressed two-dimensional depth map saved locally can be determined as the two-dimensional depth map to be decompressed, and the embodiments of the present application are used for decompression; when applied to a server, after compression based on the Figure 1 method shown, the compressed two-dimensional depth map (i.e., Figure 1The finally obtained overall compressed two-dimensional depth map is sent to the server, and the server determines the received overall compressed two-dimensional depth map as the two-dimensional depth map to be decompressed, and decompresses it using the embodiments of the present application. As Figure 3 shown, the method includes:

[0143] Step S210: Obtain the two-dimensional depth map to be decompressed.

[0144] The two-dimensional depth map to be decompressed is the data obtained by compressing the two-dimensional depth map obtained by converting the original data of the lidar. The compression process is as Figure 1 shown in the embodiments, and will not be elaborated here.

[0145] Step S220: Perform overall decompression on the two-dimensional depth map to be decompressed to obtain multiple groups of two-dimensional depth maps to be decompressed between frames.

[0146] Among them, the group of two-dimensional depth maps to be decompressed between frames is a group of two-dimensional depth maps obtained by performing inter-frame compression on multiple intra-frame compressed two-dimensional depth maps with a preset number of frames and consecutive frames. The overall decompression is the inverse algorithm of the algorithm used for overall compression. For example, when the overall compression uses the zip compression algorithm, the overall decompression uses the zip decompression algorithm.

[0147] Step S230: According to the differences between the second to the last intra-frame compressed two-dimensional depth maps in the group of two-dimensional depth maps to be decompressed between frames and the first intra-frame compressed two-dimensional depth map, perform inter-frame decompression on the group of two-dimensional depth maps to be decompressed between frames to obtain multiple frames of two-dimensional depth maps to be decompressed within frames.

[0148] Among them, the two-dimensional depth map to be decompressed within frames includes at least one fitting position, the fitting parameters corresponding to the fitting position, and the original data at the unfitted positions of the two-dimensional depth map to be decompressed within frames before intra-frame compression. The fitting parameters include the normal vector of the fitting plane and the geometric equation of the fitting plane.

[0149] When the two-dimensional depth map group to be inter-frame decompressed includes the intra-frame compressed two-dimensional depth map of the first frame in the two-dimensional depth map group to be inter-frame decompressed, the positions of the intra-frame compressed two-dimensional depth maps of other frames except the intra-frame compressed two-dimensional depth map of the first frame, and the inter-frame deviation of the positions of the intra-frame compressed two-dimensional depth maps of other frames relative to the intra-frame compressed two-dimensional depth map of the first frame, the specific implementation process of this step includes: for each intra-frame compressed two-dimensional depth map in the two-dimensional depth map group to be inter-frame decompressed except the intra-frame compressed two-dimensional depth map of the first frame, determine the intra-frame compressed two-dimensional depth map of the current frame according to the position of the intra-frame compressed two-dimensional depth map of the current frame, the inter-frame deviation of the intra-frame compressed two-dimensional depth map of the current frame relative to the intra-frame compressed two-dimensional depth map of the first frame, and the intra-frame compressed two-dimensional depth map of the first frame; after determining each intra-frame compressed two-dimensional depth map in the two-dimensional depth map group to be inter-frame decompressed, determine the intra-frame compressed two-dimensional depth map as the two-dimensional depth map to be intra-frame decompressed, so as to obtain multiple two-dimensional depth maps to be intra-frame decompressed.

[0150] Adding the inter-frame deviation of the intra-frame compressed two-dimensional depth map of the current frame relative to the intra-frame compressed two-dimensional depth map of the first frame to the intra-frame compressed two-dimensional depth map of the first frame obtains the data included in the intra-frame compressed two-dimensional depth map of the current frame. Combining with the position of the intra-frame compressed two-dimensional depth map of the current frame, the complete intra-frame compressed two-dimensional depth map of the current frame is determined, that is, the intra-frame compressed two-dimensional depth map located at which position is obtained.

[0151] Step S240: For each two-dimensional depth map to be intra-frame decompressed, perform intra-frame decompression on the fitting position of the two-dimensional depth map to be intra-frame decompressed according to the fitting position and the fitting parameters corresponding to the fitting position, to obtain the original data of the fitting position on the intra-frame decompressed two-dimensional depth map, so as to obtain the intra-frame decompressed two-dimensional depth map of the two-dimensional depth map to be intra-frame decompressed when all the original data of the two-dimensional depth map to be intra-frame decompressed on the intra-frame decompressed two-dimensional depth map are obtained.

[0152] The process of performing intra-frame decompression on the fitting position of the two-dimensional depth map to be intra-frame decompressed according to the fitting position and the fitting parameters corresponding to the fitting position to obtain the original data of the fitting position on the intra-frame decompressed two-dimensional depth map includes: calculating the coordinates of each data point on the fitting plane according to the normal vector and geometric plane of the fitting plane of the fitting position, and obtaining the original data of the fitting position on the intra-frame decompressed two-dimensional depth map. When selecting data points on the fitting plane, the selection can be made according to the spacing between each data point on the two-dimensional depth map before intra-frame compression.

[0153] The laser radar data processing method provided in the embodiment of the present application can, after obtaining the two-dimensional depth map to be decompressed, sequentially perform overall decompression, inter-frame decompression, and intra-frame decompression, and finally obtain the two-dimensional depth map before compression. Since compression and decompression are reversible operations, it can be seen from the decompression process that the embodiment of the present application can sequentially perform intra-frame compression, inter-frame compression, and overall compression on the two-dimensional depth map converted from the laser radar raw data, greatly reducing the data volume of the two-dimensional depth map from the perspective of multi-angle compression.

[0154] Corresponding to the above method embodiment, the present application embodiment provides a laser radar data processing system, such as Figure 4 As shown, the system includes a laser radar, a terminal device and a server;

[0155] The laser radar is used to obtain raw laser radar data and send the raw laser radar data to the terminal device;

[0156] The terminal device is used to execute Figure 1 The method in the corresponding embodiment obtains a two-dimensional depth map after overall compression, and sends the two-dimensional depth map after overall compression to the server; wherein the compression process includes intra-frame compression, inter-frame compression and overall compression;

[0157] The server is configured to receive the overall compressed two-dimensional depth map sent by the terminal device, determine the overall compressed two-dimensional depth map as the two-dimensional depth map to be decompressed, perform overall decompression on the two-dimensional depth map to be decompressed, and obtain multiple groups of two-dimensional depth maps to be decompressed frame-by-frame. Among them, the group of two-dimensional depth maps to be decompressed frame-by-frame is a group of two-dimensional depth maps obtained by performing inter-frame compression on multiple intra-frame compressed two-dimensional depth maps with a preset number of frames and consecutive frames. According to the differences between the second to the last intra-frame compressed two-dimensional depth maps in the group of two-dimensional depth maps to be decompressed frame-by-frame and the first intra-frame compressed two-dimensional depth map, perform inter-frame decompression on the group of two-dimensional depth maps to be decompressed frame-by-frame, and obtain multiple two-dimensional depth maps to be decompressed intra-frame. Among them, the two-dimensional depth map to be decompressed intra-frame includes at least one fitting position, the fitting parameters corresponding to the fitting position, and the original data at the unfitted positions of the two-dimensional depth map to be decompressed intra-frame before intra-frame compression. The fitting parameters include the normal vector of the fitting plane and the geometric equation of the fitting plane. For each two-dimensional depth map to be decompressed intra-frame, according to the fitting position and the fitting parameters corresponding to the fitting position, perform intra-frame decompression on the fitting position of the two-dimensional depth map to be decompressed intra-frame, and obtain the original data at the fitting position on the two-dimensional depth map after intra-frame decompression, so as to obtain the two-dimensional depth map after intra-frame decompression of the two-dimensional depth map to be decompressed intra-frame when obtaining all the original data on the two-dimensional depth map after intra-frame decompression of the two-dimensional depth map to be decompressed intra-frame.

[0158] In one implementation, the server is configured to, when the group of two-dimensional depth maps to be decompressed frame-by-frame includes the first intra-frame compressed two-dimensional depth map in the group of two-dimensional depth maps to be decompressed frame-by-frame, the positions of the other intra-frame compressed two-dimensional depth maps except the first intra-frame compressed two-dimensional depth map, and the inter-frame deviation of the positions of the other intra-frame compressed two-dimensional depth maps relative to the first intra-frame compressed two-dimensional depth map, for each intra-frame compressed two-dimensional depth map except the first intra-frame compressed two-dimensional depth map in the group of two-dimensional depth maps to be decompressed frame-by-frame, determine the current intra-frame compressed two-dimensional depth map based on the position of the current intra-frame compressed two-dimensional depth map, the inter-frame deviation of the current intra-frame compressed two-dimensional depth map relative to the first intra-frame compressed two-dimensional depth map, and the first intra-frame compressed two-dimensional depth map. After determining each intra-frame compressed two-dimensional depth map in the group of two-dimensional depth maps to be decompressed frame-by-frame, determine the intra-frame compressed two-dimensional depth map as the two-dimensional depth map to be decompressed intra-frame, so as to obtain multiple two-dimensional depth maps to be decompressed intra-frame.

[0159] Based on the above method embodiments, another embodiment of the present application provides a processing device for lidar data, such asFigure 5 As shown, the device includes:

[0160] A depth map acquisition unit 30, configured to acquire multiple frames of two-dimensional depth maps converted from lidar raw data;

[0161] A filter acquisition unit 32, configured to acquire a filter determined according to the ratio of the horizontal angular resolution and the vertical angular resolution of the lidar;

[0162] An intra-frame compression unit 34, configured to perform intra-frame compression on each frame of two-dimensional depth map according to the filter and a preset plane fitting algorithm to obtain multiple frames of intra-frame compressed two-dimensional depth maps;

[0163] An inter-frame compression unit 36, configured to, for a group of two-dimensional depth maps, perform inter-frame compression on the group of two-dimensional depth maps according to the differences between the second to the last intra-frame compressed two-dimensional depth maps and the first intra-frame compressed two-dimensional depth map in the group of two-dimensional depth maps, where each group of two-dimensional depth maps includes multiple frames of intra-frame compressed two-dimensional depth maps with a preset number of frames and being consecutive;

[0164] An overall compression unit 38, configured to perform overall compression on all the inter-frame compressed two-dimensional depth maps after performing inter-frame compression on all groups of two-dimensional depth maps to obtain overall compressed two-dimensional depth maps.

[0165] In one implementation, the depth map acquisition unit 30 is configured to acquire a filter whose height-width ratio is the ratio of the horizontal angular resolution and the vertical angular resolution of the lidar;

[0166] The device further includes:

[0167] An adjustment unit, configured to, before performing intra-frame compression on each frame of two-dimensional depth map according to the filter and a preset plane fitting algorithm to obtain multiple frames of intra-frame compressed two-dimensional depth maps, if the compression rate and / or signal-to-noise ratio of the filter whose height-width ratio is the ratio of the horizontal angular resolution and the vertical angular resolution of the lidar do not meet the preset compression requirements, adjust the size of the filter according to the horizontal distance resolution of the lidar at the interested distance, the vertical distance resolution at the interested distance, and the size of the target object at the interested distance until the compression rate and signal-to-noise ratio of the adjusted filter meet the preset compression requirements, and then obtain the finally required filter, where the interested distance is the distance corresponding to the lidar raw data, and the size includes height and width.

[0168] In one implementation, the adjustment unit includes:

[0169] A ratio calculation module, configured to calculate the ratio of the height of the target object at the distance of interest to the lateral distance resolution of the lidar at the distance of interest, and the ratio of the width of the target object to the longitudinal distance resolution respectively;

[0170] An adjustment module, configured to increase the size ratio of the height of the filter if the ratio of the height of the target object to the lateral distance resolution is greater than the ratio of the width of the target object to the longitudinal distance resolution, and increase the size ratio of the width of the filter if the ratio of the height of the target object to the lateral distance resolution is less than the ratio of the width of the target object to the longitudinal distance resolution.

[0171] In one implementation, the intra-frame compression unit 34 includes:

[0172] A fitting module, configured to perform plane fitting on a first target area on the two-dimensional depth map to be intra-frame compressed filtered by the filter according to the preset plane fitting algorithm, to obtain a first fitting plane;

[0173] An error calculation module, configured to calculate a first fitting error according to the difference between the coordinates of multiple data points on the first fitting plane and the coordinates of the same corresponding data point on the two-dimensional depth map to be intra-frame compressed;

[0174] A first retention module, configured to retain a first fitting record if the first fitting error is less than a preset error threshold, where the first fitting record includes the fitting position of the first fitting plane and the fitting parameters of the first fitting plane, the fitting position of the first fitting plane is the position of the first target area on the two-dimensional depth map to be intra-frame compressed, and the fitting parameters of the first fitting plane include the normal vector and the geometric equation of the first fitting plane, and not retain the first fitting record if the first fitting error is greater than or equal to the preset error threshold;

[0175] A fitting module, configured to, after sliding the filter to a second target area, perform plane fitting on the first target area and the second target area as a whole area according to the preset plane fitting algorithm, to obtain a second fitting plane;

[0176] An error calculation module, configured to calculate a second fitting error according to the difference between the coordinates of multiple data points on the second fitting plane and the coordinates of the same corresponding data point on the two-dimensional depth map before plane fitting;

[0177] A first replacement module, configured to replace the first fitting record with the second fitting record if the second fitting error is less than the preset error threshold, where the second fitting record includes the fitting position of the second fitting plane and the fitting parameters of the second fitting plane, the fitting position of the second fitting plane includes the positions of the first target region and the second target region, and the fitting parameters of the second fitting plane include the normal vector of the second fitting plane and the geometric equation;

[0178] A fitting module, configured to re-perform plane fitting on the second target region if the second fitting error is greater than or equal to the preset error threshold, until after plane fitting processing is performed on the last target region of the to-be intra-frame compressed two-dimensional depth map, a two-dimensional depth map after intra-frame compression of the to-be intra-frame compressed two-dimensional depth map is obtained, where the two-dimensional depth map after intra-frame compression includes the finally retained fitting record and the original data of the target regions without retained fitting records on the to-be intra-frame compressed two-dimensional depth map;

[0179] A first acquisition module, configured to obtain multiple two-dimensional depth maps after intra-frame compression after completing intra-frame compression of the multiple two-dimensional depth maps.

[0180] In one embodiment, the inter-frame compression unit 36 includes:

[0181] A deviation calculation module, configured to calculate, for each two-dimensional depth map after intra-frame compression in a two-dimensional depth map group except for the first two-dimensional depth map after intra-frame compression, the difference between multiple target regions in the current two-dimensional depth map after intra-frame compression and the corresponding target regions in the first two-dimensional depth map after intra-frame compression, to obtain the inter-frame deviation of the current two-dimensional depth map after intra-frame compression relative to the first two-dimensional depth map after intra-frame compression, where the target region is the area size of one filtering by the filter;

[0182] A second retention module, configured to retain the first two-dimensional depth map after intra-frame compression;

[0183] A second replacement module, configured to replace the current two-dimensional depth map after intra-frame compression with the position of the current two-dimensional depth map after intra-frame compression and the corresponding inter-frame deviation.

[0184] In one embodiment, the depth map acquisition unit 30 includes:

[0185] A receiving module, configured to receive the raw lidar data sent by the lidar;

[0186] A first conversion module, configured to convert the raw lidar data into multiple frames of lidar point cloud data;

[0187] The first adding module is used to sequentially add each frame of lidar point cloud data to the point cloud first-in-first-out (FIFO) queue according to the conversion order of the lidar raw data;

[0188] The second conversion module is used to sequentially obtain each frame of lidar point cloud data from the point cloud FIFO queue according to the first-in-first-out principle of the point cloud FIFO queue, and convert each frame of lidar point cloud data into a two-dimensional depth map;

[0189] The second adding module is used to sequentially add the converted two-dimensional depth maps to the depth map FIFO queue according to the conversion order of the lidar point cloud data;

[0190] The second obtaining module is used to sequentially obtain each frame of lidar two-dimensional depth map in the depth map FIFO queue according to the first-in-first-out principle of the depth map FIFO queue.

[0191] In one implementation, the overall compression unit 38 includes:

[0192] The third adding module is used to sequentially add each two-dimensional depth group after inter-frame compression to the data transmission FIFO queue according to the inter-frame compression order of the two-dimensional depth map grouping;

[0193] The overall compression module is used to perform overall compression on the data transmission FIFO queue after adding all the two-dimensional depth groups after inter-frame compression to the data transmission FIFO queue, and obtain an overall compressed two-dimensional depth map.

[0194] In one implementation, the device includes:

[0195] The determination unit is used to, after performing overall compression on all the two-dimensional depth maps after inter-frame compression to obtain an overall compressed two-dimensional depth map, when it is necessary to decompress the overall compressed two-dimensional depth map, determine the overall compressed two-dimensional depth map as the two-dimensional depth map to be decompressed;

[0196] The overall decompression unit is used to perform overall decompression on the two-dimensional depth map to be decompressed, and obtain a plurality of two-dimensional depth map groups to be inter-frame decompressed, where the two-dimensional depth map groups to be inter-frame decompressed are two-dimensional depth map groups obtained by performing inter-frame compression on multiple consecutive frames of intra-frame compressed two-dimensional depth maps with a preset number of frames;

[0197] An inter-frame decompression unit, configured to perform inter-frame decompression on the two-dimensional depth map group to be inter-frame decompressed according to the differences between the second intra-frame compressed two-dimensional depth map to the last intra-frame compressed two-dimensional depth map in the two-dimensional depth map group to be inter-frame decompressed and the first intra-frame compressed two-dimensional depth map, so as to obtain multiple two-dimensional depth maps to be intra-frame decompressed, where the two-dimensional depth map to be intra-frame decompressed includes at least one fitting position, fitting parameters corresponding to the fitting position, and original data at positions that are not fitted in the two-dimensional depth map to be intra-frame decompressed before intra-frame compression, and the fitting parameters include a normal vector of a fitting plane and a geometric equation of the fitting plane;

[0198] An intra-frame decompression unit, configured to, for each two-dimensional depth map to be intra-frame decompressed, perform intra-frame decompression on the fitting position of the two-dimensional depth map to be intra-frame decompressed according to the fitting position and the fitting parameters corresponding to the fitting position, so as to obtain the original data at the fitting position on the two-dimensional depth map after intra-frame decompression, so that when obtaining all the original data on the two-dimensional depth map after intra-frame decompression of the two-dimensional depth map to be intra-frame decompressed, the two-dimensional depth map after intra-frame decompression of the two-dimensional depth map to be intra-frame decompressed is obtained.

[0199] In one implementation, the inter-frame decompression unit includes:

[0200] An inter-frame decompression module, configured to, when the two-dimensional depth map group to be inter-frame decompressed includes the first intra-frame compressed two-dimensional depth map in the two-dimensional depth map group to be inter-frame decompressed, the positions of the other intra-frame compressed two-dimensional depth maps except the first intra-frame compressed two-dimensional depth map, and the inter-frame deviation of the positions of the other intra-frame compressed two-dimensional depth maps relative to the first intra-frame compressed two-dimensional depth map, for each intra-frame compressed two-dimensional depth map except the first intra-frame compressed two-dimensional depth map in the two-dimensional depth map group to be inter-frame decompressed, determine the current intra-frame compressed two-dimensional depth map according to the position of the current intra-frame compressed two-dimensional depth map, the inter-frame deviation of the current intra-frame compressed two-dimensional depth map relative to the first intra-frame compressed two-dimensional depth map, and the first intra-frame compressed two-dimensional depth map;

[0201] A determination module, configured to, after determining each intra-frame compressed two-dimensional depth map in the two-dimensional depth map group to be inter-frame decompressed, determine the intra-frame compressed two-dimensional depth map as a two-dimensional depth map to be intra-frame decompressed, so as to obtain multiple two-dimensional depth maps to be intra-frame decompressed.

[0202] Based on the above method embodiment, another embodiment of the present application provides a storage medium, on which executable instructions are stored, and when the instructions are executed by a processor, the processor implements the method as described above.

[0203] Based on the above method embodiments, another embodiment of the present application provides an electronic device, including:

[0204] One or more processors;

[0205] A storage device for storing one or more programs,

[0206] wherein, when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method as described above.

[0207] The above system and device embodiments correspond to the method embodiments and have the same technical effects as the method embodiments. For specific descriptions, refer to the method embodiments. The device embodiments are obtained based on the method embodiments. For specific descriptions, refer to the method embodiment section and will not be elaborated here. Those of ordinary skill in the art can understand that: The drawings are only schematic diagrams of one embodiment, and the modules or processes in the drawings are not necessarily essential for implementing the present application.

[0208] Those of ordinary skill in the art can understand that: The modules in the device in the embodiments can be distributed in the device in the embodiments according to the descriptions in the embodiments, or can be correspondingly changed and located in one or more devices different from the present embodiments. The modules in the above embodiments can be combined into one module, or further split into multiple sub-modules.

[0209] Finally, it should be noted that: The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: They can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; And these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for processing lidar data, characterized in that, The method includes: obtaining multiple frames of two-dimensional depth maps converted from lidar raw data, and obtaining a filter determined according to the ratio of the horizontal angular resolution to the vertical angular resolution of the lidar; performing intra-frame compression on each frame of two-dimensional depth map according to the filter and a preset plane fitting algorithm to obtain multiple frames of intra-frame compressed two-dimensional depth maps; For a group of two-dimensional depth maps, performing inter-frame compression on the group of two-dimensional depth maps according to the differences between the second to the last intra-frame compressed two-dimensional depth maps and the first intra-frame compressed two-dimensional depth map in the group of two-dimensional depth maps, including: for each intra-frame compressed two-dimensional depth map except the first intra-frame compressed two-dimensional depth map in a group of two-dimensional depth maps, respectively calculating the differences between multiple target regions in the current intra-frame compressed two-dimensional depth map and the corresponding target regions in the first intra-frame compressed two-dimensional depth map to obtain the inter-frame deviation of the current intra-frame compressed two-dimensional depth map relative to the first intra-frame compressed two-dimensional depth map, where the target region is the area size filtered by the filter once; retaining the first intra-frame compressed two-dimensional depth map, and replacing the current intra-frame compressed two-dimensional depth map with the position and the corresponding inter-frame deviation of the current intra-frame compressed two-dimensional depth map; wherein, each two-dimensional depth group includes multiple frames of intra-frame compressed two-dimensional depth maps with a preset number of frames and being consecutive; After performing inter-frame compression on all groups of two-dimensional depth maps, performing overall compression on all the inter-frame compressed two-dimensional depth maps to obtain an overall compressed two-dimensional depth map.

2. The method according to claim 1, characterized in that, Obtaining a filter determined according to the ratio of the horizontal angular resolution to the vertical angular resolution of the lidar includes: obtaining a filter with a height-width ratio being the ratio of the horizontal angular resolution to the vertical angular resolution of the lidar; Before performing intra-frame compression on each frame of two-dimensional depth map according to the filter and a preset plane fitting algorithm to obtain multiple frames of intra-frame compressed two-dimensional depth maps, the method further includes: if the compression rate and / or signal-to-noise ratio of the filter with a height-width ratio being the ratio of the horizontal angular resolution to the vertical angular resolution of the lidar do not meet the preset compression requirements, then adjusting the size of the filter according to the horizontal distance resolution of the lidar at the interested distance, the vertical distance resolution of the lidar at the interested distance, and the size of the target object at the interested distance until the compression rate and signal-to-noise ratio of the adjusted filter meet the preset compression requirements, and obtaining the finally required filter, where the interested distance is the distance corresponding to the lidar raw data, and the size includes height and width.

3. The method according to claim 2, characterized in that, Adjusting the size of the filter according to the horizontal distance resolution of the lidar at the interested distance, the vertical distance resolution of the lidar at the interested distance, and the size of the target object at the interested distance includes: Calculate the ratio of the height of the target object at the distance of interest to the lateral distance resolution of the lidar at the distance of interest, and the ratio of the width of the target object to the longitudinal distance resolution, respectively; If the ratio of the height of the target object to the lateral distance resolution is greater than the ratio of the width of the target object to the longitudinal distance resolution, increase the size ratio of the height of the filter; If the ratio of the height of the target object to the lateral distance resolution is less than the ratio of the width of the target object to the longitudinal distance resolution, increase the size ratio of the width of the filter.

4. The method according to claim 1, characterized in that, Perform intra-frame compression on each two-dimensional depth map according to the filter and the preset plane fitting algorithm to obtain multiple intra-frame compressed two-dimensional depth maps, including: Perform plane fitting on the first target area on the two-dimensional depth map to be intra-frame compressed filtered by the filter according to the preset plane fitting algorithm to obtain a first fitting plane; Calculate a first fitting error according to the difference between the coordinates of multiple data points on the first fitting plane and the coordinates of the same corresponding data point on the two-dimensional depth map to be intra-frame compressed; If the first fitting error is less than the preset error threshold, retain the first fitting record, where the first fitting record includes the fitting position of the first fitting plane and the fitting parameters of the first fitting plane, the fitting position of the first fitting plane is the position of the first target area on the two-dimensional depth map to be intra-frame compressed, and the fitting parameters of the first fitting plane include the normal vector and geometric equation of the first fitting plane; If the first fitting error is greater than or equal to the preset error threshold, do not retain the first fitting record; After sliding the filter to the second target area, perform plane fitting on the first target area and the second target area as a whole area according to the preset plane fitting algorithm to obtain a second fitting plane; Calculate a second fitting error according to the difference between the coordinates of multiple data points on the second fitting plane and the coordinates of the same corresponding data point on the two-dimensional depth map before plane fitting; If the second fitting error is less than the preset error threshold, replace the first fitting record with the second fitting record, where the second fitting record includes the fitting position of the second fitting plane and the fitting parameters of the second fitting plane, the fitting position of the second fitting plane includes the position of the first target area and the position of the second target area, and the fitting parameters of the second fitting plane include the normal vector and geometric equation of the second fitting plane; If the second fitting error is greater than or equal to the preset error threshold, re-perform plane fitting for the second target area until, after performing plane fitting processing on the last target area of the two-dimensional depth map to be intra-frame compressed, a two-dimensional depth map after intra-frame compression of the two-dimensional depth map to be intra-frame compressed is obtained, where the two-dimensional depth map after intra-frame compression includes the finally retained fitting records and the original data of the target areas without retained fitting records on the two-dimensional depth map to be intra-frame compressed; After completing intra-frame compression of the multi-frame two-dimensional depth maps, multi-frame two-dimensional depth maps after intra-frame compression are obtained.

5. The method according to claim 1, characterized in that, Obtaining multi-frame two-dimensional depth maps converted from lidar raw data includes: Receiving the lidar raw data sent by the lidar; Converting the lidar raw data into multi-frame lidar point cloud data; In accordance with the conversion order of the lidar raw data, adding each frame of lidar point cloud data to the point cloud first-in, first-out (FIFO) queue in sequence; In accordance with the principle of first-in, first-out of the point cloud FIFO queue, obtaining each frame of lidar point cloud data from the point cloud FIFO queue in sequence, and converting each frame of lidar point cloud data into a two-dimensional depth map; In accordance with the conversion order of the lidar point cloud data, adding the converted two-dimensional depth maps to the depth map FIFO queue in sequence; In accordance with the principle of first-in, first-out of the depth map FIFO queue, obtaining each frame of lidar two-dimensional depth map in the depth map FIFO queue in sequence.

6. The method according to claim 5, characterized in that, After performing inter-frame compression on all the two-dimensional depth maps in groups, performing overall compression on all the two-dimensional depth maps after inter-frame compression to obtain an overall compressed two-dimensional depth map, including: In accordance with the inter-frame compression order of the two-dimensional depth map groups, adding each two-dimensional depth group after inter-frame compression to the data transmission FIFO queue in sequence; After adding all the two-dimensional depth groups after inter-frame compression to the data transmission FIFO queue, performing overall compression on the data transmission FIFO queue to obtain an overall compressed two-dimensional depth map.

7. The method according to any one of claims 1-6, characterized in that, After performing overall compression on all the two-dimensional depth maps after inter-frame compression to obtain an overall compressed two-dimensional depth map, the method includes: When it is necessary to decompress the overall compressed two-dimensional depth map, determining the overall compressed two-dimensional depth map as the two-dimensional depth map to be decompressed; Performing overall decompression on the two-dimensional depth map to be decompressed to obtain multiple two-dimensional depth map groups to be inter-frame decompressed, where the two-dimensional depth map groups to be inter-frame decompressed are two-dimensional depth map groups obtained by performing inter-frame compression on multi-frame two-dimensional depth maps after intra-frame compression with a preset number of frames and being consecutive; According to the differences between the second intra-frame compressed two-dimensional depth map to the last intra-frame compressed two-dimensional depth map in the group of two-dimensional depth maps to be inter-frame decompressed and the first intra-frame compressed two-dimensional depth map, perform inter-frame decompression on the group of two-dimensional depth maps to be inter-frame decompressed to obtain multiple frames of two-dimensional depth maps to be intra-frame decompressed, where the two-dimensional depth maps to be intra-frame decompressed include at least one fitting position, the fitting parameters corresponding to the fitting position, and the original data at the unfitted positions of the two-dimensional depth maps to be intra-frame decompressed before intra-frame compression, and the fitting parameters include the normal vector of the fitting plane and the geometric equation of the fitting plane; For each frame of two-dimensional depth map to be intra-frame decompressed, according to the fitting position and the fitting parameters corresponding to the fitting position, perform intra-frame decompression on the fitting position of the two-dimensional depth map to be intra-frame decompressed to obtain the original data at the fitting position on the intra-frame decompressed two-dimensional depth map, so as to obtain the intra-frame decompressed two-dimensional depth map of the two-dimensional depth map to be intra-frame decompressed when obtaining all the original data on the intra-frame decompressed two-dimensional depth map of the two-dimensional depth map to be intra-frame decompressed.

8. The method according to claim 7, wherein, When the group of two-dimensional depth maps to be inter-frame decompressed includes the first intra-frame compressed two-dimensional depth map in the group of two-dimensional depth maps to be inter-frame decompressed, the positions of the other intra-frame compressed two-dimensional depth maps except the first intra-frame compressed two-dimensional depth map, and the inter-frame deviation of the positions of the other intra-frame compressed two-dimensional depth maps relative to the first intra-frame compressed two-dimensional depth map, according to the differences between the second intra-frame compressed two-dimensional depth map to the last intra-frame compressed two-dimensional depth map in the group of two-dimensional depth maps to be inter-frame decompressed and the first intra-frame compressed two-dimensional depth map, perform inter-frame decompression on the group of two-dimensional depth maps to be inter-frame decompressed to obtain multiple frames of two-dimensional depth maps to be intra-frame decompressed, including: For each intra-frame compressed two-dimensional depth map except the first intra-frame compressed two-dimensional depth map in the group of two-dimensional depth maps to be inter-frame decompressed, determine the current intra-frame compressed two-dimensional depth map according to the position of the current intra-frame compressed two-dimensional depth map, the inter-frame deviation of the current intra-frame compressed two-dimensional depth map relative to the first intra-frame compressed two-dimensional depth map, and the first intra-frame compressed two-dimensional depth map; After determining each intra-frame compressed two-dimensional depth map in the group of two-dimensional depth maps to be inter-frame decompressed, determine the intra-frame compressed two-dimensional depth map as the two-dimensional depth map to be intra-frame decompressed, so as to obtain multiple frames of two-dimensional depth maps to be intra-frame decompressed.

9. A processing system for lidar data, wherein, The system includes a lidar, a terminal device, and a server; The lidar is used to acquire lidar raw data and send the lidar raw data to the terminal device; The terminal device is used to obtain the overall compressed two-dimensional depth map by executing the method according to any one of claims 1-6, and send the overall compressed two-dimensional depth map to the server; The server is configured to receive the overall compressed two-dimensional depth map sent by the terminal device, determine the overall compressed two-dimensional depth map as the two-dimensional depth map to be decompressed, perform overall decompression on the two-dimensional depth map to be decompressed, and obtain multiple groups of two-dimensional depth maps to be decompressed frame-by-frame, where the group of two-dimensional depth maps to be decompressed frame-by-frame is a group of two-dimensional depth maps obtained by performing inter-frame compression on multiple intra-frame compressed two-dimensional depth maps with a preset number of frames and consecutive frames. According to the differences between the second to the last intra-frame compressed two-dimensional depth maps and the first intra-frame compressed two-dimensional depth map in the group of two-dimensional depth maps to be decompressed frame-by-frame, perform inter-frame decompression on the group of two-dimensional depth maps to be decompressed frame-by-frame, and obtain multiple frames of two-dimensional depth maps to be decompressed intra-frame, where the two-dimensional depth map to be decompressed intra-frame includes at least one fitting position, the fitting parameters corresponding to the fitting position, and the original data at the unfitted positions of the two-dimensional depth map to be decompressed intra-frame before intra-frame compression. The fitting parameters include the normal vector of the fitting plane and the geometric equation of the fitting plane. For each frame of the two-dimensional depth map to be decompressed intra-frame, according to the fitting position and the fitting parameters corresponding to the fitting position, perform intra-frame decompression on the fitting position of the two-dimensional depth map to be decompressed intra-frame, and obtain the original data at the fitting position on the intra-frame decompressed two-dimensional depth map, so as to obtain the intra-frame decompressed two-dimensional depth map of the two-dimensional depth map to be decompressed intra-frame when all the original data on the intra-frame decompressed two-dimensional depth map of the two-dimensional depth map to be decompressed intra-frame is obtained.

Citation Information

Patent Citations

  • Image compression method and device

    CN106937117A

  • Systems and methods for efficiently representing and encoding image

    CN112292860A