[go: up one dir, main page]

CN112887723A - Two-dimensional stream data compression storage method in any shape - Google Patents

Two-dimensional stream data compression storage method in any shape Download PDF

Info

Publication number
CN112887723A
CN112887723A CN202110251897.5A CN202110251897A CN112887723A CN 112887723 A CN112887723 A CN 112887723A CN 202110251897 A CN202110251897 A CN 202110251897A CN 112887723 A CN112887723 A CN 112887723A
Authority
CN
China
Prior art keywords
amxn
dimensional
compression
data
stream data
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.)
Pending
Application number
CN202110251897.5A
Other languages
Chinese (zh)
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202110251897.5A priority Critical patent/CN112887723A/en
Publication of CN112887723A publication Critical patent/CN112887723A/en
Pending legal-status Critical Current

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/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/172Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression

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

本发明公开了一种任意形状的二维流数据压缩存储方法,包括截取当前二维流数据中长度为T的一个片段记为Seq,从所述Seq包括的时刻中随机抽取K个时刻,根据这K个时刻从Seq中抽取这些时刻对应的二维数据帧构成二维数据帧集合Seqk;将二维数据帧集合中相邻两个二维数据帧两两作差,获取包括K‑1个差值矩阵的差值矩阵集合,并对其求和获取和矩阵;利用和矩阵中数值为0的元素,获取二维流数据中任意形状的稳态区域;利用和矩阵中数值非0的元素,获取二维流数据中任意形状的流变区域;利用稳态区域和流变区域,实现二维流数据的分区压缩。优点是:通过对二维流数据进行处理,识别出二维数据中的稳态区域和流变区域,实现二维数据流的分区压缩,提升压缩率。

Figure 202110251897

The invention discloses a method for compressing and storing two-dimensional stream data of arbitrary shape, which comprises intercepting a segment with a length of T in current two-dimensional stream data and recording it as Seq, randomly extracting K moments from the moments included in the Seq, and according to The two-dimensional data frames corresponding to these moments are extracted from Seq to form a two-dimensional data frame set Seqk; two adjacent two-dimensional data frames in the two-dimensional data frame set are differenced in pairs to obtain K-1 A set of difference matrices of difference matrices, and sum them to obtain a sum matrix; use the elements whose value is 0 in the sum matrix to obtain a stable region of any shape in the two-dimensional flow data; use the elements of the sum matrix whose value is not 0 , obtain the rheological region of any shape in the two-dimensional flow data; use the steady-state region and the rheological region to realize the partition compression of the two-dimensional flow data. The advantages are: by processing the two-dimensional stream data, the steady-state region and the rheological region in the two-dimensional data can be identified, the partition compression of the two-dimensional data stream can be realized, and the compression rate can be improved.

Figure 202110251897

Description

Two-dimensional stream data compression storage method in any shape
Technical Field
The invention relates to the technical field of data compression and storage, in particular to a two-dimensional stream data compression and storage method in any shape.
Background
The satellite remote sensing data is two-dimensional image data, the data volume of each frame is large, the data volume is streaming data, the frame number is more and more right along with the time, and the data volume is also extremely large along with the time; therefore, an effective data compression and storage method is needed, and the currently common data compression and storage method is lossless compression, that is, data of two frames before and after are stored into one frame, so as to realize data compression.
Under the condition that the stream data is changed continuously, the image frames are different continuously, the compression ratio of the method is reduced, and the effect is poor. Furthermore, this approach presents problems in processing the remotely sensed data. For example, the traffic remote sensing big data has a road in the picture, the traffic flow image data on the road is continuously transformed, but the scene around the road is not changed, at this time, because partial contents in two continuous frames of pictures are inconsistent, the situation can not be processed by lossless compression.
Disclosure of Invention
The invention aims to provide a method for compressing and storing two-dimensional stream data in any shape, thereby solving the problems in the prior art.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
a two-dimensional stream data compression storage method of arbitrary shape comprises the following steps,
s1, setting a parameter T, extracting a segment with a length T from the current two-dimensional stream data, where the segment is denoted as Seq ═ Amxn (T ═ 1), Amxn (T ═ 2), Amxn (T ═ 3), …, Amxn (T ═ T) >, randomly extracting K times { r1, r2, …, rk } from times {1,2,3, …, T } included in the two-dimensional stream data Seq, and extracting two-dimensional data frames corresponding to these times from the two-dimensional stream data Seq according to the K times to form a two-dimensional data frame set Seqk ═ Amxn (T ═ r1), Amxn (T ═ r2), Amxn (T ═ r3), …, Amxn (T ═ rk) >;
where mxn is the size of the two-dimensional data frame; a is a frame of two-dimensional data;
s2, performing pairwise difference between any two adjacent two-dimensional data frames in the two-dimensional data frame set Seqk, and obtaining a difference matrix set Sub (Sub2, Sub3, …, Sub) including K-1 difference matrices;
Subi=|Amxn(t=ri-1)-Amxn(t=ri)|
Subi(a,b)=|Amxn(t=ri-1)(a,b)-Amxn(t=ri)(a,b)|
wherein Subi (a, b) is the row a and column b elements of the difference matrix Subi; amxn (t-ri-1) (a, b) is the row a, column b element of the two-dimensional data frame Amxn (t-ri-1); amxn (t ═ ri) (a, b) is the row a, column b element of the two-dimensional data frame Amxn (t ═ ri);
s3, summing the difference matrix set Sub to obtain a Sum matrix Sum;
Sum=Sub2+Sub3+…+Subk
Sum(a,b)=Sub2(a,b)+Sub3(a,b)+…+Subk(a,b)
wherein Subi (a, b) is the row a and column b elements of the difference matrix Subi; sum (a, b) is the row a, column b element of the Sum matrix;
s4, acquiring a steady-state area with any shape in the two-dimensional stream data Seq by using the element with the value of 0 in the Sum matrix Sum; acquiring a rheological area with any shape in the two-dimensional stream data Seq by using elements with the numerical value of the Sum matrix Sum being not 0;
and S5, realizing the partition compression of the two-dimensional stream data Seq by utilizing the steady-state area and the rheological area in the identified two-dimensional stream data Seq.
Preferably, step S5 includes the following,
s51, constructing a compression mother matrix ZIP by using the Sum matrix Sum;
setting the Count to be 0, and performing two-dimensional scanning on a Sum matrix Sum according to a from 1 to m and b from 1 to n; if the row a and column b elements of the Sum matrix Sum are not equal to 0, Count is equal to Count +1, and the row a and column b elements of the compression mother matrix ZIP are equal to Count; if the row a and column b elements of the Sum matrix Sum are equal to 0, the row a and column b elements of the compression mother matrix ZIP are equal to 0;
and the number of the elements of which the median value is greater than 0 in the compressed mother matrix ZIP is equal to the number of the elements of which the median value is greater than 0 after the compressed mother matrix ZIP is constructed, and the number is marked as Q.
S52, compressing the two-dimensional stream data Seq using the compression mother matrix ZIP to obtain compressed two-dimensional stream data YSeq, YSeq ═ YA (T ═ 1), YA (T ═ 2), YA (T ═ 3), …, YA (T ═ T) >;
where YA (t ═ 1) ═ Amxn (t ═ 1) is a two-dimensional array of size equal to mxn;
YA (t ═ 2) is a one-dimensional array of length Q; the method for setting each element value in YA (t ═ 2) is as follows:
performing two-dimensional scanning on the compressed mother matrixes ZIP and Amxn (t is 2) simultaneously according to the sequence of a from 1 to m and b from 1 to n;
if the element of the current position (a, b) of the compressed parent matrix ZIP is Count (Count is greater than 0), assigning the element value of the same position (a, b) in Amxn (t ═ 2) to the Count-th element in YA (t ═ 2);
analogizing YA (T ═ 2), obtaining YA (T ═ 3), …, YA (T ═ T) from compression mother matrices ZIP and Amxn (T ═ 3), …, Amxn (T ═ T);
s53, deleting the two-dimensional stream data Seq, and storing a compressed mother matrix ZIP and the compressed two-dimensional stream data YSeq;
s54, when the two-dimensional stream data Seq is needed, the stored compressed mother matrix ZIP and the compressed two-dimensional stream data YSeq are read to restore the data.
Preferably, the specific process of restoring the original two-dimensional stream data Seq using the stored compressed mother matrix ZIP and the compressed two-dimensional stream data YSeq is,
let Amxn (T ═ 1), Amxn (T ═ 2), Amxn (T ═ 3), …, Amxn (T ═ T) be a two-dimensional array of size mxn in the original two-dimensional stream data Seq;
the first two-dimensional data Amxn (t ═ 1) is equal to YA (t ═ 1), that is, Amxn (t ═ 1) ═ YA (t ═ 1);
the element value of the second two-dimensional data Amxn (t ═ 2) is set by:
two-dimensional scanning is carried out on the compressed mother matrix ZIP according to the sequence that a is from 1 to m and b is from 1 to n;
if the element value of the current position (a, b) of the compression parent matrix ZIP is 0, assigning the element value of the same position (a, b) in Amxn (t ═ 1) to the element in the same position (a, b) in Amxn (t ═ 2);
if the element value of the current position (a, b) of the compressed mother matrix ZIP is Count (Count is greater than 0), assigning the element value of the Count in YA (t ═ 2) to the element in the same position (a, b) in Amxn (t ═ 2);
analogizing Amxn (T ═ 2), Amxn (T ═ 3), …, Amxn (T ═ T) are obtained from Amxn (T ═ 1), compression mother matrices ZIP and YA (T ═ 3), …, YA (T ═ T).
Preferably, the value of K is
Figure BDA0002966399730000031
If K is equal to T, the compression is lossless compression; if K is less than T, it indicates that the compression is lossy compression.
Preferably, the value T in step S1 can be dynamically adjusted according to the minimum compression ratio ZR required by the user, and the adjusting process is,
any given initial value of T;
calculating a compression rate ZRC under the current T value, if the ZRC is lower than ZR, reducing the T value by 10%, namely T is Tx0.9, and performing data compression of the next round; if ZR is higher than ZR, the value of T is increased by 10%, i.e., T is tx1.1, and the next round of data compression is performed.
Preferably, the compression ratio ZRC at the current value of T is calculated by,
for original two-dimensional stream data Seq, Txmxn data points exist when not compressed;
the compressed mother matrix ZIP has mxn data points; YA (t ═ 1) has mxn data points; YA (T ═ 2), YA (T ═ 3), …, YA (T ═ T) share Qx (T-1) data points; the compressed two-dimensional stream data Seq has 2xmxn + Qx (T-1) data points;
the compression ratio is zr ═ 2xmxn + Qx (T-1) ]/(Txmxn).
The invention has the beneficial effects that: 1. by processing the two-dimensional stream data, a steady-state area and a rheological area in the two-dimensional data are identified, the partition compression of the two-dimensional data stream is realized, and the compression rate is improved. 2. By adjusting the time parameter, lossless compression and lossy compression can be simultaneously realized, and the method can adapt to various different compression scenes.
Drawings
FIG. 1 is a flowchart illustrating a compressed storage method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the invention, are intended for purposes of illustration only and are not intended to limit the scope of the invention.
As shown in fig. 1, in the present embodiment, there is provided a two-dimensional stream data compression storage method in an arbitrary shape, including the following steps,
s1, setting a parameter T, extracting a segment with a length T from the current two-dimensional stream data, where the segment is denoted as Seq ═ Amxn (T ═ 1), Amxn (T ═ 2), Amxn (T ═ 3), …, Amxn (T ═ T) >, randomly extracting K times { r1, r2, …, rk } from times {1,2,3, …, T } included in the two-dimensional stream data Seq, and extracting two-dimensional data frames corresponding to these times from the two-dimensional stream data Seq according to the K times to form a two-dimensional data frame set Seqk ═ Amxn (T ═ r1), Amxn (T ═ r2), Amxn (T ═ r3), …, Amxn (T ═ rk) >;
where mxn is the size of the two-dimensional data frame; a is a frame of two-dimensional data;
s2, performing pairwise difference between any two adjacent two-dimensional data frames in the two-dimensional data frame set Seqk, and obtaining a difference matrix set Sub (Sub2, Sub3, …, Sub) including K-1 difference matrices;
Subi=|Amxn(t=ri-1)-Amxn(t=ri)|
Subi(a,b)=|Amxn(t=ri-1)(a,b)-Amxn(t=ri)(a,b)|
wherein Subi (a, b) is the row a and column b elements of the difference matrix Subi; amxn (t-ri-1) (a, b) is the row a, column b element of the two-dimensional data frame Amxn (t-ri-1); amxn (t ═ ri) (a, b) is the row a, column b element of the two-dimensional data frame Amxn (t ═ ri);
s3, summing the difference matrix set Sub to obtain a Sum matrix Sum;
Sum=Sub2+Sub3+…+Subk
Sum(a,b)=Sub2(a,b)+Sub3(a,b)+…+Subk(a,b)
wherein Subi (a, b) is the row a and column b elements of the difference matrix Subi; sum (a, b) is the row a, column b element of the Sum matrix;
s4, acquiring a steady-state area with any shape in the two-dimensional stream data Seq by using the element with the value of 0 in the Sum matrix Sum; acquiring a rheological area with any shape in the two-dimensional stream data Seq by using elements with the numerical value of the Sum matrix Sum being not 0;
and S5, realizing the partition compression of the two-dimensional stream data Seq by utilizing the steady-state area and the rheological area in the identified two-dimensional stream data Seq.
In this embodiment, step S5 includes the following steps,
s51, constructing a compression mother matrix ZIP by using the Sum matrix Sum;
setting the Count to be 0, and performing two-dimensional scanning on a Sum matrix Sum according to a from 1 to m and b from 1 to n; if the row a and column b elements of the Sum matrix Sum are not equal to 0, Count is equal to Count +1, and the row a and column b elements of the compression mother matrix ZIP are equal to Count; if the row a and column b elements of the Sum matrix Sum are equal to 0, the row a and column b elements of the compression mother matrix ZIP are equal to 0;
and the number of the elements of which the median value is greater than 0 in the compressed mother matrix ZIP is equal to the number of the elements of which the median value is greater than 0 after the compressed mother matrix ZIP is constructed, and the number is marked as Q.
S52, compressing the two-dimensional stream data Seq using the compression mother matrix ZIP to obtain compressed two-dimensional stream data YSeq, YSeq ═ YA (T ═ 1), YA (T ═ 2), YA (T ═ 3), …, YA (T ═ T) >;
where YA (t ═ 1) ═ Amxn (t ═ 1) is a two-dimensional array of size equal to mxn;
YA (t ═ 2) is a one-dimensional array of length Q; the method for setting each element value in YA (t ═ 2) is as follows:
performing two-dimensional scanning on the compressed mother matrixes ZIP and Amxn (t is 2) simultaneously according to the sequence of a from 1 to m and b from 1 to n;
if the element of the current position (a, b) of the compressed parent matrix ZIP is Count (Count is greater than 0), assigning the element value of the same position (a, b) in Amxn (t ═ 2) to the Count-th element in YA (t ═ 2);
analogizing YA (T ═ 2), obtaining YA (T ═ 3), …, YA (T ═ T) from compression mother matrices ZIP and Amxn (T ═ 3), …, Amxn (T ═ T);
s53, deleting the two-dimensional stream data Seq, and storing a compressed mother matrix ZIP and the compressed two-dimensional stream data YSeq;
s54, when the two-dimensional stream data Seq is needed, the stored compressed mother matrix ZIP and the compressed two-dimensional stream data YSeq are read to restore the data.
The specific process of recovering the original two-dimensional stream data Seq by using the stored compressed mother matrix ZIP and the compressed two-dimensional stream data YSeq is,
let Amxn (T ═ 1), Amxn (T ═ 2), Amxn (T ═ 3), …, Amxn (T ═ T) be a two-dimensional array of size mxn in the original two-dimensional stream data Seq;
the first two-dimensional data Amxn (t ═ 1) is equal to YA (t ═ 1), that is, Amxn (t ═ 1) ═ YA (t ═ 1);
the element value of the second two-dimensional data Amxn (t ═ 2) is set by:
two-dimensional scanning is carried out on the compressed mother matrix ZIP according to the sequence that a is from 1 to m and b is from 1 to n;
if the element value of the current position (a, b) of the compression parent matrix ZIP is 0, assigning the element value of the same position (a, b) in Amxn (t ═ 1) to the element in the same position (a, b) in Amxn (t ═ 2);
if the element value of the current position (a, b) of the compressed mother matrix ZIP is Count (Count is greater than 0), assigning the element value of the Count in YA (t ═ 2) to the element in the same position (a, b) in Amxn (t ═ 2);
analogizing Amxn (T ═ 2), Amxn (T ═ 3), …, Amxn (T ═ T) are obtained from Amxn (T ═ 1), compression mother matrices ZIP and YA (T ═ 3), …, YA (T ═ T).
In this embodiment, if K is equal to T, the compression of the present invention is lossless compression; if K is smaller than T, the compression of the patent is lossy compression; the smaller K, the greater the data distortion and the higher the compression ratio. To balance data distortion and compression ratio, it is proposed that K be set to the root T; namely, it is
Figure BDA0002966399730000061
Since the stream data can be assumed to be endless, T can be made very large. The larger T, the smaller the stability zone is clearly identified and the larger the rheological zone, so it is recommended that T need not be too large, for example 1000. By setting smaller T, the streaming data can be compressed in segments, and the compression rate is improved.
The value of T can be dynamically adjusted according to the lowest compression ratio ZR required by a user, the adjusting process is,
any given initial value of T; such as 100;
calculating a compression rate ZRC under the current T value, if the ZRC is lower than ZR, reducing the T value by 10%, namely T is Tx0.9, and performing data compression of the next round; the purpose of this step is: by reducing the length of the two-dimensional flow data fragment, the local data repetition probability is improved, and the data compression rate can be increased;
if ZRC is higher than ZR, increasing the value of T by 10%, namely T is Tx1.1, and performing the next round of data compression; the purpose of this step is: by increasing the length of the two-dimensional stream data fragment, the number of compressed parent matrixes ZIP is reduced, and the storage space is saved.
In this embodiment, if the two-dimensional stream data Seq is not compressed, < Amxn (T ═ 1), Amxn (T ═ 2), Amxn (T ═ 3), …, Amxn (T ═ T) >, Seq has Txmxn data points; according to the compression method of the present invention, it is only necessary to store the compressed mother matrix ZIP and the compressed two-dimensional stream data YSeq ═ YA (T ═ 1), YA (T ═ 2), YA (T ═ 3), …, YA (T ═ T) >.
Specifically, with the compression method of the present invention, the compression ratio ZRC under the current T value is calculated by,
for original two-dimensional stream data Seq, Txmxn data points exist when not compressed;
the compressed mother matrix ZIP has mxn data points; YA (t ═ 1) has mxn data points; YA (T ═ 2), YA (T ═ 3), …, YA (T ═ T) share Qx (T-1) data points; the compressed two-dimensional stream data Seq has 2xmxn + Qx (T-1) data points;
the compression ratio is zr ═ 2xmxn + Qx (T-1) ]/(Txmxn).
When the method of the invention is applied to realize compression storage of remote sensing image data, if the amount of sensor univariate flow data is 10000 data points for example, a 100x100 two-dimensional frame can be constructed by the method of the invention and then compressed for storage.
By adopting the technical scheme disclosed by the invention, the following beneficial effects are obtained:
the invention provides a two-dimensional stream data compression and storage method in any shape, which is characterized in that a stable area and a rheological area in two-dimensional data are identified by processing the two-dimensional stream data, so that the partition compression of the two-dimensional data stream is realized, and the compression rate is improved. By adjusting the time parameter, lossless compression and lossy compression can be simultaneously realized, and the method can adapt to various different compression scenes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and improvements can be made without departing from the principle of the present invention, and such modifications and improvements should also be considered within the scope of the present invention.

Claims (6)

1. A two-dimensional stream data compression storage method of any shape is characterized in that: comprises the following steps of (a) carrying out,
s1, setting a parameter T, extracting a segment with a length T from the current two-dimensional stream data, where the segment is denoted as Seq ═ Amxn (T ═ 1), Amxn (T ═ 2), Amxn (T ═ 3), …, Amxn (T ═ T) >, randomly extracting K times { r1, r2, …, rk } from times {1,2,3, …, T } included in the two-dimensional stream data Seq, and extracting two-dimensional data frames corresponding to these times from the two-dimensional stream data Seq according to the K times to form a two-dimensional data frame set Seqk ═ Amxn (T ═ r1), Amxn (T ═ r2), Amxn (T ═ r3), …, Amxn (T ═ rk) >;
where mxn is the size of the two-dimensional data frame; a is a frame of two-dimensional data;
s2, performing pairwise difference between any two adjacent two-dimensional data frames in the two-dimensional data frame set Seqk, and obtaining a difference matrix set Sub (Sub2, Sub3, …, Sub) including K-1 difference matrices;
Subi=|Amxn(t=ri-1)-Amxn(t=ri)|
Subi(a,b)=|Amxn(t=ri-1)(a,b)-Amxn(t=ri)(a,b)|
wherein Subi (a, b) is the row a and column b elements of the difference matrix Subi; amxn (t-ri-1) (a, b) is the row a, column b element of the two-dimensional data frame Amxn (t-ri-1); amxn (t ═ ri) (a, b) is the row a, column b element of the two-dimensional data frame Amxn (t ═ ri);
s3, summing the difference matrix set Sub to obtain a Sum matrix Sum;
Sum=Sub2+Sub3+…+Subk
Sum(a,b)=Sub2(a,b)+Sub3(a,b)+…+Subk(a,b)
wherein Subi (a, b) is the row a and column b elements of the difference matrix Subi; sum (a, b) is the row a, column b element of the Sum matrix;
s4, acquiring a steady-state area with any shape in the two-dimensional stream data Seq by using the element with the value of 0 in the Sum matrix Sum; acquiring a rheological area with any shape in the two-dimensional stream data Seq by using elements with the numerical value of the Sum matrix Sum being not 0;
and S5, realizing the partition compression of the two-dimensional stream data Seq by utilizing the steady-state area and the rheological area in the identified two-dimensional stream data Seq.
2. The two-dimensional stream data compression storage method of an arbitrary shape according to claim 1, characterized in that: the step S5 includes the following contents,
s51, constructing a compression mother matrix ZIP by using the Sum matrix Sum;
setting the Count to be 0, and performing two-dimensional scanning on a Sum matrix Sum according to a from 1 to m and b from 1 to n; if the row a and column b elements of the Sum matrix Sum are not equal to 0, Count is equal to Count +1, and the row a and column b elements of the compression mother matrix ZIP are equal to Count; if the row a and column b elements of the Sum matrix Sum are equal to 0, the row a and column b elements of the compression mother matrix ZIP are equal to 0;
and the number of the elements of which the median value is greater than 0 in the compressed mother matrix ZIP is equal to the number of the elements of which the median value is greater than 0 after the compressed mother matrix ZIP is constructed, and the number is marked as Q.
S52, compressing the two-dimensional stream data Seq using the compression mother matrix ZIP to obtain compressed two-dimensional stream data YSeq, YSeq ═ YA (T ═ 1), YA (T ═ 2), YA (T ═ 3), …, YA (T ═ T) >;
where YA (t ═ 1) ═ Amxn (t ═ 1) is a two-dimensional array of size equal to mxn;
YA (t ═ 2) is a one-dimensional array of length Q; the method for setting each element value in YA (t ═ 2) is as follows:
performing two-dimensional scanning on the compressed mother matrixes ZIP and Amxn (t is 2) simultaneously according to the sequence of a from 1 to m and b from 1 to n;
if the element of the current position (a, b) of the compressed parent matrix ZIP is Count (Count is greater than 0), assigning the element value of the same position (a, b) in Amxn (t ═ 2) to the Count-th element in YA (t ═ 2);
analogizing YA (T ═ 2), obtaining YA (T ═ 3), …, YA (T ═ T) from compression mother matrices ZIP and Amxn (T ═ 3), …, Amxn (T ═ T);
s53, deleting the two-dimensional stream data Seq, and storing a compressed mother matrix ZIP and the compressed two-dimensional stream data YSeq;
s54, when the two-dimensional stream data Seq is needed, the stored compressed mother matrix ZIP and the compressed two-dimensional stream data YSeq are read to restore the data.
3. The two-dimensional stream data compression storage method of an arbitrary shape according to claim 2, characterized in that: the specific process of recovering the original two-dimensional stream data Seq by using the stored compressed mother matrix ZIP and the compressed two-dimensional stream data YSeq is,
let Amxn (T ═ 1), Amxn (T ═ 2), Amxn (T ═ 3), …, Amxn (T ═ T) be a two-dimensional array of size mxn in the original two-dimensional stream data Seq;
the first two-dimensional data Amxn (t ═ 1) is equal to YA (t ═ 1), that is, Amxn (t ═ 1) ═ YA (t ═ 1);
the element value of the second two-dimensional data Amxn (t ═ 2) is set by:
two-dimensional scanning is carried out on the compressed mother matrix ZIP according to the sequence that a is from 1 to m and b is from 1 to n;
if the element value of the current position (a, b) of the compression parent matrix ZIP is 0, assigning the element value of the same position (a, b) in Amxn (t ═ 1) to the element in the same position (a, b) in Amxn (t ═ 2);
if the element value of the current position (a, b) of the compressed mother matrix ZIP is Count (Count is greater than 0), assigning the element value of the Count in YA (t ═ 2) to the element in the same position (a, b) in Amxn (t ═ 2);
analogizing Amxn (T ═ 2), Amxn (T ═ 3), …, Amxn (T ═ T) are obtained from Amxn (T ═ 1), compression mother matrices ZIP and YA (T ═ 3), …, YA (T ═ T).
4. The two-dimensional stream data compression storage method of an arbitrary shape according to claim 3, characterized in that: the value of K is
Figure FDA0002966399720000031
If K is equal to T, the compression is lossless compression; if K is less than T, it indicates that the compression is lossy compression.
5. The two-dimensional stream data compression storage method of an arbitrary shape according to claim 4, characterized in that: the value T in step S1 can be dynamically adjusted according to the minimum compression ratio ZR required by the user, and the adjusting process is,
any given initial value of T;
calculating a compression rate ZRC under the current T value, if the ZRC is lower than ZR, reducing the T value by 10%, namely T is Tx0.9, and performing data compression of the next round; if ZR is higher than ZR, the value of T is increased by 10%, i.e., T is tx1.1, and the next round of data compression is performed.
6. The two-dimensional stream data compression storage method of an arbitrary shape according to claim 5, characterized in that: the compression ratio zr at the current value of T is calculated by,
for original two-dimensional stream data Seq, Txmxn data points exist when not compressed;
the compressed mother matrix ZIP has mxn data points; YA (t ═ 1) has mxn data points; YA (T ═ 2), YA (T ═ 3), …, YA (T ═ T) share Qx (T-1) data points; the compressed two-dimensional stream data Seq has 2xmxn + Qx (T-1) data points;
the compression ratio is zr ═ 2xmxn + Qx (T-1) ]/(Txmxn).
CN202110251897.5A 2021-03-08 2021-03-08 Two-dimensional stream data compression storage method in any shape Pending CN112887723A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110251897.5A CN112887723A (en) 2021-03-08 2021-03-08 Two-dimensional stream data compression storage method in any shape

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110251897.5A CN112887723A (en) 2021-03-08 2021-03-08 Two-dimensional stream data compression storage method in any shape

