CN109525848B - Pulse sequence compression method and device - Google Patents

Pulse sequence compression method and device Download PDF

Info

Publication number
CN109525848B
CN109525848B CN201811202824.1A CN201811202824A CN109525848B CN 109525848 B CN109525848 B CN 109525848B CN 201811202824 A CN201811202824 A CN 201811202824A CN 109525848 B CN109525848 B CN 109525848B
Authority
CN
China
Prior art keywords
information
spatial
polarity
time information
polarity information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811202824.1A
Other languages
Chinese (zh)
Other versions
CN109525848A (en
Inventor
王苫社
张嘉琪
马思伟
张翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Peking University
Original Assignee
Peking University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Peking University filed Critical Peking University
Priority to CN201811202824.1A priority Critical patent/CN109525848B/en
Publication of CN109525848A publication Critical patent/CN109525848A/en
Application granted granted Critical
Publication of CN109525848B publication Critical patent/CN109525848B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The application provides a compression method and a compression device of a pulse sequence, and belongs to the technical field of digital signal processing. The method comprises the following steps: counting spatial information, and/or temporal information, and/or polarity information of the pulse sequence; compressing the counted spatial information, and/or time information, and/or polarity information respectively to obtain corresponding code streams; and outputting the code stream obtained by compression. In the application, the spatial redundancy and/or the temporal redundancy in the pulse sequence are removed by utilizing the statistical characteristics among the pulse signals, so that the compressed pulse sequence occupies a smaller space and is easier to store and transmit.

Description

Pulse sequence compression method and device
Technical Field
The present application relates to the field of digital signal processing technologies, and in particular, to a method and an apparatus for compressing a pulse sequence.
Background
The pulse is a space-time signal similar to information transfer between biological neurons, and the pulse acquisition method comprises the following steps: collecting space-time signals of each local space position in a monitoring area, and accumulating the space-time signals according to time to obtain a signal intensity value; transforming the signal accumulated intensity value through a filter, and outputting a pulse signal when a transformation result exceeds a specific threshold value; arranging the pulse signals corresponding to the local spatial position into a sequence according to time sequence to obtain a pulse sequence expressing the local spatial position signals and the change process of the local spatial position signals; and arranging the pulse sequences of all local space positions into a pulse sequence array according to the mutual relation of the space positions, and using the pulse sequence array as the expression of the dynamic space-time signals of the monitoring area.
As an emerging type of camera, Dynamic Vision Sensors (DVS) show great advantages in high-speed photography at wide Dynamic range and high temporal resolution. In the shot pulse sequence, except for the header information part in each sequence, the pulse signal part is stored in a protocol of AER (address-events) format, as shown in fig. 1, that is, each signal is represented by a fixed-format quadruple (x, y, t, p), x and y respectively represent the abscissa and ordinate of the pulse signal on the current image, t represents time information, p represents the polarity of the pulse signal to represent the change of brightness (the value is 0 or 1,0 represents brightness decrease, and 1 represents brightness increase); it should be noted that the pulse signal is different from the conventional video, and there is no obvious frame or pixel concept.
Currently, pulse sequences are typically stored using the AEDAT (Address Event DATA) format. AEDAT has produced 3 different versions due to the recent technological advances. Among them, AEDAT1.0 and AEDAT2.0 are most commonly used.
In AEDAT1.0, the pulse train is typically composed of an optional header and a series of pulse signals, as shown in FIG. 2. The pulse signal is composed of 32-bit time information and 16-bit address information, and the 16-bit address information includes x, y, polarity and other information.
In AEDAT2.0, as shown in fig. 3, the structure of the pulse sequence is similar to that in AEDAT1.0, and is also composed of header information and a series of pulse signals. In the pulse signal, the time information still occupies 32 bits, but the address information becomes 32 bits.
It can be seen that in the different AEDAT formats, the time information occupies a large portion of the storage space. Furthermore, the pulse sequence collects the information of the light intensity change of the current position, the distribution of the pulse signals on a time domain and a space domain is sparse, the distribution of the pulse signals has a certain rule, and when the light intensity changes simultaneously in a certain region, the distribution of the pulse signals is consistent, so that certain redundancy exists in the space domain. When the light intensity changes steadily, the time intervals of the occurrence of the pulse signals at each pixel point are also nearly equal, so that certain time redundancy also exists. For a video sequence shot by a traditional camera, the traditional video coding mode well eliminates redundancy in a time domain and a space domain. But for pulse sequences stored in the AER format the traditional video codec approach is no longer applicable. The pulse sequence has the sparse characteristic in the time domain and the space domain, and the compression mode needs to be considered again according to the characteristic of the pulse sequence by considering the condition that the number and the distribution of the pulse signals in the sequence are related to illumination brightness conversion.
Disclosure of Invention
In order to overcome the defects in the prior art, the application provides a method and a device for compressing a pulse sequence.
In a first aspect, the present application provides a method for compressing a pulse sequence, including:
counting spatial information, and/or temporal information, and/or polarity information of the pulse sequence;
compressing the spatial information, and/or the time information, and/or the polarity information respectively to obtain corresponding code streams;
and outputting the code stream obtained by compression.
Optionally, the pulse sequence comprises: the pulse signal sequence comprises pulse signal sequences, each pulse signal is represented by a corresponding quadruple, and the quadruple comprises time information generated by the pulse signals, spatial position information at the corresponding moment of the time information and polarity information;
correspondingly, the spatial information, and/or the temporal information, and/or the polarity information of the statistical pulse sequence includes:
counting the number of pulse signals appearing at each spatial position according to the quadruple corresponding to each pulse signal, and sequentially storing the pulse signals into a histogram with the same resolution as the pulse sequence; and/or the presence of a gas in the gas,
extracting time information in quadruples corresponding to pulse signals appearing at each spatial position to obtain time information strings corresponding to each spatial position; and/or the presence of a gas in the gas,
and extracting the polarity information in the quadruple corresponding to the pulse signal appearing at each spatial position to obtain a polarity information string corresponding to each spatial position.
Optionally, the compressing the spatial information, and/or the time information, and/or the polarity information respectively to obtain corresponding code streams includes:
scanning the number of pulse signals appearing at each spatial position in the histogram line by line to obtain a signal number string, and coding the signal number string according to a preset coding method to obtain a corresponding spatial information code stream; and/or the presence of a gas in the gas,
processing the time information string in different modes, coding the processed time information string according to a preset coding method respectively to obtain different code streams, and selecting an optimal code stream from the obtained different code streams as a time information code stream; and/or
Processing the polarity information string in different modes, coding the processed polarity information string according to a preset coding method respectively to obtain different code streams, and selecting an optimal code stream from the obtained different code streams as a polarity information code stream;
the code stream obtained by the output compression comprises: and outputting the spatial information code stream, and/or the time information code stream, and/or the polarity information code stream.
Optionally, the processing the time information string in different manners includes at least two of the following processing manners:
carrying out primary difference operation on the time information strings corresponding to the spatial positions to obtain first to-be-coded strings corresponding to the spatial positions;
carrying out differential operation twice on the time information strings corresponding to the spatial positions to obtain second to-be-coded strings corresponding to the spatial positions;
and carrying out primary difference operation on the time information strings corresponding to the spatial positions to obtain first strings to be coded corresponding to the spatial positions, and combining the first strings to be coded to obtain a third string to be coded.
Optionally, the processing the polarity information string in different manners includes at least two of the following processing manners:
combining continuous same polarity information in the polarity information strings corresponding to the spatial positions to obtain first coding pairs corresponding to the spatial positions;
merging the polarity information strings corresponding to the spatial positions to obtain a polarity information sequence;
and combining the polarity information strings corresponding to the spatial positions to obtain a polarity information sequence, and combining the continuous same polarity information in the polarity information sequence to obtain a second coding pair.
In a second aspect, the present application provides a pulse train compression apparatus, comprising:
the statistical module is used for counting the spatial information, the time information and/or the polarity information of the pulse sequence;
the compression module is used for respectively compressing the spatial information, and/or the time information, and/or the polarity information counted by the counting module to obtain corresponding code streams;
and the output module is used for outputting the code stream obtained by the compression module.
Optionally, the pulse sequence comprises: the pulse signal processing method comprises the steps that a plurality of pulse signals are represented by corresponding quadruples, and the quadruples comprise time information generated by the pulse signals, spatial position information at the corresponding moment of the time information and polarity information;
correspondingly, the statistical module comprises: a statistics submodule and/or a first extraction submodule and/or a second extraction submodule;
the counting submodule is used for counting the number of the pulse signals appearing at each spatial position according to the quadruple corresponding to each pulse signal and sequentially storing the number of the pulse signals into a histogram with the same resolution as the pulse sequence;
the first extraction submodule is used for extracting the time information in the quadruple corresponding to the pulse signal appearing at each spatial position to obtain a time information string corresponding to each spatial position;
and the second extraction submodule is used for extracting the polarity information in the quadruple corresponding to the pulse signal appearing at each spatial position to obtain the polarity information string corresponding to each spatial position.
Optionally, the compression module comprises: a first compression sub-module, and/or a second compression sub-module, and/or a third compression sub-module;
the first compression submodule is used for scanning the number of pulse signals appearing at each spatial position in the histogram line by line to obtain a signal number string, and coding the signal number string according to a preset coding method to obtain a corresponding spatial information code stream;
the second compression submodule is used for processing the time information strings obtained by the first extraction submodule in different modes, coding the processed time information strings according to a preset coding method respectively to obtain different code streams, and selecting an optimal code stream from the obtained different code streams as a time information code stream;
the third compression submodule is used for processing the polarity information string obtained by the second extraction submodule in different modes, coding the processed polarity information string according to a preset coding method respectively to obtain different code streams, and selecting an optimal code stream from the obtained different code streams as a polarity information code stream;
the output module is specifically configured to output the spatial information code stream obtained by the first compression sub-module, the time information code stream obtained by the second compression sub-module, and the polarity information code stream obtained by the third compression sub-module.
Optionally, the second compression sub-module is specifically configured to process the time information string obtained by the first extraction sub-module by using at least two of the following processing manners:
carrying out primary difference operation on the time information strings corresponding to the spatial positions to obtain first to-be-coded strings corresponding to the spatial positions;
carrying out differential operation twice on the time information strings corresponding to the spatial positions to obtain second to-be-coded strings corresponding to the spatial positions;
and carrying out primary difference operation on the time information strings corresponding to the spatial positions to obtain first strings to be coded corresponding to the spatial positions, and combining the first strings to be coded to obtain a third string to be coded.
Optionally, the third compression sub-module is specifically configured to process the polarity information string obtained by the second extraction sub-module by using at least two of the following processing manners:
combining continuous same polarity information in the polarity information strings corresponding to the spatial positions to obtain first coding pairs corresponding to the spatial positions;
merging the polarity information strings corresponding to the spatial positions to obtain a polarity information sequence;
and combining the polarity information strings corresponding to the spatial positions to obtain a polarity information sequence, and combining the continuous same polarity information in the polarity information sequence to obtain a second coding pair.
The application has the advantages that:
in the application, the spatial information and/or the time information and/or the polarity information of the pulse sequence are processed, the processed data are compressed by using arithmetic coding, and when the time information and the polarity information are processed, a plurality of processing modes are adopted and the optimal code stream is selected for output, so that the spatial redundancy and/or the time redundancy in the pulse sequence are removed, the space occupied by the compressed pulse sequence is smaller, and the compressed pulse sequence is easier to store and transmit.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a schematic diagram of the composition of a stored pulse sequence in AER format;
FIG. 2 is a schematic diagram of the composition of a pulse sequence stored in the AEDAT1.0 format;
FIG. 3 is a schematic diagram of the composition of a stored pulse sequence in the AEDAT2.0 format;
FIG. 4 is a schematic diagram of a pulse train compression method according to an embodiment of the present application;
FIG. 5 is a flow chart of a method of pulse train compression according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a spatial information processing procedure according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a temporal information processing procedure according to an embodiment of the present application;
fig. 8 is a block diagram of a pulse train compression apparatus according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The application provides a compression method of a pulse sequence, which eliminates the spatial redundancy and/or the temporal redundancy of the pulse sequence stored in an AER format by respectively compressing the spatial information, the temporal information and/or the polarity information of the pulse sequence; preferably, the spatial information, the temporal information, and the polarity information of the pulse sequence are all compressed to remove redundancy to the maximum extent and reduce the occupied space. In this specification, the compression of all three is taken as an example, and as shown in a schematic diagram of fig. 4, the compression includes statistical pulse signal information including space-time information and polarity information, where the space-time information includes space information and time information, and after compressing each information, entropy coding is performed respectively to obtain corresponding binary code streams. The method and apparatus of the present application are described in further detail below.
Example one
According to an embodiment of the present application, a method for compressing a pulse sequence is provided, which is described by taking as an example the compression of all of spatial information, temporal information, and polarity information of the pulse sequence, and as shown in fig. 5, the method includes:
step 101: counting spatial information, time information and polarity information of the pulse sequence;
specifically, as shown in fig. 1, the pulse sequence includes Header information (File Header) and a pulse signal sequence; the head information is used for recording information such as chip type, resolution and the like of the shooting pulse signal; each pulse signal in the pulse sequence is represented by a corresponding quadruple (x, y, t, p), wherein x and y respectively represent the abscissa and the ordinate of the pulse signal on the current image, namely space position information; t represents time information in microseconds; p represents the polarity of the pulse signal, and is used to represent the change of brightness (the value is 0 or 1,0 represents the brightness decrease, and 1 represents the brightness increase), i.e. the polarity information. Since the pulse signals record the brightness variation of each spatial position, the time of the pulse signals is not continuous for each spatial position, and each pulse signal has a time information.
Correspondingly, step 101 includes:
step 101-1: counting the number of pulse signals appearing at each spatial position according to the quadruple corresponding to each pulse signal, and sequentially storing the pulse signals into a histogram with the same resolution as that of the pulse sequence;
according to an embodiment of the present application, step 101-1 is preceded by: initializing an array with the same resolution as the pulse sequence, wherein each position in the array corresponds to each space position in the pulse sequence one by one, all values in the array are initialized to be zero, and the array is used as a histogram for storing the number of pulse signals appearing at each space position;
further, step 101-1 specifically includes: and traversing the pulse sequence according to the time increasing sequence, judging whether pulse signals appear at each space position within the current moment, if so, adding 1 to the number of the pulse signals in the corresponding space position in the histogram, otherwise, keeping the number unchanged.
Furthermore, because the pulse signals in the pulse sequence are organized in a time-increasing order, only the occurrence positions of the pulse signals at the current time are counted in step 101-1, i.e., Num (i, j) ═ ∑t1(0≤i≤n,0≤j≤m,Ts≤t≤Te,t∈{t|if(i,j,t)exist a spike});
Wherein i and j represent coordinates of a spatial position in an image, Ts and Te are respectively start and end times of occurrence of the pulse signal, t is a time at which the pulse signal occurs at the coordinates (i, j), Num (i, j) represents the number of the pulse signals occurring from the time Ts to the Te coordinates (i, j), spike is a pulse sequence, and the spatial resolution of the pulse sequence is m × n.
Step 101-2: extracting time information in quadruples corresponding to pulse signals appearing at each spatial position to obtain time information strings corresponding to each spatial position;
specifically, according to the time increasing sequence, time information in quadruples corresponding to pulse signals appearing at each spatial position is counted in sequence to obtain time information strings corresponding to each spatial position;
using T (i, j) to represent the time information string of the spatial position (i, j), correspondingly, T (i, j) ═ T1,T2…Tk) Wherein i is more than or equal to 1 and less than or equal to n, j is more than or equal to 1 and less than or equal to m, k is the number of pulse signals appearing at the space position (i, j), and the spatial resolution of the pulse sequence is m x n.
Step 101-3: and extracting the polarity information in the quadruple corresponding to the pulse signal appearing at each spatial position to obtain a polarity information string corresponding to each spatial position.
The polarity information has only two values 1 or 0, for example, the polarity information string corresponding to the extracted pixel coordinate (0,1) is (1,1,1,1,0,0,0,1, 1).
Step 102: compressing the counted spatial information, time information and polarity information respectively to obtain corresponding code streams;
according to an embodiment of the present application, step 102 comprises:
step 102-1: scanning the number of pulse signals appearing at each spatial position in the histogram line by line to obtain a signal number string, and coding the signal number string according to a preset coding method to obtain a corresponding spatial information code stream;
among them, the predetermined encoding method is preferably entropy encoding.
Further, a schematic processing procedure of the spatial information is given in this application, as shown in fig. 6.
Step 102-2: processing the time information string in different modes, coding the processed time information string according to a preset coding method respectively to obtain different code streams, and selecting an optimal code stream from the obtained different code streams as a time information code stream;
specifically, the time information string is processed by at least two of the following processing modes:
performing primary difference operation on the time information strings corresponding to the spatial positions to obtain first to-be-encoded strings corresponding to the spatial positions;
specifically, the time information string corresponding to the spatial position (i, j) is: t (i, j) ═ T1,T2…Tk) Wherein i is more than or equal to 1 and less than or equal to n, j is more than or equal to 1 and less than or equal to m, k is the number of pulse signals appearing at the space position (i, j), and the spatial resolution of the pulse sequence is m x n;
performing a first difference on T (i, j) to obtain a first difference string corresponding to the spatial position (i, j), wherein: d (i, j) ═ T2-T1,T3-T2…Tk-Tk-1);
The first to-be-encoded string corresponding to the spatial position (i, j) is: s (i, j) ═ T1,T2-T1,T3-T2…Tk-Tk-1);
Specifically, when only one pulse signal appears at the spatial position (i, j), that is, the spatial position (i, j) has only one time information, the corresponding first string to be encoded is: s (i, j) ═ T1);
Further, the first to-be-coded strings corresponding to the spatial positions (i, j) are coded by using an entropy coding method respectively, so that corresponding first code streams are obtained.
Performing differential operation twice on the time information strings corresponding to the spatial positions to obtain second to-be-coded strings corresponding to the spatial positions;
specifically, the time information string corresponding to the spatial position (i, j) is: t (i, j) ═ T1,T2…Tk) Wherein i is more than or equal to 1 and less than or equal to n, j is more than or equal to 1 and less than or equal to m, k is the number of pulse signals appearing at the space position (i, j), and the spatial resolution of the pulse sequence is m x n;
performing secondary difference on the T (i, j) to obtain a second difference string corresponding to the spatial position (i, j), wherein the second difference string is as follows: d (i, j) ═ T3-2T2+T1,T4-2T3+T2…Tk-2Tk-1+Tk-2);
The second string to be coded corresponding to the spatial position (i, j) is: s (i, j) ═ T1,T2,T3-2T2+T1,T4-2T3+T2…Tk-2Tk-1+Tk-2);
Specifically, when only one pulse signal or two pulse signals are present at the spatial position (i, j), that is, the spatial position (i, j) has only one time information or two time information, the corresponding second string to be encoded is: s (i, j) ═ T1) Or S (i, j) ═ T1,T2);
Further, the second to-be-coded strings corresponding to the spatial positions (i, j) are coded by using an entropy coding method respectively, so that corresponding second code streams are obtained.
And thirdly, carrying out primary differential operation on the time information strings corresponding to the spatial positions to obtain first strings to be coded corresponding to the spatial positions, and combining the first strings to be coded to obtain a third string to be coded.
Specifically, the time information string corresponding to the spatial position (i, j) is: t (i, j) ═ T1,T2…Tk) Wherein i is more than or equal to 1 and less than or equal to n, j is more than or equal to 1 and less than or equal to m, k is the number of pulse signals appearing at the space position (i, j), and the spatial resolution of the pulse sequence is m x n;
performing a first difference on T (i, j) to obtain a first difference string corresponding to the spatial position (i, j), wherein: d (i, j) ═ T2-T1,T3-T2…Tk-Tk-1);
The first to-be-encoded string corresponding to the spatial position (i, j) is: s (i, j) ═ T1,T2-T1,T3-T2…Tk-Tk-1);
The third string to be coded corresponding to the spatial position (i, j) is:
Figure GDA0002531431780000101
further, a third string to be coded corresponding to the spatial position (i, j) is coded by using an entropy coding method, so as to obtain a corresponding third code stream.
In the method, when the number of signals in the pulse sequence is small, the number of signals distributed to each spatial position is small, and if a mode of independently coding the time information string difference of each position is adopted, the coding cost is high due to more coding elements; in the third mode, after the time difference information is combined, the occupied bits after encoding can be further reduced.
It should be noted that, in the above three modes, the time difference information of each spatial position is combined in a horizontal scanning mode, that is, the spatial position: (0,0), (0,1), (0,2) … (0, n-1) (1,0), (1,1), (1,2) … (1, n) … (m-1,0), (m-1,1), (m-1,2) … (m-1, n-1).
Furthermore, the minimum code stream is selected from the obtained first code stream, second code stream and third code stream as the time information code stream.
Preferably, in the present application, the time information sequence at each spatial position is processed by the above three methods, and a schematic diagram thereof is shown in fig. 7, where a is 4, b is2, and c is 3, and each of the three methods indicates the number of pulse signals appearing at the corresponding spatial position.
Step 102-3: processing the polarity information string in different modes, coding the processed polarity information string according to a preset coding method respectively to obtain different code streams, and selecting an optimal code stream from the obtained different code streams as a polarity information code stream;
specifically, the polarity information string is processed by at least two of the following processing modes:
combining continuous same polarity information in the polarity information strings corresponding to each spatial position to obtain a first coding pair corresponding to each spatial position;
the first coding pair comprises one or more (run, level) coding pairs, wherein level represents polarity information (0 or 1), and run represents the number of continuous same polarities.
For example, using x and y to represent 0 and 1, respectively, there is a string of polarity information punctured as (x, x, x, x, y, y, x, x), and the first encoded pair obtained by combining comprises (4, x) (3, y) (2, x).
Further, the first code pair corresponding to each spatial position is coded by using an entropy coding method to obtain a corresponding fourth code stream.
In the method, a (run, level) coding pair mode is adopted, so that the efficiency of coding the polarity information is greatly improved.
Combining the polarity information strings corresponding to the spatial positions to obtain a polarity information sequence;
specifically, the polarity information strings of each spatial position are combined into a polarity information sequence according to the coordinate sequence;
for example, if the polarity information string at the first spatial position is (x, x, x, x, y, y, y, x, x), and the polarity information string at the second spatial position is (x, x, y, y, x, x) …, the polarity information string corresponding to the last spatial position is (x, x, y, y), the combined polarity information sequence is (x, x, x, x, y, y, x, x … x, x, y, y).
Further, the obtained polarity information sequence is coded by using an entropy coding method to obtain a corresponding fifth code stream.
And thirdly, combining the polarity information strings corresponding to the spatial positions to obtain a polarity information sequence, and combining the continuous same polarity information in the polarity information sequence to obtain a second coding pair.
The second coded pair is a coded pair in the form of (level, run, run … run), where level represents the first appearing polarity information (0 or 1), and run represents the number of consecutive same polarity information.
Specifically, the polarity information strings corresponding to each spatial position are combined to obtain a polarity information sequence, the continuously same polarity information in the polarity information sequence is combined once to obtain a first code pair, and the obtained first code pair is combined again to obtain a second code pair.
For example, the combined polarity information sequence is (x, x, x, x, y, y, y, x, x, x, x, y, y, x, x … x, x, y, y), the combined first encoding pair includes (4, x) (3, y) (4, x) (2, y) … (2, y), the first encoding pair is combined, only the first occurring polarity information is retained, and the second encoding pair is (x, 4, 3, 4, 2 … 2).
Further, the obtained second code pair is coded by using an entropy coding method to obtain a corresponding sixth code stream.
In the third mode, by encoding (run, run … run), bits consumed by recording each (run, level) pair level value are saved.
It should be noted that, in the three modes, the polarity information strings of each spatial position are combined in a horizontal scanning mode, that is, the spatial positions: (0,0), (0,1), (0,2) … (0, n-1) (1,0), (1,1), (1,2) … (1, n) … (m-1,0), (m-1,1), (m-1,2) … (m-1, n-1). Meanwhile, in the three processing modes of the polarity information string, the distribution density of pulse signals in different pulse sequences on the time resolution and the space resolution is considered, the adaptability is strong, and the method can be widely used for compressing the polarity information of the pulse sequences.
Preferably, the polarity information string is processed according to the three methods, and the smallest code stream is selected from the obtained fourth code stream, the fifth code stream and the sixth code stream as the polarity information code stream.
Furthermore, the entropy Coding method in this application adopts an Arithmetic Coding (AC) method, and the principle of the Arithmetic Coding is to represent the coded information as an interval between 0 and 1, and the longer the information, the less the interval, the more the number of binary bits representing the interval. In addition, in the application, before each data is coded, a distribution mode of the syntax elements is also specified, and the distribution mode is used for accurately estimating the probability of the occurrence of the elements; and variable length coding is adopted for different syntax elements to represent the type of the current syntax element; therefore, when different elements are coded, the probability of each element can be adjusted according to the occurrence frequency of the different elements, and finally the binary code stream is output.
Step 103: and outputting the code stream obtained by compression.
Specifically, the obtained spatial information code stream, the time information code stream and the polarity information code stream are output.
Further, when decoding the code stream obtained by the compression, the spatial information code stream is decoded first, and when the number of the pulse signals at each spatial position is obtained, the polarity information code stream and the time information code stream are decoded. When the polarity information and the time information are compressed, the information at all spatial positions is compressed or combined in a predetermined order (i, j increasing direction). And when the pulse signals of each space position are recovered, sequentially filling the polarity information and the time information according to the number of the pulse signals of the current space position. For example, when the (x, y) coordinate position is restored and the number of pulse signals at the current position is w, the first w of the polarity information and the time information are taken when the polarity information and the time information are filled, respectively, to form a pulse signal quadruple (x, y, t0, p0) (x, y, t1, p1) … (x, y, tw, pw). After all the pulse signals are obtained through decoding, according to the mechanism of the pulse sequence, reordering is carried out according to the ascending order of the time information.
It should be noted that, in the reordered data, the order of the pulse signal may be inconsistent with the original sequence at the same time point, but this does not affect the viewing, compression, etc. of the pulse sequence.
According to the method of the present application, individual pulse sequences in the DVS128 dataset and the DAVIS240B dataset were tested separately, with the results shown in the following table:
Figure GDA0002531431780000131
the fourth column, the fifth column and the sixth column represent the compressed size of the polarity information, the time information and the spatial information respectively. The compression rate is calculated by dividing the size before compression by the size after compression, and the size before compression does not include the size of the header information in the pulse sequence. Further, the pulse signal occupies 64 bits in the AVIS240B data set and 48 bits in the DVS128 data set. As can be seen from the data in the table, the method of the present application effectively compresses the pulse sequence.
Therefore, the space information, the time information and the polarity information of the pulse sequence are respectively compressed, so that the pulse sequence occupies smaller space and is easier to store and transmit. It is emphasized that those skilled in the art should understand that any one or two of the spatial information, the temporal information and the polarity information of the pulse sequence can be compressed, and the corresponding compression method can be performed.
Example two
According to an embodiment of the present application, there is also provided a pulse train compression apparatus, which is described by taking as an example the compression of all of spatial information, temporal information, and polarity information of a pulse train, and as shown in fig. 8, includes:
the statistical module is used for counting the spatial information, the time information and the polarity information of the pulse sequence;
the compression module is used for respectively compressing the spatial information, the time information and the polarity information counted by the counting module to obtain corresponding code streams;
and the output module is used for outputting the code stream obtained by the compression module.
According to the embodiment of the application, the pulse sequence comprises a plurality of pulse signals, each pulse signal is represented by a corresponding quadruple, wherein each quadruple comprises time information generated by the pulse signals, spatial position information at the corresponding moment of the time information and polarity information;
correspondingly, the statistical module comprises: a first statistics submodule, a second statistics submodule, a first extraction submodule, and a second extraction submodule, wherein:
the first statistical submodule is used for counting pulse signals appearing at each spatial position according to the quadruple corresponding to each pulse signal;
the second statistical submodule is used for counting the number of pulse signals appearing at each spatial position and sequentially storing the pulse signals into a histogram with the same resolution as that of the pulse sequence;
the first extraction submodule is used for extracting the time information in the quadruple corresponding to the pulse signal appearing at each spatial position to obtain a time information string corresponding to each spatial position;
and the second extraction submodule is used for extracting the polarity information in the quadruple corresponding to the pulse signal appearing at each spatial position to obtain a polarity information string corresponding to each spatial position.
According to an embodiment of the application, a compression module comprises: a first compression sub-module, a second compression sub-module, and a third compression sub-module, wherein:
the first compression submodule is used for scanning the number of pulse signals appearing at each spatial position in the histogram line by line to obtain a signal number string, and coding the signal number string according to a preset coding method to obtain a corresponding spatial information code stream;
the second compression submodule is used for processing the time information string obtained by the first extraction submodule in different modes, coding the processed time information string according to a preset coding method respectively to obtain different code streams, and selecting an optimal code stream from the obtained different code streams as a time information code stream;
the third compression submodule is used for processing the polarity information string obtained by the second extraction submodule in different modes, coding the processed polarity information string according to a preset coding method respectively to obtain different code streams, and selecting an optimal code stream from the obtained different code streams as a polarity information code stream;
correspondingly, the output module is specifically configured to output the spatial information code stream obtained by the first compression sub-module, the time information code stream obtained by the second compression sub-module, and the polarity information code stream obtained by the third compression sub-module.
According to an embodiment of the present application, the second compression submodule is specifically configured to process the time information string obtained by the first extraction submodule by using at least two of the following processing manners:
carrying out primary difference operation on the time information strings corresponding to the spatial positions to obtain first to-be-coded strings corresponding to the spatial positions;
carrying out differential operation twice on the time information strings corresponding to the spatial positions to obtain second to-be-coded strings corresponding to the spatial positions;
and carrying out primary difference operation on the time information strings corresponding to the spatial positions to obtain first strings to be coded corresponding to the spatial positions, and combining the first strings to be coded to obtain a third string to be coded.
According to an embodiment of the present application, the third compression sub-module is specifically configured to process the polarity information string obtained by the second extraction sub-module by using at least two of the following processing manners:
combining continuous same polarity information in the polarity information strings corresponding to the spatial positions to obtain first coding pairs corresponding to the spatial positions;
merging the polarity information strings corresponding to the spatial positions to obtain a polarity information sequence;
and combining the polarity information strings corresponding to the spatial positions to obtain a polarity information sequence, and combining the continuous same polarity information in the polarity information sequence to obtain a second coding pair.
It is emphasized that, as will be appreciated by those skilled in the art, any one or both of spatial information, temporal information, and polarity information of a pulse sequence may be compressed, and accordingly, the apparatus may include the above-described corresponding modules.
According to an embodiment of the present application, there is also provided a compression apparatus of a pulse sequence, including:
one or more processors, a storage device storing one or more programs, which when executed by the one or more processors, implement a method as described in embodiment one of the present application.
According to an embodiment of the present application, a computer-readable storage medium is further proposed, on which a computer program is stored, which, when being executed by a processor, implements the method according to the first embodiment of the present application.
It should be noted that, in the present specification, all the embodiments are described in a related manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. Especially for the device embodiment, since it is basically similar to the method embodiment, the description is simple, and the relevant points can be referred to the partial description of the method embodiment.
In the pulse sequence, the pulse signals are arranged according to the increasing sequence of the time information, so that the arrangement of the pulse signals in the same time t cannot influence the playing, viewing and other processes of the pulse sequence.
The above description is only for the preferred embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (6)

