Lossless compression encoding method for event camera data

CN116260967BActive Publication Date: 2026-09-08SHENZHEN UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211608003.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-14
Publication Date
2026-09-08
Estimated Expiration
2042-12-14

AI Technical Summary

Technical Problem

[0006]本发明要解决的技术问题在于,针对现有技术的上述缺陷,提供一种事件相机数据的无损压缩编码方法、装置、智能终端及存储介质,旨在解决现有技术的事件相机数据的压缩编码过程复杂并且会产生数据损失的技术问题,本发明基于信息无损转化的前提下,以较简单的转换步骤,实现一个压缩率较低的数据压缩方法,并克服了现有事件相机数据文件占用内存过大、不易存储和下载的缺点

Benefits of technology

[0036] The beneficial effects of this invention are as follows: This invention provides a lossless compression encoding method for event camera data. It reassembles the event camera data information only once using a specific data structure, compressing the event camera data file without causing any data loss. The original event data file can be converted into the compressed file described herein, and the compressed file can also be losslessly restored back to the original file. The compression method of this invention effectively compresses event camera data files, with no loss in process and simple steps. Furthermore, the method of this invention overcomes the shortcomings of existing event camera data files, such as excessive memory usage, difficulty in storage and downloading; the compressed data file of this invention reduces memory usage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116260967B_ABST
    Figure CN116260967B_ABST
Patent Text Reader

Abstract

The application discloses a lossless compression encoding method of event camera data, comprising the following steps: acquiring an event image region, and dividing the event image region into multiple regions with a specified pixel size; calculating the block to which each event point belongs and the position of each event point in the block according to the original coordinates of each event point, generating a new position coordinate of each event point, and converting the position coordinate from 2*4 bytes to 3*1 bytes; representing each event point as according to the new position coordinate of each event point, storing the new event point set in a multi-level key-value pair data structure; saving the data stored in the multi-level key-value pair data structure as a binary data packet, and finally compressing the binary data packet into a binary file. The application can effectively compress the event camera data file, and the process is lossless and simple. Moreover, the compressed data file reduces the memory occupation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of event camera and data compression technology, and in particular to a lossless compression encoding method, apparatus, smart terminal and storage medium for event camera data. Background Technology

[0002] As people's demands for camera resolution and high dynamic range have increased, traditional cameras have gradually become unable to meet these needs. Traditional cameras suffer from two problems: motion blur, which occurs when the speed of movement in a scene exceeds the camera's sampling rate; and dynamic range issues caused by lighting conditions, resulting in underexposure or overexposure. Event cameras have solved these problems.

[0003] An event camera is a biomimetic sensor that differs from traditional freeze-frame cameras: instead of capturing image rates from a fixed position, it asynchronously measures the brightness change per pixel and outputs an event stream—including encoded time t, position (x, y), and brightness change symbol p ∈ {1, -1}. Compared to conventional cameras, event cameras offer attractive features: high temporal resolution (on the order of μs), very high dynamic range (140 dB vs. 60 dB), low power consumption, and high pixel bandwidth (on the order of kHz) that reduces motion blur. Therefore, event cameras hold great potential in challenging scenarios.

[0004] Most existing event data compression methods use encoding, which can compress data, but require relatively complex steps and result in some data loss during data restoration.

[0005] Therefore, existing technologies still need improvement and development. Summary of the Invention

[0006] The technical problem this invention aims to solve is to address the aforementioned deficiencies of existing technologies by providing a lossless compression encoding method, apparatus, smart terminal, and storage medium for event camera data. This addresses the complexity and data loss inherent in existing event camera data compression encoding processes. Based on the premise of lossless information conversion, this invention achieves a high compression ratio through simpler conversion steps. It employs a lower data compression method and overcomes the shortcomings of existing event camera data files, such as excessive memory usage, difficulty in storage, and download.

[0007] The technical solution adopted by this invention to solve the problem is as follows:

[0008] In a first aspect, embodiments of the present invention provide a lossless compression encoding method for event camera data, wherein the method includes:

[0009] Obtain the event image region and divide the event image region into multiple regions with a specified length and width in pixels;

[0010] For the partitioned region, based on the original coordinates (x, y) of each event point e(t, x, y, p), calculate the block b to which each event point belongs and its position (x, y) within the block. b ,y b Generate new position coordinates e(b,y) for each event point. b ,x b );

[0011] Based on the calculated new position coordinates of each event point, each event point is represented as e(b,y). b ,x b ,t,p), based on a new set of event points, stored in a multi-level key-value pair data structure;

