Point cloud data compression, data transmission, data decompression method and device
By calculating the difference between point cloud data collected by lidar and basic data, data compression is performed, the problem of processing delay caused by large amount of point cloud data is solved, and efficient data processing is achieved.
Patent Information
- Application Number
- CN202011636968.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-31
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2040-12-31
AI Technical Summary
The point cloud data collected by lidar cannot be processed in time when the amount of data is too large, and the existing technology has failed to propose effective solutions.
By obtaining the basic data, calculating the difference between it and the point cloud data to be compressed, compressing it based on the differential data, and obtaining the compressed data, including the basic data and the differential data.
There is no need to process a large amount of point cloud data to be compressed, which greatly reduces the time for point cloud data processing and solves the problem of processing delay caused by excessive data volume.
Smart Images

Figure CN114691626B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of laser radar, and in particular to a method and device for compressing, transmitting and decompressing point cloud data. Background Art
[0002] In related technologies, lidar is a radar system that emits laser beams to detect the position, speed, acceleration, heading and other characteristics of a target. LiDAR can then be used to effectively obtain information about the target and its surroundings.
[0003] As for the application scenarios of remote transmission and local storage of data collected by laser radar, the traditional method of remote transmission and local storage of data collected by multiple laser radars is to achieve it through real-time transmission and storage of the original data collected by the laser radar. However, when the amount of point cloud data is large, the transmission and storage of point cloud data often cannot be processed in a timely manner.
[0004] In related technologies, there is no effective technical solution for the problem that point cloud data collected by lidar cannot be processed in a timely manner when the data volume is too large. Summary of the invention
[0005] An embodiment of the present invention provides a method and device for compression, data transmission, and data decompression of point cloud data, so as to at least solve the problem in the related art that point cloud data collected by a laser radar cannot be processed in a timely manner when the data volume is too large.
[0006] According to one embodiment of the present invention, a method for compressing point cloud data is provided, comprising: acquiring basic data; calculating the difference between the basic data and the point cloud data to be compressed to obtain difference data; wherein the point cloud data to be compressed is collected by a laser radar; the types of the point cloud data to be compressed include: mutation data and slight mutation data, the data volume of the difference data between the mutation data and the basic data exceeds a first threshold, and the data volume of the difference data between the slight mutation data and the basic data is less than a second threshold; compressing the point cloud data to be compressed according to the basic data to obtain compressed data, wherein the compressed data includes: the basic data, and the difference data between the point cloud data to be compressed and the basic data.
[0007] In an embodiment of the present invention, the method further includes: determining the type of the point cloud data to be compressed according to the difference data, the type including: mutation data and slight mutation data; and updating the basic data according to the distribution of the mutation data.
[0008] In an embodiment of the present invention, the point cloud data to be compressed is the current point cloud data, and the point cloud data to be compressed is compressed according to the basic data to obtain compressed data, including the following loop steps: obtaining the current point cloud data, determining the difference data between the current point cloud data and the basic data, and writing the difference data into a preset storage space, wherein the current point cloud data is the point cloud data obtained at the current moment.
[0009] In an embodiment of the present invention, updating the basic data according to the distribution of the mutation data includes: obtaining the number of occurrences of the mutation data within a preset time period; and determining to update the basic data using the distribution of the mutation data when the number of occurrences meets a preset condition.
[0010] In an embodiment of the present invention, updating the basic data according to the distribution of the mutation data includes: obtaining the number of consecutive occurrences of the mutation data within a preset time period; and determining to update the basic data using the distribution of the mutation data when the number of consecutive occurrences meets a preset condition.
[0011] In an embodiment of the present invention, the basic data is updated according to the distribution of the mutation data, including: counting the number of occurrences and distribution of fine-tuning data and mutation data; constructing a loss function based on the number of occurrences and distribution, the loss function being used to measure the similarity between the probability distribution of regenerating basic data and the probability of actually needing to regenerate basic data; and updating the basic data based on the loss function.
[0012] In an embodiment of the present invention, constructing a loss function based on the number of occurrences and distribution includes: constructing the loss function according to the number of occurrences of mutation data and the number of consecutive occurrences of the mutation data.
[0013] According to another embodiment of the present invention, a data transmission method is provided, comprising: acquiring compressed data, wherein the compressed data is acquired by using the point cloud data compression method described in any one of the above embodiments; and transmitting the compressed data.
[0014] According to another embodiment of the present invention, a data decompression method is provided, comprising: obtaining compressed data, wherein the compressed data is obtained by using the point cloud data compression method described in any one of the above embodiments; and decompressing the compressed data according to basic data and the difference data indicated in the compressed data.
[0015] According to another embodiment of the present invention, a point cloud data compression device is provided, comprising: a first acquisition module, used to acquire basic data; a calculation module, used to calculate the difference between the basic data and the point cloud data to be compressed, and obtain difference data; wherein the point cloud data to be compressed is collected by a laser radar; the types of the point cloud data to be compressed include: mutation data and slight mutation data, the data volume of the difference data between the mutation data and the basic data exceeds a first threshold, and the data volume of the difference data between the slight mutation data and the basic data is less than a second threshold; a first compression module, used to compress the point cloud data to be compressed according to the basic data, and obtain compressed data, wherein the compressed data includes: the basic data, and the difference data between the point cloud data to be compressed and the basic data.
[0016] According to another embodiment of the present invention, there is provided a data transmission device, comprising: a second compression module, used to obtain compressed data using the point cloud data compression method described in any one of the above embodiments; and a transmission module, used to transmit the compressed data.
[0017] According to another embodiment of the present invention, a data decompression device is provided, comprising: a third compression module, used to obtain compressed data using the point cloud data compression method described in any one of the above embodiments; and a decompression module, used to decompress the compressed data according to basic data and the difference data indicated in the compressed data.
[0018] According to another embodiment of the present invention, a storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute any of the above point cloud data compression methods, or any of the above data transmission methods, or any of the above data decompression methods when running.
[0019] According to another embodiment of the present invention, there is also provided a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run any of the above point cloud data compression methods, or any of the above data transmission methods, or any of the above data decompression methods.
[0020] Through the present invention, the difference between the basic data and the point cloud data to be compressed is calculated to obtain difference data, and then the point cloud data to be compressed is compressed according to the basic data to obtain compressed data, wherein the compressed data includes: basic data, and difference data between the point cloud data to be compressed and the basic data. The above technical solution solves the problem in the related art that the point cloud data collected by the laser radar cannot be processed in time when the data volume is too large, and there is no need to process a large amount of point cloud data to be compressed, which greatly reduces the time of point cloud data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0022] Figure 1 is a schematic flow chart of a method for compressing point cloud data according to an embodiment of the present invention;
[0023] Figure 2 is a flow chart of a data transmission method according to an embodiment of the present invention;
[0024] Figure 3 is a flow chart of a data decompression method according to an embodiment of the present invention;
[0025] Figure 4 is a flow chart of an optional method for compressing data collected by a high-precision distance measuring device according to an embodiment of the present invention;
[0026] Figure 5 is a structural block diagram of a point cloud data compression device according to an embodiment of the present invention (I);
[0027] Figure 6 is a structural block diagram of a point cloud data compression device according to an embodiment of the present invention (II);
[0028] Figure 7 is a structural block diagram of a data transmission device according to an embodiment of the present invention;
[0029] Figure 8 is a structural block diagram of a data decompression device according to an embodiment of the present invention;
[0030] Fig. 9 is a schematic structural diagram of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] In one of the embodiments, a point cloud data compression method and a data decompression method are provided when the amount of point cloud data is relatively large. The point cloud data compression method includes: obtaining basic data; calculating the difference between the basic data and the point cloud data to be compressed to obtain difference data; wherein the point cloud data to be compressed is collected by a laser radar; the types of point cloud data to be compressed include: mutation data and micro-variation data, the amount of difference data between the mutation data and the basic data exceeds a first threshold, and the amount of difference data between the micro-variation data and the basic data is less than a second threshold; compressing the point cloud data to be compressed according to the basic data to obtain compressed data, wherein the compressed data includes: basic data, and difference data between the point cloud data to be compressed and the basic data. Optionally, the above-mentioned basic data can be understood as a basic data.
[0034] The following takes the basic data as the basic data and the processing process of compressed point cloud data as an example to explain the scheme in detail.
[0035] The embodiment of the present invention also provides a method for compressing point cloud data. Figure 1 is a flow chart of a method for compressing point cloud data according to an embodiment of the present invention. Figure 1 As shown, including:
[0036] Step S102, obtaining basic data;
[0037] Step S104, calculating the difference between the basic data and the point cloud data to be compressed to obtain difference data; wherein the point cloud data to be compressed is collected by a laser radar; the types of the point cloud data to be compressed include: sudden change data and slightly change data, the data volume of the difference data between the sudden change data and the basic data exceeds a first threshold, and the data volume of the difference data between the slightly change data and the basic data is less than a second threshold;
[0038] Step S106: compressing the point cloud data to be compressed according to the basic data to obtain compressed data, wherein the compressed data includes: the basic data, and difference data between the point cloud data to be compressed and the basic data.
[0039] Through the present invention, the difference between the basic data and the point cloud data to be compressed is calculated to obtain difference data, and then the point cloud data to be compressed is compressed according to the basic data to obtain compressed data, wherein the compressed data includes: basic data, and difference data between the point cloud data to be compressed and the basic data. The above technical solution solves the problem in the related art that the point cloud data collected by the laser radar cannot be processed in time when the data volume is too large, and there is no need to process a large amount of point cloud data to be compressed, which greatly reduces the time of point cloud data processing.
[0040] In an optional embodiment, the at least one point cloud data to be compressed is compressed according to the basic data to obtain compressed data, including the following loop steps: obtaining current point cloud data, determining difference data between the current point cloud data and the basic data, and writing the difference data into a preset storage space, wherein the current point cloud data is the point cloud data to be compressed obtained at the current moment.
[0041] It can be understood that in the process of acquiring basic data and point cloud data to be compressed through the laser radar, when the laser radar also acquires the third point cloud data and the fourth point cloud data... and other point cloud data, the steps that need to be executed in a loop are: acquiring the third point cloud data, determining the difference data between the third point cloud data and the basic data, and then writing the difference data between the third point cloud data and the basic data into the preset storage space; further, acquiring the fourth point cloud data, determining the difference data between the fourth point cloud data and the basic data, and then writing the difference data between the fourth point cloud data and the basic data into the preset storage space. Optionally, the basic data, the point cloud data to be compressed, the third point cloud data, and the fourth point cloud data are acquired in chronological order.
[0042] From the above content, it can be seen that within the preset time period, the basic data can always be used as the basic data, and then the difference data between the subsequent point cloud data and the basic data can be determined, and the difference data can be stored in the preset storage space for subsequent use in compressing the compressed point cloud data, the third point cloud data, and the fourth point cloud data.
[0043] In summary, by adopting the above technical scheme, after determining the basic data, the acquired point cloud data can be compressed, thereby solving the following technical problems in the related technology: when transmitting and saving the point cloud data collected by the lidar, due to the large amount of point cloud data, the transmission and storage period is long, so that the transmission bandwidth and hardware storage space requirements are high. Especially when multiple lidar devices are used at the same time, the collected point cloud data is too much, resulting in the inability to process and transmit the original data in time.
[0044] After a preset period of time, the basic data is no longer suitable for use as basic data. In this case, the basic data needs to be updated. The implementation method that can be adopted is to update the basic data using the distribution of the mutation data.
[0045] There are many ways to update the basic data using the distribution of mutation data. In an optional embodiment, the method includes: counting the number of occurrences and distribution of fine-tuning data and mutation data; constructing a loss function based on the number of occurrences and distribution, the loss function is used to measure the similarity between the probability distribution of regenerating basic data and the probability of actually needing to regenerate basic data; updating the basic data based on the loss function, the loss function is constructed according to the number of occurrences of mutation data and the number of consecutive occurrences of mutation data. In this embodiment, the number of occurrences of point cloud data of mutation data within a preset time period is obtained (determining that the number of occurrences of mutation data is greater than the third threshold), or the number of consecutive occurrences of point cloud data of mutation data (determining that the number of consecutive occurrences of mutation data is greater than the fourth threshold); when the number of occurrences or the number of consecutive occurrences meets the preset conditions, it is determined to update the basic data using the distribution of mutation data. The data type includes mutation data and micro-variation data, and the data type can be determined based on the difference data between the laser radar acquisition data and the basic data. Optionally, the value of the target loss function determined based on the number of occurrences and the number of consecutive occurrences can be less than a fifth threshold. It should be noted that the determination of the target loss function is based on the number of occurrences and the number of consecutive occurrences. When the target loss function is less than the fifth threshold, it can also be determined that the preset conditions are met.
[0046] Optionally, the data collected by the laser radar is classified according to the size of the difference between the data currently collected by the laser radar and the basic data: when it is confirmed that the size of the difference between the data currently collected by the laser radar and the basic data is less than the second threshold, the currently collected data is marked as fine-tuning data. When it is confirmed that the size of the difference between the data currently collected by the laser radar and the basic data is greater than the first threshold, the currently collected data is marked as mutation data. It should be noted that the amount of data that needs to be transmitted or saved for mutation data is relatively large, and the compression effect is relatively poor; the amount of data that needs to be transmitted or saved for fine-tuning data is relatively small, and has a better compression effect.
[0047] The above-mentioned method for determining the mutation data can be implemented in the following manner: determining the point cloud data of the mutation data in the following manner: determining the mutation data of the point cloud data according to the data amount of the difference data, wherein, when the data amount exceeds a first threshold, indicating that the data type of the point cloud data is the point cloud data of mutation data, that is, the mutation data in the embodiment of the present invention focuses on limiting the data with a data amount greater than the first threshold, and optionally, the data of the mutation data can be defined as mutation data.
[0048] To update the basic data in the above manner, it is necessary to count the number of occurrences of mutation data within a preset time period, or the number of consecutive occurrences of mutation data. For example, among 100 data acquired within the preset time period, the number of discontinuous occurrences of mutation data exceeds 10 times, or among 100 data, 5 consecutive data are mutation data, or the number of consecutive occurrences of mutation data within the preset time period is greater than the fourth threshold. In this case, it can be determined that the basic data is updated using the distribution of the mutation data.
[0049] It should be noted that the numbers of “non-continuous occurrences exceeding 10 times” and “5 consecutive data” listed above can be flexibly adjusted according to actual conditions, and the embodiments of the present invention do not limit this.
[0050] In one of the embodiments, the distribution of different data types may be statistically analyzed to update the basic data.
[0051] In actual operation, mutation data usually appear after a certain period of time. Generally speaking, the probability of mutation data appearing will increase with the passage of time. Therefore, the basic data needs to be updated after a preset time period.
[0052] In one of the embodiments, the above-mentioned method for updating basic data is also implemented in the following form: within a period of time, the number and distribution of occurrences of fine-tuning data and mutation data are counted, the basic data collected at time t1 is updated, new basic data is generated, and the data collection time is recorded as t2. Generally, the probability of occurrence of mutation data increases randomly with the passage of time.
[0053] In one embodiment of the present invention, the loss function for regenerating the basic data is as follows:
[0054]
[0055] Among them, the meaning of the above formula can be the accumulation of the difference between the information entropy of the actual need to update the basic data and the product of the information entropy of the theoretically fitted basic data and the probability of the actual need to update the basic data. Assuming that the probability distribution of the actual need to update the basic data obtained by theoretical fitting is the same as the actual one, it is equal to the information entropy of the actual need to update the basic data; assuming that the fitting is not good, then it will be greater than the information entropy of the actual need to update the basic data. Among them, relative entropy can be used as a loss function, and the loss function can measure the similarity between P(x) and Q(x).
[0056] In the above formula, P(x) represents the probability distribution of the need to regenerate basic data. Optionally, P(x) can be obtained by counting the number of occurrences of mutation data within a certain period of time. In addition, Q(x) in the above formula represents the probability of the actual need to regenerate basic data.
[0057] In an optional embodiment, P(x) is obtained by analyzing or calculating the updated basic data after the basic data has been used for a certain period of time. For example, within 1 hour, the number of times the basic data is updated is statistically analyzed, which occurs 3 times in total, with a time interval of 20 minutes each. Then, in the next 20 minutes, when the first minute arrives, P(x) is relatively small, and when the 19th minute arrives, P(x) is relatively large.
[0058] It should be noted that the calculation method of the above P(x) may use a generative model method, or may use machine learning, deep learning and other methods, which is not limited in the embodiments of the present invention.
[0059] In addition, Q(x) is obtained by measuring in different scenes, and Q(x) is different in different scenes. For example, if the number of targets in the scene is used as the basis for judgment, the number of targets is small, and Q(x) is relatively small. Conversely, the number of targets is large, and Q(x) is relatively large.
[0060] Based on the above method of determining P(x) and Q(x), in the formula for determining the loss function, the greater the correlation between P(x) and Q(x), the greater the probability of updating the basic data.
[0061] In the above formula, D KL (P||Q) can represent the loss function of generating basic data in the current situation. Further, in D KL When the loss function represented by (P||Q) is lower than the threshold value calculated by statistical but not limited to statistical methods (equivalent to the fifth threshold value in the above embodiment), the corresponding probability Q(x) that actually needs to be regenerated in the current situation can be calculated. In addition, when Q(x) is greater than the expected value, the basic data can also be updated.
[0062] Based on the above point cloud data compression method, an embodiment of the present invention further provides a data transmission method. Figure 2 is a flow chart of a data transmission method according to an embodiment of the present invention. Figure 2 As shown, including:
[0063] Step S202, obtaining compressed data, wherein the compressed data is obtained by using the point cloud data compression method described in the above embodiment;
[0064] Step S204: transmitting the compressed data.
[0065] Through the above method, the point cloud data compression method described in the above embodiment is first used to obtain compressed data, and the compressed data is transmitted. The above technical solution is adopted to solve the problem in the related technology that the point cloud data collected by the laser radar cannot be processed in time when the data volume is too large. Furthermore, there is no need to process a large amount of point cloud data to be compressed, and compressed data can be obtained and transmitted, which greatly reduces the bandwidth requirements for point cloud data transmission.
[0066] Based on the above point cloud data compression method, an embodiment of the present invention further provides a data decompression method. Figure 3 is a flow chart of a data decompression method according to an embodiment of the present invention. Figure 3 As shown, including:
[0067] Step S802, obtaining compressed data, wherein the compressed data is obtained by using the point cloud data compression method described in the above embodiment;
[0068] Step S804: decompress the compressed data according to the basic data and the difference data indicated in the compressed data.
[0069] It should be noted that, in the process of decompressing the compressed data, only the above-mentioned difference data is transmitted. After the basic data is determined, the compressed data can be decompressed based on the difference data and the basic data. There is no need to transmit the point cloud data to be compressed (original point cloud data) as in the prior art, which greatly reduces the amount of data transmission.
[0070] In order to better understand the specific process of the above-mentioned point cloud data compression method, the process of the above-mentioned point cloud data compression method is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of the present invention.
[0071] An optional embodiment of the present invention provides a method for compressing data collected by a high-precision ranging device, which is applied to the technical field of laser radar systems, such as Figure 4 As shown, the method includes:
[0072] Step S300, collecting data through a laser radar, and generating basic data based on the collected data;
[0073] It should be noted that after the laser radar is installed, it can obtain the distance data set of different positions relative to the laser radar within the measurement range through the laser ranging method. Combined with the laser measurement position distribution matrix determined by the hardware design, the distance data set measured by the laser radar can be mapped to a position data set in a three-dimensional space coordinate system, so as to correspond to the real scene in the geodetic coordinate system.
[0074] In the actual installation process, due to installation errors, the laser radar will rotate at a pitch angle α around the X' axis and a roll angle β around the Y' axis. During the installation of the laser radar, the mapping relationship between the three-dimensional space coordinate system formed by the laser radar data collection and the real scene in the geodetic coordinate system can be established by measuring and calibrating the pitch angle α, roll angle β, heading angle γ and the laser radar installation height h.
[0075] In an embodiment of the present invention, basic data is generated from a distance data set of different positions relative to the laser radar measured by the laser radar, and the collection time of the basic data is recorded as t1.
[0076] Step S302: The laser radar collects data again, and compares the re-collected data with the basic data; and calculates the difference data.
[0077] Specifically, in the above step S300, after time t1, the data collected by the laser radar is compared with the basic data recorded at time t1, and the difference data between the subsequent laser radar collected data and the laser radar collected data at time t1 is calculated.
[0078] It should be noted that because the data collected by the laser radar has a strong correlation with the data collected by the laser radar of the adjacent frames in time sequence, it is not necessary to transmit or save all the original data collected by the laser radar each time after time t1. Only all the original data collected by the laser radar at time t1 can be transmitted or saved as basic data, and the laser radar data collected by subsequent times that need to be transmitted or saved can only transmit or save the part of the data that is different from the basic data collected at time t1. Therefore, by using the basic data collected at time t1 and the part of the data collected by the subsequent laser radar that is different from the basic data collected at time t1, the laser radar data collected by the subsequent times can be restored.
[0079] Step S304, classifying the laser radar collected data into sudden change data and slight change data according to the difference between the laser radar collected data and the basic data;
[0080] Step S306, counting the distribution of mutation data and updating the basic data.
[0081] Specifically, according to the amount of difference between the data currently collected by the lidar and the basic data, the data currently collected by the lidar is divided into two categories: fine-tuning data and mutation data.
[0082] After these two types of data are transmitted or saved, when they are used, the received compressed data needs to be decompressed according to the basic data and the difference data to generate the original data.
[0083] The technical solution of the optional embodiment of the present invention provides a method for compressing point cloud data collected by a high-precision ranging device - a laser radar through the above process, thereby solving the defects in the transmission and storage of data collected by the existing high-precision ranging device - a laser radar.
[0084] In an optional embodiment of the present invention, another method for compressing point cloud data based on data collected by a high-precision ranging device laser radar is provided, comprising:
[0085] Step 1: The laser radar collects data in real time and generates basic data;
[0086] Step 2: According to the correlation between the data currently collected by the LiDAR and the data collected by the LiDAR at adjacent moments, determine the category to which the data may belong based on the correlation.
[0087] Step 3: After a certain period of data updating, make corresponding adjustments to the basic data.
[0088] It should be noted that step 3 is an optional implementation method and is not necessarily a mandatory step.
[0089] To sum up, through the various technical solutions of the optional embodiments of the present invention, the following technical effects can be achieved: the entire data compression process is carried out automatically, without the participation of special personnel, without the need for additional equipment, and thus saving costs; by utilizing the correlation between the lidar data collected at adjacent moments, the information redundancy of the lidar data collected is greatly reduced, shortening the transmission and storage cycle, and reducing the requirements for transmission bandwidth and hardware storage space; further, when multiple lidar devices are used at the same time, data can also be processed quickly, thereby greatly reducing the manpower, material resources and time costs for processing the real-time lidar data.
[0090] In order to better understand the above data decompression process, the above data decompression process is explained below in conjunction with an optional embodiment.
[0091] The data receiver obtains the compressed data obtained by the point cloud data compression method in the above embodiment, and the compressed data includes: the basic data, and the difference data between the point cloud data to be compressed and the basic data. The data receiver can decompress the compressed data only according to the above difference data, and then after obtaining the difference data in the compressed data, the point cloud data to be compressed in the above embodiment can be obtained by combining the difference data and the basic data. Through the above technical solution, since the data receiver can decompress the compressed data only according to the difference data, there is no need to transmit the point cloud data to be compressed (original point cloud data) as in the prior art, which greatly reduces the amount of data transmission.
[0092] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0093] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0094] In this embodiment, a point cloud data compression device is also provided, which is used to implement the above embodiments and preferred implementations, and will not be repeated here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0095] Figure 5 is a structural block diagram of a point cloud data compression device according to an embodiment of the present invention. Figure 5 As shown, the device comprises:
[0096] A first acquisition module 42, used to acquire basic data;
[0097] The calculation module 44 is used to calculate the difference between the basic data and the point cloud data to be compressed to obtain difference data; wherein the point cloud data to be compressed is collected by a laser radar; the types of the point cloud data to be compressed include: sudden change data and slight change data, the data volume of the difference data between the sudden change data and the basic data exceeds a first threshold, and the data volume of the difference data between the slight change data and the basic data is less than a second threshold;
[0098] The first compression module 46 is used to compress the point cloud data to be compressed according to the basic data to obtain compressed data, wherein the compressed data includes: the basic data and difference data between the point cloud data to be compressed and the basic data.
[0099] Through the present invention, the difference between the basic data and the point cloud data to be compressed is calculated to obtain difference data, and then the point cloud data to be compressed is compressed according to the basic data to obtain compressed data, wherein the compressed data includes: basic data, and difference data between the point cloud data to be compressed and the basic data. The problem in the related art that the point cloud data collected by the laser radar cannot be processed in time when the data volume is too large is solved, and there is no need to process a large amount of point cloud data to be compressed, which greatly reduces the time of point cloud data processing.
[0100] In an embodiment of the present invention, the first compression module 46 is also used to obtain current point cloud data, determine the difference data between the current point cloud data and the basic data, and write the difference data into a preset storage space, wherein the current point cloud data is the point cloud data to be compressed obtained at the current moment.
[0101] It can be understood that in the process of acquiring basic data and point cloud data to be compressed through the laser radar, when the laser radar also acquires the third point cloud data and the fourth point cloud data... and other point cloud data, the steps that need to be executed in a loop are: acquiring the third point cloud data, determining the difference data between the third point cloud data and the basic data, and then writing the difference data between the third point cloud data and the basic data into the preset storage space; further, acquiring the fourth point cloud data, determining the difference data between the fourth point cloud data and the basic data, and then writing the difference data between the fourth point cloud data and the basic data into the preset storage space. Optionally, the basic data, the point cloud data to be compressed, the third point cloud data, and the fourth point cloud data are acquired in chronological order.
[0102] From the above content, it can be seen that within the preset time period, the basic data can always be used as the basic data, and then the difference data between the subsequent point cloud data and the basic data can be determined, and the difference data can be stored in the preset storage space for subsequent use in compressing the compressed point cloud data, the third point cloud data, and the fourth point cloud data.
[0103] Figure 6 is a structural block diagram of another point cloud data compression device according to an embodiment of the present invention. Figure 6 As shown, the device includes Figure 5 In addition to all the modules shown, it also includes: an updating module 48 and a determining module 50.
[0104] In an embodiment of the present invention, after a preset time period, the basic data is no longer suitable for use as basic data, and the basic data needs to be updated. The above device also includes: an update module 48, which is used to update the basic data using the distribution of the mutation data.
[0105] In an embodiment of the present invention, the above-mentioned update module 48 is also used to obtain the number of occurrences of the point cloud data of the mutation data within a preset time period, or the number of consecutive occurrences of the point cloud data of the mutation data; when the number of occurrences or the number of consecutive occurrences meets a preset condition, determine to update the basic data using the distribution of the mutation data.
[0106] The above-mentioned preset conditions may be at least one of the following: determining that the number of occurrences of the point cloud data of the mutation data is greater than a third threshold; determining that the number of consecutive occurrences of the point cloud data of the mutation data is greater than a fourth threshold; the value of the target loss function determined based on the number of occurrences and the number of consecutive occurrences is less than a fifth threshold. It should be noted that the determination of the target loss function is based on the number of occurrences and the number of consecutive occurrences. When the target loss function is less than the fifth threshold, it can also be determined that the preset conditions are met.
[0107] That is, it is necessary to count the number of occurrences of mutation data within a preset time period, or the number of consecutive occurrences of mutation data. For example, among 100 data obtained within the preset time period, the number of discontinuous occurrences of mutation data exceeds 10 times, or among 100 data, 5 consecutive data are mutation data, or the number of consecutive occurrences of mutation data within the preset time period is greater than the fourth threshold. In this case, it can be determined to update the basic data using the distribution of the mutation data.
[0108] It should be noted that the numbers of “non-continuous occurrences exceeding 10 times” and “5 consecutive data” listed above can be flexibly adjusted according to actual conditions, and the embodiments of the present invention do not limit this.
[0109] In an embodiment of the present invention, the above-mentioned device also includes: a processing module 50, which is used to determine the point cloud data of the mutation data in the following manner: determine the mutation data of the point cloud data according to the data amount of the difference data, wherein, when the data amount exceeds a first threshold, indicate that the data type of the point cloud data is point cloud data of mutation data, that is, the mutation data in the embodiment of the present invention focuses on limiting the data whose data amount is greater than the first threshold, and optionally, the data of the mutation data can be defined as mutation data.
[0110] In summary, by adopting the above technical scheme, after determining the basic data, the acquired point cloud data can be compressed, thereby solving the following technical problems in the related technology: when transmitting and saving the point cloud data collected by the lidar, due to the large amount of point cloud data, the transmission and storage period is long, so that the transmission bandwidth and hardware storage space requirements are high. Especially when multiple lidar devices are used at the same time, the collected point cloud data is too much, resulting in the inability to process and transmit the original data in time.
[0111] The embodiment of the present invention further provides a data transmission device, Figure 7 is a structural block diagram of a data transmission device according to an embodiment of the present invention. Figure 7 As shown, the device comprises:
[0112] A second compression module 92, used to obtain compressed data using the point cloud data compression method described in the above embodiment;
[0113] The transmission module 94 is used to transmit the compressed data.
[0114] Through the above-mentioned device, the point cloud data compression method described in the above-mentioned embodiment is first used to obtain compressed data, and the compressed data is transmitted. The above-mentioned technical solution is adopted to solve the problem in the related technology that the point cloud data collected by the laser radar cannot be processed in time when the data volume is too large. There is no need to process a large amount of point cloud data to be compressed, and compressed data can be obtained and transmitted, which greatly reduces the time for point cloud data processing.
[0115] The embodiment of the present invention also provides a data decompression device. Figure 8 is a structural block diagram of a data decompression device according to an embodiment of the present invention. Figure 8 As shown, the device comprises:
[0116] A third compression module 62, used to obtain compressed data using the point cloud data compression method described in the above embodiment;
[0117] The decompression module 64 is used to decompress the compressed data according to the basic data and the difference data indicated in the compressed data.
[0118] Through the above-mentioned device, the point cloud data compression method described in the above-mentioned embodiment is first used to obtain compressed data, and the point cloud data to be compressed is determined according to the compressed data, thereby avoiding the problem of excessive data volume. The above-mentioned technical solution is adopted to solve the problem in the related technology that the point cloud data collected by the laser radar cannot be processed in time when the data volume is too large. There is no need to process a large amount of point cloud data to be compressed, which greatly reduces the time for processing point cloud data.
[0119] In the embodiment of the present invention, the decompression module 64 is used to decompress the compressed data according to the difference data indicated in the basic data and the compressed data.
[0120] It should be noted that in the process of decompressing compressed data, only the above-mentioned difference data is transmitted. After the basic data (i.e., basic data) is determined, the point cloud data to be compressed can be determined based on the difference data and the basic data. There is no need to transmit the point cloud data to be compressed as in the prior art, and only the difference data needs to be transmitted.
[0121] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of the method in the above embodiment when running.
[0122] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0123] S1, obtain basic data;
[0124] S2, calculating the difference between the basic data and the point cloud data to be compressed to obtain difference data; wherein the point cloud data to be compressed is collected by a laser radar; the types of the point cloud data to be compressed include: mutation data and micro-variation data, the data volume of the difference data between the mutation data and the basic data exceeds a first threshold, and the data volume of the difference data between the micro-variation data and the basic data is less than a second threshold;
[0125] S3, compressing the point cloud data to be compressed according to the basic data to obtain compressed data, wherein the compressed data includes: the basic data, and difference data between the point cloud data to be compressed and the basic data.
[0126] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0127] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a ROM (Read-Only Memory), a RAM (Random Access Memory), a disk or an optical disk, etc.
[0128] According to another aspect of the embodiment of the present invention, there is also provided an electronic device for implementing the above data compression and decompression method, such as Fig. 9 As shown, the electronic device includes a memory 1002 and a processor 1004. The memory 1002 stores a computer program, and the processor 1004 is configured to execute the steps of the method in the above embodiment through the computer program.
[0129] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0130] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0131] S1, obtain basic data;
[0132] S2, calculating the difference between the basic data and the point cloud data to be compressed to obtain difference data; wherein the point cloud data to be compressed is collected by a laser radar; the types of the point cloud data to be compressed include: mutation data and micro-variation data, the data volume of the difference data between the mutation data and the basic data exceeds a first threshold, and the data volume of the difference data between the micro-variation data and the basic data is less than a second threshold;
[0133] S3, compressing the point cloud data to be compressed according to the basic data to obtain compressed data, wherein the compressed data includes: the basic data, and difference data between the point cloud data to be compressed and the basic data.
[0134] Alternatively, a person skilled in the art may understand that: Fig. 9 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, or other terminal devices. Fig. 9 The structure of the electronic device is not limited. Fig. 9 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig. 9 Different configurations shown.
[0135] Among them, the memory 1002 can be used to store software programs and modules, such as the program instructions / modules corresponding to the point cloud data compression method and device in the embodiment of the present invention. The processor 1004 executes various functional applications and data compression and decompression by running the software programs and modules stored in the memory 1002, that is, to implement the above-mentioned point cloud data compression method. The memory 1002 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1002 may further include a memory remotely located relative to the processor 1004, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. As an example, if Fig. 9 As shown, the memory 1002 may include but is not limited to the first acquisition module 42 and the first compression module 46 in the point cloud data compression device. In addition, it may also include but is not limited to other module units in the point cloud data compression device, which will not be repeated in this example.
[0136] Optionally, the transmission device 1006 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 1006 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1006 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0137] In addition, the electronic device further includes: a display 1008 for displaying the acquired basic data; and a connection bus 1010 for connecting various module components in the electronic device.
[0138] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0139] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing system, they can be concentrated on a single computing system, or distributed on a network composed of multiple computing systems, and optionally, they can be implemented by a program code executable by a computing system, so that they can be stored in a storage system and executed by the computing system, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0140] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for compressing point cloud data, characterized in that: include: Obtain basic data; wherein, the distance data set of different positions relative to the laser radar measured by the laser radar is used to generate basic data, Calculating the difference between the basic data and the point cloud data to be compressed to obtain difference data; wherein the point cloud data to be compressed is collected by a laser radar; the types of the point cloud data to be compressed include: sudden change data and slightly change data, the amount of difference data between the sudden change data and the basic data exceeds a first threshold, and the amount of difference data between the slightly change data and the basic data is less than a second threshold; The point cloud data to be compressed is compressed according to the basic data to obtain compressed data, wherein the compressed data includes: the basic data, and difference data between the point cloud data to be compressed and the basic data, wherein: The method further comprises: Determining the type of the point cloud data to be compressed according to the difference data; Update the basic data according to the distribution of the mutation data, Wherein, updating the basic data according to the distribution of the mutation data includes: Get the number of occurrences of mutation data within a preset time period; When the number of occurrences meets a preset condition, it is determined to update the basic data using the distribution of the mutation data.
2. The method according to claim 1, characterized in that The point cloud data to be compressed is current point cloud data, and the point cloud data to be compressed is compressed according to the basic data to obtain compressed data, including the following loop steps: Acquire current point cloud data, determine difference data between the current point cloud data and the basic data, and write the difference data into a preset storage space, wherein the current point cloud data is the point cloud data acquired at the current moment.
3. The method according to claim 1, characterized in that Updating the basic data according to the distribution of the mutation data includes: Get the number of consecutive occurrences of mutation data within a preset time period; When the number of consecutive occurrences meets a preset condition, it is determined to update the basic data using the distribution of the mutation data.
4. The method according to claim 1, characterized in that: Updating the basic data according to the distribution of the mutation data includes: Count the occurrence and distribution of micro-variation data and mutation data; Constructing a loss function based on the occurrence times and distribution, wherein the loss function is used to measure the similarity between the probability distribution of regenerating basic data and the probability of actually needing to regenerate basic data; The basic data is updated based on the loss function.
5. The method according to claim 4, characterized in that A loss function is constructed based on the occurrence count and distribution, including: The loss function is constructed according to the number of occurrences of the mutation data and the number of consecutive occurrences of the mutation data.
6. A data transmission method, characterized in that: include: Acquire compressed data, using the point cloud data compression method according to any one of claims 1 to 5 to acquire the compressed data; The compressed data is transmitted.
7. A data decompression method, characterized in that: The method comprises: Acquire compressed data; the compressed data is obtained by using the point cloud data compression method according to any one of claims 1 to 5; The compressed data is decompressed according to the base data and the difference data indicated in the compressed data.
8. A point cloud data compression device, characterized in that: include: The first acquisition module is used to acquire basic data; wherein the distance data sets of different positions relative to the laser radar measured by the laser radar are used to generate basic data, a calculation module, configured to calculate the difference between the basic data and the point cloud data to be compressed, and obtain difference data; wherein the point cloud data to be compressed is collected by a laser radar; the types of the point cloud data to be compressed include: sudden change data and slightly change data, the amount of difference data between the sudden change data and the basic data exceeds a first threshold, and the amount of difference data between the slightly change data and the basic data is less than a second threshold; The first compression module is used to compress the point cloud data to be compressed according to the basic data to obtain compressed data, wherein the compressed data includes: the basic data, and difference data between the point cloud data to be compressed and the basic data, wherein: The device further comprises an updating module, which is used to update the basic data according to the distribution of the mutation data. The update module is also used to obtain the number of occurrences of mutation data within a preset time period; When the number of occurrences meets a preset condition, it is determined to update the basic data using the distribution of the mutation data.
9. A data transmission device, characterized in that: include: A second compression module, used to obtain compressed data using the method described in any one of claims 1 to 5; A transmission module is used to transmit the compressed data.
10. A data decompression device, characterized in that: include: A third compression module, used to obtain compressed data using the method described in any one of claims 1 to 5; A decompression module is used to decompress the compressed data according to the basic data and the difference data indicated in the compressed data.
11. A computer device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the point cloud data compression method described in any one of claims 1 to 5, or execute the data transmission method described in claim 6, or execute the data decompression method described in claim 7.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute, when running, the point cloud data compression method described in any one of claims 1 to 5, or the data transmission method described in claim 6, or the data decompression method described in claim 7.
Citation Information
Patent Citations
Method and system for processing data collected from multiple nodes in ubiquitous environment
KR1020100059501A