1. A method of compressing a pulse train, comprising:
the method comprises the steps of counting spatial information, and/or time information, and/or polarity information of a pulse sequence, wherein the pulse sequence is acquired by a dynamic vision sensor and comprises a pulse signal sequence, each pulse signal is represented by a corresponding quadruple, the quadruple comprises time information generated by the pulse signal, spatial position information at the moment corresponding to the time information, and polarity information, and the polarity information represents brightness change information of the pulse signal;
wherein, the spatial information, and/or the temporal information, and/or the polarity information of the statistical pulse sequence includes:
counting the number of pulse signals appearing at each spatial position according to the quadruple corresponding to each pulse signal, and sequentially storing the pulse signals into a histogram with the same resolution as the pulse sequence; and/or the presence of a gas in the gas,
extracting time information in quadruples corresponding to pulse signals appearing at each spatial position to obtain time information strings corresponding to each spatial position; and/or the presence of a gas in the gas,
extracting polarity information in quadruples corresponding to pulse signals appearing at each spatial position to obtain a polarity information string corresponding to each spatial position;
compressing the spatial information, and/or the time information, and/or the polarity information respectively to obtain corresponding code streams; compressing the spatial information, the time information, and/or the polarity information respectively to obtain corresponding code streams, including:
scanning the number of pulse signals appearing at each spatial position in the histogram line by line to obtain a signal number string, and coding the signal number string according to a preset coding method to obtain a corresponding spatial information code stream; and/or the presence of a gas in the gas,
processing the time information string in different modes, coding the processed time information string according to a preset coding method respectively to obtain different code streams, and selecting an optimal code stream from the obtained different code streams as a time information code stream; and/or the presence of a gas in the gas,
processing the polarity information string in different modes, coding the processed polarity information string according to a preset coding method respectively to obtain different code streams, and selecting an optimal code stream from the obtained different code streams as a polarity information code stream;
outputting the compressed code stream; wherein, the code stream obtained by the output compression comprises: and outputting the spatial information code stream, and/or the time information code stream, and/or the polarity information code stream.
2. The method of claim 1, wherein the processing the time information string in different manners includes at least two of the following processing manners:
carrying out primary difference operation on the time information strings corresponding to the spatial positions to obtain first to-be-coded strings corresponding to the spatial positions;
carrying out differential operation twice on the time information strings corresponding to the spatial positions to obtain second to-be-coded strings corresponding to the spatial positions;
and carrying out primary difference operation on the time information strings corresponding to the spatial positions to obtain first strings to be coded corresponding to the spatial positions, and combining the first strings to be coded to obtain a third string to be coded.
3. The method according to claim 1, wherein the processing the polarity information string in different manners includes at least two of the following processing manners:
combining continuous same polarity information in the polarity information strings corresponding to the spatial positions to obtain first coding pairs corresponding to the spatial positions;
merging the polarity information strings corresponding to the spatial positions to obtain a polarity information sequence;
and combining the polarity information strings corresponding to the spatial positions to obtain a polarity information sequence, and combining the continuous same polarity information in the polarity information sequence to obtain a second coding pair.
4. A pulse train compression apparatus, comprising:
the pulse sequence is acquired by a dynamic visual sensor and comprises a pulse signal sequence, each pulse signal is represented by a corresponding quadruple, the quadruple comprises time information generated by the pulse signal, spatial position information at the corresponding moment of the time information and polarity information, and the polarity information represents brightness change information of the pulse signal; wherein the statistics module comprises: a statistics submodule and/or a first extraction submodule and/or a second extraction submodule;
the counting submodule is used for counting the number of the pulse signals appearing at each spatial position according to the quadruple corresponding to each pulse signal and sequentially storing the number of the pulse signals into a histogram with the same resolution as the pulse sequence;
the first extraction submodule is used for extracting the time information in the quadruple corresponding to the pulse signal appearing at each spatial position to obtain a time information string corresponding to each spatial position;
the second extraction submodule is used for extracting the polarity information in the quadruple corresponding to the pulse signal appearing at each spatial position to obtain a polarity information string corresponding to each spatial position;
the compression module is used for respectively compressing the spatial information, and/or the time information, and/or the polarity information counted by the counting module to obtain corresponding code streams; wherein the compression module comprises: a first compression sub-module, and/or a second compression sub-module, and/or a third compression sub-module;
the first compression submodule is used for scanning the number of pulse signals appearing at each spatial position in the histogram line by line to obtain a signal number string, and coding the signal number string according to a preset coding method to obtain a corresponding spatial information code stream;
the second compression submodule is used for processing the time information string obtained by the first extraction submodule in different modes, coding the processed time information string according to a preset coding method respectively to obtain different code streams, and selecting an optimal code stream from the obtained different code streams as a time information code stream;
the third compression submodule is used for processing the polarity information string obtained by the second extraction submodule in different modes, coding the processed polarity information string according to a preset coding method respectively to obtain different code streams, and selecting an optimal code stream from the obtained different code streams as a polarity information code stream;
the output module is used for outputting the code stream obtained by the compression module; the output module is specifically configured to output the spatial information code stream obtained by the first compression sub-module, the time information code stream obtained by the second compression sub-module, and the polarity information code stream obtained by the third compression sub-module.
5. The apparatus according to claim 4, wherein the second compression submodule is specifically configured to process the time information string obtained by the first extraction submodule by using at least two of the following processing manners:
carrying out primary difference operation on the time information strings corresponding to the spatial positions to obtain first to-be-coded strings corresponding to the spatial positions;
carrying out differential operation twice on the time information strings corresponding to the spatial positions to obtain second to-be-coded strings corresponding to the spatial positions;
and carrying out primary difference operation on the time information strings corresponding to the spatial positions to obtain first strings to be coded corresponding to the spatial positions, and combining the first strings to be coded to obtain a third string to be coded.
6. The apparatus according to claim 4, wherein the third compression sub-module is specifically configured to process the polarity information string obtained by the second extraction sub-module by at least two of the following processing manners:
combining continuous same polarity information in the polarity information strings corresponding to the spatial positions to obtain first coding pairs corresponding to the spatial positions;
merging the polarity information strings corresponding to the spatial positions to obtain a polarity information sequence;
and combining the polarity information strings corresponding to the spatial positions to obtain a polarity information sequence, and combining the continuous same polarity information in the polarity information sequence to obtain a second coding pair.
CN201811202824.1A 2018-10-16 2018-10-16 Pulse sequence compression method and device Active CN109525848B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811202824.1A CN109525848B (en) 2018-10-16 2018-10-16 Pulse sequence compression method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811202824.1A CN109525848B (en) 2018-10-16 2018-10-16 Pulse sequence compression method and device