[0012] Data stored in a multi-level key-value pair data structure is saved as binary data packets and finally compressed into a binary file.

[0013] The lossless compression encoding method for event camera data, wherein the step of acquiring the event image region and dividing the event image region into multiple regions with a specified length and width in pixels includes:

[0014] Get the total number of rows (height) and total number of columns (width) of the event image;

[0015] The event image is divided into regions. Based on the size of each block (block_size × block_size), and combined with the total number of rows (height) and columns (width) of the acquired event image, the number of horizontal blocks (b) is calculated. w and the number of vertical blocks b h .

[0016] The lossless compression encoding method for event camera data, wherein the step of acquiring the event image region and dividing the event image region into multiple regions with a specified length and width in pixels further includes:

[0017] Based on the number of line blocks after partitioning, b h Number of columns b w The compressed file header is constructed using the image's row height and column width.

[0018] The lossless compression encoding method for event camera data, wherein, for the segmented region, based on the original coordinates (x, y) of each event point e(t, x, y, p), the block b to which each event point belongs and its position (x, y) within the block are calculated. b ,yb Generate new position coordinates e(b,y) for each event point. b ,x b The steps include:

[0019] For the segmented region, based on the original coordinates (x,y) of each event point e(t,x,y,p);

[0020] For each event point e(t,x,y,p), where t is the time of the event, x and y are the image positions at the time of the event, and p is the event polarity {1,-1}, calculate the region position (b,x) to which the event point belongs after image segmentation. b ,y b ), b is the block to which (x b ,y b Let (x, y) be the position within the block, and implement the conversion of the position coordinates from 2*4 bytes (x, y) to 3*1 bytes (b, y). b ,x b ).

[0021] The lossless compression encoding method for event camera data, wherein each event point is represented as e(b,y) based on the calculated new position coordinates of each event point. b ,x b The steps for storing the new set of event points (t, p) in a multi-level key-value pair data structure include:

[0022] Based on transforming the information of each event point from e(t,x,y,p) to e(t,b,x) b ,y b Under the premise of p), data is stored in a multi-level format in key-value pairs;

[0023] Based on the result of storing data in a multi-level format as key-value pairs, each time information array is further processed. First, each time array is sorted in ascending order, and then the value is converted into the difference with the previous time point.

[0024] The lossless compression encoding method for event camera data, wherein the step of storing the data in a multi-level key-value pair format includes:

[0025] Let B be the primary key, with its corresponding value being an array of key-value pairs with y as the primary key; y be the secondary key, with its corresponding value being an array of key-value pairs with x as the primary key; and x be the tertiary key, with its corresponding value being two arrays, each storing pairs satisfying (b, x). b ,y b Time information for positive and negative event points at the given location.

[0026] The lossless compression encoding method for event camera data, wherein the step of saving data stored in a multi-level key-value pair data structure as a binary data packet and finally compressing it into a binary file includes:

[0027] Based on the data stored in the obtained multi-level key-value pair data structure, during storage, (b, x) are respectively... b ,y b Add an identifier before each time array, and add an identifier P to indicate a positive event or an identifier N to indicate a negative event, as well as the length of the array;

[0028] The data is then converted into an array, and the final binary stream message is saved as a binary data file in the form of multi-level key-value pairs.

[0029] A lossless compression encoding apparatus for event camera data, wherein the apparatus comprises:

[0030] The segmentation module is used to acquire the event image region and segment the event image region into multiple regions with a specified length and width in pixels.

[0031] The conversion module is used to calculate the block b to which each event point belongs and its position within the block b, based on the original coordinates (x, y) of each event point e(t, x, y, p) after the region has been divided into blocks. b ,y b Generate new position coordinates e(b,y) for each event point. b ,x b );

[0032] The multi-level key-value pair data structure conversion module is used to represent each event point as e(b,y) based on the calculated new location coordinates of each event point. b ,x b ,t,p), based on a new set of event points, stored in a multi-level key-value pair data structure;

[0033] The binary compression module is used to save data stored in a multi-level key-value pair data structure as binary data packets, and finally compress it into a binary file.

[0034] A smart terminal includes a memory and one or more programs, wherein one or more programs are stored in the memory and configured to implement the steps of any one of the methods when executed by one or more processors.

[0035] A non-transitory computer-readable storage medium, wherein, when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform any of the methods described above.

[0036] The beneficial effects of this invention are as follows: This invention provides a lossless compression encoding method for event camera data. It reassembles the event camera data information only once using a specific data structure, compressing the event camera data file without causing any data loss. The original event data file can be converted into the compressed file described herein, and the compressed file can also be losslessly restored back to the original file. The compression method of this invention effectively compresses event camera data files, with no loss in process and simple steps. Furthermore, the method of this invention overcomes the shortcomings of existing event camera data files, such as excessive memory usage, difficulty in storage and downloading; the compressed data file of this invention reduces memory usage. Attached Figure Description

[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0038] Figure 1 This is a flowchart illustrating the lossless compression encoding method for event camera data provided in an embodiment of the present invention.

[0039] Figure 2 This is a schematic diagram of the event image region segmentation of the lossless compression encoding method for event camera data provided in this embodiment of the invention.

[0040] Figure 3 This is a schematic diagram of a multi-level key-value pair data structure for a lossless compression encoding method for event camera data provided in an embodiment of the present invention.

[0041] Figure 4 This is a schematic diagram of the binary data packet structure of the lossless compression encoding method for event camera data provided in an embodiment of the present invention.

[0042] Figure 5 This is a schematic diagram of the lossless compression encoding device for event camera data provided in an embodiment of the present invention.

[0043] Figure 6 This is a block diagram illustrating the internal structure of a smart terminal provided in an embodiment of the present invention. Detailed Implementation

[0044] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0045] It should be noted that if the embodiments of the present invention involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of the components in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.

[0046] An event camera is a biomimetic sensor that differs from traditional freeze-frame cameras: instead of capturing image rates from a fixed position, it asynchronously measures the brightness change per pixel and outputs an event stream—including encoded time t, position (x, y), and brightness change symbol p ∈ {1, -1}. Compared to conventional cameras, event cameras offer attractive features: high temporal resolution (on the order of μs), very high dynamic range (140 dB vs. 60 dB), low power consumption, and high pixel bandwidth (on the order of kHz) that reduces motion blur. Therefore, event cameras hold great potential in challenging scenarios.

[0047] Event stream data generated by an event camera is typically a set of multiple event points, which can be represented as: E = {e(t)} k ,x k ,y k ,p k )|k∈N + Currently, event stream data is mostly saved in .txt text format or .bag file format under the ROS system. The storage structure is usually saved in the form of e(t,x,t,p) for each event. Due to the high dynamic range and asynchronous triggering characteristics of event cameras, a large number of event points will be generated in just a short period of time, resulting in very large file content that is not convenient for storage, uploading and downloading. This has caused a series of studies on event cameras to be troubled by the data acquisition and storage stage.

[0048] Most existing event data compression methods use encoding, which can compress data, but require relatively complex steps and result in some data loss during data restoration.

[0049] To address the problems of existing technologies, this invention discloses a lossless compression encoding method for event camera data. The compression method includes: Step S1, dividing the event image region into multiple regions with a length and width of block_size pixels; in this method, block_size is set to 256; Step S2, calculating the block b to which each event point e(t,x,y,p) belongs and its position within the block (x,y) based on the original coordinates (x,y) of each event point e(t,x,y,p). b ,y bStep S3: Restructure the data using a multi-level key-value pair format. Assign b, y, x, and p as first, second, third, and fourth-level keys, respectively, based on priority. The fourth-level key value corresponds to an array consisting of the time t of all event points e satisfying (b, y, x, p). Step S4: Store the data as a binary file in the format of S3, where b, x, and y are 1 byte each, and t is 4 bytes. This compression method only changes the original data storage format and does not cause data loss. Compared to the original method that only stores data in multiple e(t, x, y, p) formats, the method of this invention can achieve a compression rate of 24.35%. It overcomes the shortcomings of existing event camera data files, such as excessive memory usage, difficulty in storage and download.

[0050] Exemplary methods

[0051] like Figure 1 As shown in the illustration, this embodiment of the invention provides a lossless compression encoding method for event camera data, which can be applied to smart terminals. In this embodiment, the method includes the following steps:

[0052] Step S100: Obtain the event image region and divide the event image region into multiple regions with a length and width of block_size pixels. In this method, block_size is set to 256.

[0053] In this embodiment of the invention, an event image region is acquired and divided into multiple regions with a specified width and length in pixels; preferably, the specified pixel region is a region of block_size pixels; in specific implementation, the event image region is first acquired and then divided into blocks, for example, after dividing the event image region into blocks of size block_size × block_size, three 1-byte data bits (b, y) can be used. b ,x b To determine the location coordinates of an event point, without block partitioning, two 4-byte data bits (x, y) are needed to represent the location coordinates. This invention, by using block partitioning, saves 5 bytes of storage for each event point. The specific implementation of step S100 may include the following steps:

[0054] Step S11: Obtain the total number of rows (height) and the total number of columns (width) of the event image;

[0055] Step S12: Divide the event image into regions, such as... Figure 2As shown, based on the size of each block (block_size × block_size), and combined with the total number of rows (height) and columns (width) of the acquired event image, the number of horizontal blocks (b) is calculated. w and the number of vertical blocks b h The calculation formula is as follows:

[0056]

[0057]

[0058] Based on the calculated number of horizontal blocks b w And the number of blocks in the vertical direction, b, to obtain multiple regions with a length and width of block_size pixels after segmentation;

[0059] Step S13: Based on the number of row blocks after partitioning (b) h ), number of columns (b) w The compressed file header is constructed using the image's row height and column width.

[0060] The compressed file header data structure includes placeholder 'H' (1 byte), width (1 byte), height (1 byte), b_w (1 byte), and b_h (1 byte).

[0061] This invention includes the following variables for calculating the compressed file header: width, height, and width. w b h ;

[0062] Step S200: For the segmented region, based on the original coordinates (x, y) of each event point e(t, x, y, p), calculate the block b to which each event point belongs and its position (x, y) within the block. b ,y b Generate new position coordinates e(b,y) for each event point. b ,x b This implements the conversion of position coordinates from 2*4 bytes (x, y) to 3*1 bytes (b, y). b ,x b );

[0063] In this step, for the segmented region, based on the original coordinates (x, y) of each event point e(t, x, y, p), where t is the event occurrence time, x and y are the image positions at the time of occurrence, and p is the event polarity {1, -1}, the region position (b, x) of the event point after image segmentation is calculated. b ,yb ), b is the block to which (x b ,y b () represents the position within the block, calculated using the following formula:

[0064]

[0065] x b =x mod block_size

[0066] y b =y mod block_size

[0067] The new position coordinates e(b,x) for each event are calculated using the formula above. b ,y b This transforms the original position coordinates of each event point from two 4-byte (x, y) coordinates to three 1-byte (b, y) coordinates. b ,x b Implement the conversion of position coordinates from 2*4 bytes (x, y) to 3*1 bytes (b, y). b ,x b ).

[0068] In other words, this step can reduce the size of the event point's position coordinates (x, y) from the original 2*4 bytes to 3*1 bytes, thus reducing the space occupied by the coordinate data.

[0069] Step S300: Based on the calculated new position coordinates of each event point, represent each event point as e(b,y). b ,x b The event points (t, p) are stored in a multi-level key-value pair data structure based on a new set of event points.

[0070] In this step, based on step S2, the information of each event point is transformed from e(t,x,y,p) to e(t,b,x). b ,y b Under the premise of p), data is stored in a multi-level format using key-value pairs. For example... Figure 3 As shown, the data structure is reorganized in a multi-level key-value pair format. b, y, x, and p are set as first, second, third, and fourth level keys, respectively, according to priority. The value corresponding to the fourth level key is an array consisting of the time t of all event points e that satisfy (b, y, x, p).

[0071] This invention adopts Figure 3 The storage structure shown avoids repeatedly storing the same location information, even for items with the same location coordinates (b, y). b ,x bFor event points, the coordinate information only needs to be stored once, avoiding the repeated storage of the same information. The specific processing may include the following steps:

[0072] Step S31: Based on the calculated new position coordinates of each event point, represent each event point as e(b,y). b ,x b For each event point e(t,b,x), ... b ,y b The event point set (p) is stored in a multi-level key-value pair data structure.

[0073] Specifically, for example Figure 3 and Figure 4 As shown, B is set as the primary key, and its corresponding value is an array of key-value pairs with y as the primary key; y is set as the secondary key, and its corresponding value is an array of key-value pairs with x as the primary key; x is set as the tertiary key, and its corresponding value is two arrays, one storing pairs of key-value pairs that satisfy the condition that for pairs with the same position coordinates (b, y)... b ,x b The invention provides the time information of positive and negative event points at the event point location. Compared to directly storing event stream data as e(t,x,y,p), the present invention effectively avoids the duplicate recording of the same (x,y) information, saving a significant amount of space.

[0074] Step S32: Based on the result of multi-level storage of data in key-value pair format in step S31, further process each time information array. First, sort each time array in ascending order, and then convert the value into the difference with the previous time point. Since the event camera has high dynamic range, the time difference between each event point will not be too large. By recording the time difference, it is possible to avoid using long long or long type to record the time of the event point, and instead directly use 4-byte int type to record the time information.

[0075] Step S400: Save the data processed in step S3 as a binary data message in the form of multi-level key-value pairs, and finally compress it into a binary file.

[0076] In this step, the data is saved as a binary file in the format of step S300, where b, x, and y each occupy 1 byte, and t occupies 4 bytes. The specific implementation is as follows:

[0077] Specifically, such as Figure 4 As shown, the data stored based on the multi-level key-value pair data structure obtained in step S3 is processed during storage for data with the same position coordinates (b, y). b ,x bAn identifier is added before each event point, and a P or N identifier (indicating positive or negative polarity) and the length of the array are added before each time array. Then, the union in C++ is used to convert data types to char arrays. The final binary stream message is as follows: Figure 4 As shown.

[0078] Exemplary device

[0079] like Figure 5 As shown in the figure, an embodiment of the present invention provides a lossless compression encoding apparatus for event camera data, the apparatus comprising:

[0080] The block segmentation module 510 is used to obtain the event image region and segment the event image region into multiple regions with a length and width of block_size pixels.

[0081] The conversion module 520 is used to calculate, based on the original coordinates (x, y) of each event point e(t, x, y, p) in the segmented region, the block b to which each event point belongs and its position within the block (x, y). b ,y b Generate new position coordinates e(b,y) for each event point. b ,x b This implements the conversion of position coordinates from 2*4 bytes (x, y) to 3*1 bytes (b, y). b ,x b );

[0082] The multi-level key-value pair data structure conversion module 530 is used to represent each event point as e(b,y) based on the calculated new position coordinates of each event point. b ,x b ,t,p), based on a new set of event points, stored in a multi-level key-value pair data structure;

[0083] The binary compression module 540 is used to save data stored in a multi-level key-value pair data structure as binary data packets and finally compress them into binary files, as described above.

[0084] Based on the above embodiments, the present invention also provides a smart terminal, the principle block diagram of which can be as follows: Figure 6As shown, the smart terminal includes a processor, memory, network interface, display screen, and camera connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a lossless compression encoding method for event camera data. The display screen can be an LCD screen or an e-ink screen, and the camera is pre-installed within the smart terminal.

[0085] Those skilled in the art will understand that Figure 6 The block diagram shown is merely a partial structural diagram related to the present invention and does not constitute a limitation on the smart terminal to which the present invention is applied. A specific smart terminal may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0086] In one embodiment, a smart terminal is provided, including a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors. The one or more programs include instructions for performing the following operations:

[0087] Obtain the event image region and divide the event image region into multiple regions with a length and width of block_size pixels;

[0088] For the partitioned region, based on the original coordinates (x, y) of each event point e(t, x, y, p), calculate the block b to which each event point belongs and its position (x, y) within the block. b ,y b Generate new position coordinates e(b,y) for each event point. b ,x b );

[0089] Based on the calculated new position coordinates of each event point, each event point is represented as e(b,y). b ,x b ,t,p), based on a new set of event points, stored in a multi-level key-value pair data structure;

[0090] Data stored in a multi-level key-value pair data structure is saved as binary data packets and finally compressed into a binary file, as described above.

[0091] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0092] In summary, this invention discloses a lossless compression encoding method, apparatus, smart terminal, and storage medium for event camera data. The lossless compression encoding method provided by this invention reassembles the event camera data information only once using a specific data structure, compressing the event camera data file without causing any data loss. The original event data file can be converted into the compressed file described herein, and the compressed file can be losslessly restored back to the original file. The compression method of this invention effectively compresses event camera data files, with no loss in process and simple steps. Furthermore, the method of this invention overcomes the shortcomings of existing event camera data files, such as excessive memory usage and difficulty in storage and downloading; the compressed data file of this invention reduces memory usage.

[0093] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. A lossless compression encoding method for event camera data, characterized in that, The method includes: Obtain the event image region and divide the event image region into multiple regions with a specified length and width in pixels; For the partitioned region, based on the original coordinates (x, y) of each event point e(t, x, y, p), calculate the block b to which each event point belongs and its position (x, y) within the block. b ,y b Generate new position coordinates e(b,y) for each event point. b ,x b ); Based on the calculated new position coordinates of each event point, each event point is represented as e(b,y). b ,x b ,t,p), based on a new set of event points, stored in a multi-level key-value pair data structure; The process involves representing each event point as e(b,y) based on its calculated new position coordinates. b ,x b The steps for storing the new set of event points (t, p) in a multi-level key-value pair data structure include: Based on transforming the information of each event point from e(t,x,y,p) to e(t,b,x) b ,y b Under the premise of p), data is stored in a multi-level format in key-value pairs; Based on the result of storing data in a multi-level format in key-value pairs, each time information array is further processed. First, each time array is sorted in ascending order, and then the value is converted into the difference with the previous time point. By recording the time difference, we avoid using long long or long type to record the time of the event point and directly use 4-byte int type to record the time information; The step of storing data in a multi-level format using key-value pairs includes: Let B be the primary key, with its value being an array of key-value pairs with y as the primary key; y be the secondary key, with its value being an array of key-value pairs with x as the primary key; and x be the tertiary key, with its value being two arrays, each storing pairs that satisfy (b, x) b ,y b Time information for positive and negative event points at the given location; For those with the same position coordinates (b, x) b ,y b For event points, the coordinate information only needs to be stored once, avoiding the repeated storage of the same information; Data stored in a multi-level key-value pair data structure is saved as binary data packets and finally compressed into a binary file.

2. The lossless compression encoding method for event camera data according to claim 1, characterized in that, The step of acquiring the event image region and dividing the event image region into multiple regions with a specified length and width in pixels includes: Get the total number of rows (height) and total number of columns (width) of the event image; The event image is divided into regions. Based on the size of each block (block_size × block_size), and combined with the total number of rows (height) and columns (width) of the acquired event image, the number of horizontal blocks (b) is calculated. w and the number of vertical blocks b h .

3. The lossless compression encoding method for event camera data according to claim 2, characterized in that, The step of acquiring the event image region and dividing the event image region into multiple regions with a specified length and width in pixels further includes: Based on the number of row blocks after partitioning, b h Number of columns b w The compressed file header is constructed using the image's row height and column width.

4. The lossless compression encoding method for event camera data according to claim 1, characterized in that, For the segmented region, based on the original coordinates (x, y) of each event point e(t, x, y, p), the block to which each event point belongs is calculated. Position within the block (x) b ,y b Generate new position coordinates e(b,y) for each event point. b ,x b The steps include: For the segmented region, based on the original coordinates (x,y) of each event point e(t,x,y,p); For each event point e(t,x,y,p), where t is the time of the event, x and y are the image positions at the time of the event, and p is the event polarity {1,-1}, calculate the region position (b,x) to which the event point belongs after image segmentation. b ,y b ), b is the block to which (x b ,y b Let (x, y) be the position within the block, and implement the conversion of the position coordinates from 2*4 bytes (x, y) to 3*1 bytes (b, y). b ,x b ).

5. The lossless compression encoding method for event camera data according to claim 1, characterized in that, The steps of saving data stored in a multi-level key-value pair data structure as a binary data message and finally compressing it into a binary file include: Based on the data stored in the obtained multi-level key-value pair data structure, during storage, (b, x) are respectively... b ,y b Add an identifier before each time array, and add an identifier P to indicate a positive polarity event or an identifier N to indicate a negative polarity event, as well as the length of the array; The data is then converted into an array, and the final binary stream message is saved as a binary data file in the form of multi-level key-value pairs.

6. A lossless compression encoding device for event camera data, characterized in that, The lossless compression encoding device for event camera data is applied to the lossless compression encoding method for event camera data as described in any one of claims 1-5, and the device comprises: The segmentation module is used to acquire the event image region and segment the event image region into multiple regions with a specified length and width in pixels. The conversion module is used to calculate the block b to which each event point belongs and its position within the block b, based on the original coordinates (x, y) of each event point e(t, x, y, p) after the region has been divided into blocks. b ,y b Generate new position coordinates e(b,y) for each event point. b ,x b ); The multi-level key-value pair data structure conversion module is used to represent each event point as e(b,y) based on the calculated new location coordinates of each event point. b ,x b ,t,p), based on a new set of event points, stored in a multi-level key-value pair data structure; The binary compression module is used to save data stored in a multi-level key-value pair data structure as binary data packets, and finally compress it into a binary file.

7. A smart terminal, characterized in that, The method includes a memory and one or more programs, wherein one or more programs are stored in the memory and configured to be executed by one or more processors to implement the steps of the method as described in any one of claims 1-5.

8. A non-transitory computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Event camera hardware

    US20220078369A1