Publications (1)

Publication Number Publication Date
CN112887723A true CN112887723A (en) 2021-06-01

Family

ID=76053771

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110251897.5A Pending CN112887723A (en) 2021-03-08 2021-03-08 Two-dimensional stream data compression storage method in any shape

Country Status (1)

Country Link
CN (1) CN112887723A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1074574A (en) * 1992-01-14 1993-07-21 国际商业机器公司 Digital video compression method and device
WO2014167730A1 (en) * 2013-04-12 2014-10-16 富士通株式会社 Compression device, compression method, and compression program
CN104778723A (en) * 2015-04-09 2015-07-15 海视英科光电(苏州)有限公司 Method for performing motion detection on infrared image with three-frame difference method
US20150296214A1 (en) * 2014-01-20 2015-10-15 Board Of Trustees Of Michigan State University Compression of image ensembles using tensor decomposition
CN110135269A (en) * 2019-04-18 2019-08-16 杭州电子科技大学 A fire image detection method based on mixed color model and neural network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1074574A (en) * 1992-01-14 1993-07-21 国际商业机器公司 Digital video compression method and device
WO2014167730A1 (en) * 2013-04-12 2014-10-16 富士通株式会社 Compression device, compression method, and compression program
US20150296214A1 (en) * 2014-01-20 2015-10-15 Board Of Trustees Of Michigan State University Compression of image ensembles using tensor decomposition
CN104778723A (en) * 2015-04-09 2015-07-15 海视英科光电(苏州)有限公司 Method for performing motion detection on infrared image with three-frame difference method
CN110135269A (en) * 2019-04-18 2019-08-16 杭州电子科技大学 A fire image detection method based on mixed color model and neural network

Similar Documents

Publication Publication Date Title
US11716476B2 (en) Lossless compression of digital images using prior image context
US20120257836A1 (en) Method for storing and processing image sequence and method for compressing, storing and processing image sequence
WO2020146911A2 (en) Multi-stage multi-reference bootstrapping for video super-resolution
KR20180000279A (en) Apparatus and method for encoding, apparatus and method for decoding
CN110852334B (en) Systems and methods for adaptive pixel filtering
US20250080727A1 (en) Video compression method and apparatus, video decompression method and apparatus, computer device, and storage medium
CN116152710A (en) A video instance segmentation method based on cross-frame instance association
JP2010283606A (en) Generator of data for error corrections, and generating method
CN112669234A (en) High-resolution image restoration method and system based on neural network
Gashnikov et al. Development and investigation of a hierarchical compression algorithm for storing hyperspectral images
CN112887723A (en) Two-dimensional stream data compression storage method in any shape
CN112668619B (en) Image processing method, device, terminal and storage medium
WO2024152811A1 (en) Image-sensor-based data processing method and apparatus, and image processing system
JP2008113292A (en) Motion estimation method and device, program thereof and recording medium thereof
CN112767293A (en) Method for acquiring parallax image, electronic device and storage medium
CN1633161A (en) A method for realizing integral multiple amplification of image
US20200304831A1 (en) Feature Encoding Based Video Compression and Storage
CN113033616B (en) High-quality video reconstruction method, device, equipment and storage medium
CN101547348B (en) Video coding and decoding method and video coding and decoding device
US12174922B2 (en) Method, computer program, computer program product and system for representing visual information
CN115604528A (en) Fisheye image compression method, fisheye video stream compression method and panoramic video generation method
JP4795141B2 (en) Video coding / synthesizing apparatus, video coding / synthesizing method, and video transmission system
US12073579B2 (en) Local light field flow as an alternative to plane-sweep volumes
US20240163479A1 (en) Entropy-Constrained Neural Video Representations
JP4759740B2 (en) Image processing apparatus and image processing method

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