Publications (2)

Publication Number Publication Date
CN109525848A CN109525848A (en) 2019-03-26
CN109525848B true CN109525848B (en) 2020-10-16

Family

ID=65772240

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811202824.1A Active CN109525848B (en) 2018-10-16 2018-10-16 Pulse sequence compression method and device

Country Status (1)

Country Link
CN (1) CN109525848B (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8467623B2 (en) * 2010-03-26 2013-06-18 Brain Corporation Invariant pulse latency coding systems and methods systems and methods
CN105681787B (en) * 2016-01-22 2019-01-18 北京大学 The method and apparatus that space-time signal is encoded
US9934557B2 (en) * 2016-03-22 2018-04-03 Samsung Electronics Co., Ltd Method and apparatus of image representation and processing for dynamic vision sensor

Also Published As

Publication number Publication date
CN109525848A (en) 2019-03-26

Similar Documents

Publication Publication Date Title
US8644626B2 (en) Method for storing and processing image sequence and method for compressing, storing and processing image sequence
EP2224357A1 (en) Video segmentation
US9516197B2 (en) Apparatus and method for lossless compression of raw color sensor data from a color array filtered image sensor
JP2007060392A (en) Image storage device and method
CN101287089B (en) Image capturing apparatus, image processing apparatus and control methods thereof
CN103475935A (en) Method and device for retrieving video segments
US20210021772A1 (en) Appratus for encoding image, apparatus for decoding image and image sensor
JP7479137B2 (en) Signal processing device, signal processing method, system, and program
CN103702133A (en) Image compression display method and image compression display device
CN109660762A (en) Size figure correlating method and device in intelligent candid device
CN105163122B (en) A kind of compression of images and decompression method based on image block similarity
CN109525848B (en) Pulse sequence compression method and device
US8520742B2 (en) Moving image compression-coding device, method of compression-coding moving image, and H.264 moving image compression-coding device
WO2018068250A1 (en) Method and device for data processing, chip and camera
US7269341B2 (en) Adaptive digital video recorder and method of controlling the same
CN109819251B (en) Encoding and decoding method of pulse array signal
CN109561313B (en) Pulse sequence compression method and device based on block
CN108184113B (en) Image compression coding method and system based on inter-image reference
CN113453070A (en) Video key frame compression method and device, storage medium and electronic equipment
WO2022091826A1 (en) Solid-state imaging device and electronic instrument
CN112218093B (en) Light field image viewpoint scanning method based on viewpoint quality
WO2023160789A1 (en) Context-based lossless image compression for event camera
WO2024012685A1 (en) Event frame lossless compression frameworks, and memory-efficient representations for random access to event frame pixels
WO2024088515A1 (en) Low-complexity lossless compression of asynchronous event sequences
JP2637976B2 (en) Block encoding decoding device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant