A video compression method and system based on inter-frame correlation

By utilizing inter-frame correlation in video compression, classifying and allocating sampling rates, combined with bi-directional motion estimation and multi-hypothesis prediction, the problem of resource waste and high complexity of traditional methods is solved, and efficient video compression and reconstruction effects are achieved.

CN114173131BInactive Publication Date: 2024-09-17WUHAN FIBERHOME DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111407064.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-24
Publication Date
2024-09-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional video compression methods fail to effectively utilize inter-frame correlation when processing video signals, resulting in resource waste and high coding complexity, making it difficult to achieve efficient video transmission and storage.

Method used

A video compression method based on inter-frame correlation is proposed. By dividing the video sequence into picture groups, setting reference frames and non-reference frames for fixed high sampling rate sampling, classifying image blocks according to the degree of inter-frame changes, and assigning different Sampling rate, using bidirectional motion estimation and multi-hypothesis prediction for reconstruction, reducing the sampling rate and improving video quality.

Benefits of technology

It effectively improves the accuracy of image block classification, reduces the sampling rate of frames, improves the quality of video reconstruction, and achieves high-quality video reconstruction at a lower sampling rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114173131B
    Figure CN114173131B
Patent Text Reader

Abstract

A video compression method and system based on inter-frame correlation, the method comprising: dividing an input video sequence into a plurality of picture groups, each picture group comprising a plurality of frames; for each picture group, setting the first frame as a reference frame and the remaining frames as experimental frames, and sampling the reference frame at a fixed high sampling rate; performing the same non-overlapping block processing on the reference frame and the non-reference frame, and dividing each reference frame and the non-reference frame into a plurality of image blocks; for each image block of the non-reference frame, classifying the image blocks of the non-reference frame based on the degree of change of the image blocks corresponding to the reference frame, and assigning different sampling rates to image blocks of different categories; for the reference frame, directly reconstructing it, preprocessing the image blocks with a lower sampling rate, and then performing multi-hypothesis prediction to obtain a predicted frame, and then correcting the error between the predicted frame and the original frame by residual reconstruction to obtain a high-quality reconstructed frame, and finally correcting the reconstruction result by using bidirectional motion estimation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video compression, and in particular to a video compression system and method based on inter-frame correlation. Background Art

[0002] With the widespread popularity of the Internet and communication equipment, the network has become one of the important channels for people to obtain various types of information. Therefore, various multimedia applications have emerged one after another. In this process, network bandwidth affects the rate of information transmission, and the rate of information transmission is an important factor affecting people's experience quality, so streaming media technology came into being. However, due to factors such as huge data volume, high real-time requirements, fast data growth, and high query frequency, how to effectively compress streaming media videos to achieve information transmission and storage is a problem that needs to be solved urgently.

[0003] Traditional video compression sensing algorithms usually use the same measurement matrix to measure and reconstruct each frame of the image. In view of the obvious feature that video signals have strong inter-frame correlation, this paper proposes a video compression sensing scheme based on inter-frame correlation. The traditional Shannon sampling law adopts a signal acquisition method of sampling first and then compressing, which causes a waste of resources. The compressed sensing (CS) theory combines sampling and compression into one, which greatly reduces the complexity and resource waste of the encoding end. Therefore, it has been widely used in the field of video coding. This video coding scheme based on the compressed sensing theory is called the compressed video sensing (CVS) scheme. Summary of the invention

[0004] In view of the technical defects and technical drawbacks in the prior art, the embodiment of the present invention provides a video compression method based on inter-frame correlation to overcome the above problems or at least partially solve the above problems. The specific scheme is as follows:

[0005] As a first aspect of the present invention, a video compression method based on inter-frame correlation is provided, the method comprising:

[0006] Step 1, divide the input video sequence into several picture groups, each picture group contains multiple frames of pictures;

[0007] Step 2: For each picture group, set the first frame as the reference frame and the remaining frames as experimental frames, and sample the reference frame at a fixed high sampling rate;

[0008] Step 3, performing the same non-overlapping block processing on the reference frame and the non-reference frame, and dividing each reference frame and the non-reference frame into a plurality of image blocks;

[0009] Step 4, for each image block of the non-reference frame, classify the image blocks of the non-reference frame based on the degree of change of the image blocks corresponding to the reference frame, and assign different sampling rates to image blocks of different categories;

[0010] Step 5: For the reference frame, directly reconstruct it, preprocess the image blocks with lower sampling rate, and then perform multi-hypothesis prediction to obtain the predicted frame. Then, the error between the predicted frame and the original frame is corrected by residual reconstruction to obtain a high-quality reconstructed frame. Finally, bidirectional motion estimation is used to correct the reconstruction result.

[0011] Among them, the original frame is equivalent to the I frame in the video, and the subsequent P frames are all predicted frames based on the prediction of the I frame.

[0012] Furthermore, in step 4, the image blocks are classified specifically by calculating the residual energy difference between the corresponding image blocks of the reference frame and the non-reference frame, and dividing the image blocks into three types based on the residual energy difference, namely, basically unchanged blocks, slowly changing blocks and rapidly changing blocks.

[0013] Furthermore, each picture group includes three frames of pictures, the first frame is set as a reference frame, i.e., an I frame, the third frame is set as a forward prediction frame, i.e., a P frame; the second frame is set as a bidirectional prediction frame, i.e., a B frame, and the B frame, the P frame and the I frame are subjected to the same non-overlapping block processing, and are evenly divided into K D×D image blocks;

[0014] Classifying the image blocks of the non-reference frame based on the degree of change of the image blocks corresponding to the reference frame specifically includes:

[0015] For P-frames:

[0016] The residual energy difference between the original data of the i-th image block of the P frame Xt+1 and the image block at the corresponding position in the I frame Xt-1 reflects the correlation between the corresponding image blocks of the two frames. Therefore, the size of the residual energy difference between the corresponding image blocks can be used as the classification basis of the P frame image blocks, and its expression is as follows:

[0017]

[0018] That is, the motion characteristics of the current CU are determined by the mean of the square difference of the brightness pixel values ​​of the current depth CU and the coded CU at the corresponding position in the time domain, where 2N represents the size of the current CU and CU Cur(I,j) and CU Col(I,j) They represent the brightness pixel value at position (i, j) in the current and corresponding CU blocks in the time domain respectively. The larger the ASSD, the greater the difference between adjacent CUs in the time domain, which means the more intense the motion.

[0019] The ratio of the residual energy of the two image blocks to the energy of the reference image block is used as the evaluation criterion, and its expression is as follows:

[0020]

[0021] Among them, ASSDX represents the value of ASSD when the best depth in the encoded CU in the current frame is X (0-3), that is, ASSDX only considers the CU with the best coding depth of X, and the meanings of other parameters are the same as ASSD;

[0022] Because each measurement vector is a linear projection of the original signal data, and respectively represent and, that is, the ratio of the residual energy of the measurement vector to the measurement value energy of the reference image block is used as the image block classification decision criterion of the P frame, and its expression is as follows:

[0023] ThSkip=b×Ave(ASSD not X );

[0024] ThSkip represents the average ASSD of all CUs whose best depth in the encoded CU is greater than X. If the ASSD of the current CU block at depth X is greater than ThSkip, it means that the current CU block moves violently, so there is no need to calculate and judge the various PU prediction modes at depth X. It can directly jump to the next depth X+1 for CU judgment of a smaller size. In the formula, b is an adjustment parameter, which is 1.2 in this article. The larger the value, the larger the corresponding ThSkip.

[0025] For B-frames:

[0026] The correlation between the B frame and its two preceding and following frames is used to classify the image blocks; at this time, the measurement vectors obtained by pre-sampling the I frame and the P frame are respectively calculated to obtain the average values ​​of the two vectors, which is the ratio of the energy difference between the B frame measurement value and the average value to the average value energy calculated later, and the calculation formula is:

[0027] J(m,λ Motion )=SAD(s,c(m))+λ Motion R(mp);

[0028] Wherein, m = (mx, my)t is the motion vector, λmotion is the Lagrange multiplier factor, which is a constant and is related to the quantization parameter QP and the type of the block to be encoded, SAD is the sum of absolute errors, s represents the original video signal, c represents the decoded video signal, p = (px, py)t is the predicted motion vector, and R(mP) is the number of bits required to represent the motion vector difference;

[0029] The image blocks are divided into three categories according to the size of the e value: basically unchanged blocks, slowly changing blocks and rapidly changing blocks. The process is: first set two thresholds T1 and T2, T1<T2, and compare the obtained e value with the two thresholds. When e<T1, the block is judged as a basically unchanged block; when T1≤e≤T2, the image block is judged as a slowly changing block; when e>T2, the block is judged as a rapidly changing block.

[0030] Furthermore, the categories of the image blocks include basically unchanged blocks, slowly changing blocks and rapidly changing blocks, and the method further includes:

[0031] During the adaptive sampling rate measurement process, the corresponding sampling rates are S1, S2 and S3 respectively assigned to the basically unchanged blocks, slowly changing blocks and rapidly changing blocks, S1<S2<S3, and the sampling rate of the image blocks of the reference frame is also S3. Then the number of sampling points corresponding to the three types of image blocks are M1=S1·D2, M2=S2·D2 and M3 respectively, where D1 is the side length of the K image blocks generated after the reference frame is divided into blocks, and D2 represents the one-dimensional signal length of each image block arranged;

[0032] In step 5, for the reference frame, the BCS-SPL algorithm, i.e., the block image compressed sensing reconstruction method, is used for reconstruction; for the non-reference frame, the basic unchanged blocks and the slowly changing blocks are first preprocessed, and then multi-hypothesis prediction is performed to obtain the predicted frame, and then the error between the predicted frame and the original frame is corrected by residual reconstruction (the original frame mainly refers to the I frame, and the subsequent P frames are all predicted frames obtained based on the prediction of the I frame) to obtain a high-quality reconstructed frame, and finally the reconstruction result is corrected using bidirectional motion estimation.

[0033] Further, the process of the BCS-SPL algorithm is as follows:

[0034] A, use the minimum mean square error estimation MMSE to obtain the approximate solution of the original signal, that is, the initial solution x0 of the image (x0 = ΦTy);

[0035] B, use a 3×3 adaptive Wiener filter to reduce the image block effect caused by blocking and smooth the image;

[0036] C, project the filtered image block into the convex set, expressed as:

[0037] p(x,y,Φ)=x+ΦT(ΦΦT)-1(y-Φx);

[0038] When Φ is an orthogonal matrix, that is, ΦΦT=1, the above formula is simplified to:

[0039] p(x,y,Φ)=x+ΦT(y-Φx);

[0040] D, use the bivariate shrinkage threshold to filter the projection results to achieve the denoising process;

[0041] E, determine whether the iteration termination condition is met. If not, perform repeated iterations until the optimal solution is obtained. Set the maximum number of iterations, where x refers to the x-coordinate component vector of the pixel block, y refers to the y-coordinate component of the pixel block, T refers to the function formula for obtaining the reconstructed frame by BCS-SPL optimization, and Φ refers to the vector transformation formula between the original frame and the predicted frame.

[0042] As a second aspect of the present invention, there is provided a video compression system based on inter-frame correlation, the system comprising a grouping module, a frame classification module, a blocking module, a sampling rate allocation module and a reconstruction module;

[0043] The grouping module is used to divide the input video sequence into a number of picture groups, each picture group contains multiple frames of pictures;

[0044] The frame classification module is used to set the first frame as the reference frame and the remaining frames as experimental frames for each picture group, and perform fixed high sampling rate sampling on the reference frame;

[0045] The block division module is used to perform the same non-overlapping block division processing on the reference frame and the non-reference frame, and divide each reference frame and the non-reference frame into a plurality of image blocks;

[0046] The sampling rate allocation module is used to classify the image blocks of the non-reference frame based on the degree of change of the image blocks corresponding to the reference frame for each image block of the non-reference frame, and allocate different sampling rates to the image blocks of different categories;

[0047] The reconstruction module is used to directly reconstruct the reference frame, preprocess the image blocks with a lower sampling rate, and then perform multi-hypothesis prediction to obtain a predicted frame. The error between the predicted frame and the original frame is then corrected by residual reconstruction to obtain a high-quality reconstructed frame. Finally, the reconstruction result is corrected by using bidirectional motion estimation.

[0048] Furthermore, the image blocks are classified specifically as follows: the residual energy difference between the corresponding image blocks of the reference frame and the non-reference frame is calculated, and the image blocks are divided into three types based on the residual energy difference, namely, basically unchanged blocks, slowly changing blocks and rapidly changing blocks.

[0049] Furthermore, each picture group includes three frames of pictures, the first frame is set as a reference frame, i.e., an I frame, the third frame is set as a forward prediction frame, i.e., a P frame; the second frame is set as a bidirectional prediction frame, i.e., a B frame, and the B frame, the P frame and the I frame are subjected to the same non-overlapping block processing, and are evenly divided into K D×D image blocks;

[0050] Classifying the image blocks of the non-reference frame based on the degree of change of the image blocks corresponding to the reference frame specifically includes:

[0051] For P-frames:

[0052] The residual energy difference between the original data of the i-th image block of the P frame Xt+1 and the image block at the corresponding position in the I frame Xt-1 reflects the correlation between the corresponding image blocks of the two frames. Therefore, the size of the residual energy difference between the corresponding image blocks can be used as the classification basis of the P frame image blocks, and its expression is as follows:

[0053]

[0054] That is, the motion characteristics of the current CU are determined by the mean of the square difference of the brightness pixel values ​​of the current depth CU and the coded CU at the corresponding position in the time domain, where 2N represents the size of the current CU and CU Cur(I,j) and CU Col(I,j) They represent the brightness pixel value at position (i, j) in the current and corresponding CU blocks in the time domain respectively. The larger the ASSD, the greater the difference between adjacent CUs in the time domain, which means the more intense the motion.

[0055] The ratio of the residual energy of the two image blocks to the energy of the reference image block is used as the evaluation criterion, and its expression is as follows:

[0056]

[0057] Among them, ASSDX represents the value of ASSD when the best depth in the encoded CU in the current frame is X (0-3), that is, ASSDX only considers the CU with the best coding depth of X, and the meanings of other parameters are the same as ASSD;

[0058] Because each measurement vector is a linear projection of the original signal data, and respectively represent and, that is, the ratio of the residual energy of the measurement vector to the measurement value energy of the reference image block is used as the image block classification decision criterion of the P frame, and its expression is as follows:

[0059] ThSkip=b×Ave(ASSD not X);

[0060] ThSkip represents the average ASSD of all CUs whose best depth in the encoded CU is greater than X. If the ASSD of the current CU block at depth X is greater than ThSkip, it means that the current CU block moves violently, so there is no need to calculate and judge the various PU prediction modes at depth X. It can directly jump to the next depth X+1 for CU judgment of a smaller size. In the formula, b is an adjustment parameter, which is 1.2 in this article. The larger the value, the larger the corresponding ThSkip.

[0061] For B-frames:

[0062] The correlation between the B frame and its two preceding and following frames is used to classify the image blocks; at this time, the measurement vectors obtained by pre-sampling the I frame and the P frame are respectively calculated to obtain the average values ​​of the two vectors, which is the ratio of the energy difference between the B frame measurement value and the average value to the average value energy calculated later, and the calculation formula is:

[0063] J(m,λ Motion )=SAD(s,c(m))+λ Motion R(mp);

[0064] Wherein, m = (mx, my)t is the motion vector, λmotion is the Lagrange multiplier factor, which is a constant and is related to the quantization parameter QP and the type of the block to be encoded, SAD is the sum of absolute errors, s represents the original video signal, c represents the decoded video signal, p = (px, py)t is the predicted motion vector, and R(mP) is the number of bits required to represent the motion vector difference;

[0065] The image blocks are divided into three categories according to the size of the e value: basically unchanged blocks, slowly changing blocks and rapidly changing blocks. The process is: first set two thresholds T1 and T2, T1<T2, and compare the obtained e value with the two thresholds. When e<T1, the block is judged as a basically unchanged block; when T1≤e≤T2, the image block is judged as a slowly changing block; when e>T2, the block is judged as a rapidly changing block.

[0066] Furthermore, the categories of the image blocks include basically unchanged blocks, slowly changing blocks and rapidly changing blocks, and the reconstruction module is specifically used for:

[0067] During the adaptive sampling rate measurement process, the corresponding sampling rates are S1, S2 and S3 respectively assigned to the basically unchanged blocks, slowly changing blocks and rapidly changing blocks, S1<S2<S3, and the sampling rate of the image blocks of the reference frame is also S3. Then the number of sampling points corresponding to the three types of image blocks are M1=S1·D2, M2=S2·D2 and M3 respectively, where D1 is the side length of the K image blocks generated after the reference frame is divided into blocks, and D2 represents the one-dimensional signal length of each image block arranged;

[0068] For reference frames, the BCS-SPL algorithm, i.e., the block-based compressed sensing reconstruction method, is used for reconstruction. For non-reference frames, the basic unchanged blocks and slowly changing blocks are first preprocessed, and then multiple hypothesis predictions are performed to obtain predicted frames. Then, the error between the predicted frame and the original frame is corrected through residual reconstruction to obtain a high-quality reconstructed frame. Finally, bidirectional motion estimation is used to correct the reconstruction result.

[0069] Further, the process of the BCS-SPL algorithm is as follows:

[0070] A, use the minimum mean square error estimation MMSE to obtain the approximate solution of the original signal, that is, the initial solution x0 of the image (x0 = ΦTy);

[0071] B, use a 3×3 adaptive Wiener filter to reduce the image block effect caused by blocking and smooth the image;

[0072] C, project the filtered image block into the convex set, expressed as:

[0073] p(x,y,Φ)=x+ΦT(ΦΦT)-1(y-Φx);

[0074] When Φ is an orthogonal matrix, that is, ΦΦT=1, the above formula is simplified to:

[0075] p(x,y,Φ)=x+ΦT(y-Φx);

[0076] D, use the bivariate shrinkage threshold to filter the projection results to achieve the denoising process;

[0077] E, determine whether the iteration termination condition is met. If not, perform repeated iterations until the optimal solution is obtained and set the maximum number of iterations;

[0078] Among them, x refers to the x-coordinate component vector of the pixel block, y refers to the y-coordinate component of the pixel block, T refers to the function formula for obtaining the reconstructed frame by BCS-SPL optimization, and Φ refers to the vector transformation formula between the original frame and the predicted frame.

[0079] The present invention has the following beneficial effects:

[0080] 1. The present invention proposes a variable sampling rate block video coding scheme based on bidirectional prediction. First, the reference frame is sampled at a fixed high sampling rate, and then the non-reference frame is processed into non-overlapping blocks. The image blocks are classified according to the degree of change, and different sampling rates are assigned to image blocks of different categories. In the image block classification and judgment process, bidirectional prediction is first used for initial classification, and then the intra-frame correlation of the video is used to correct the preliminary classification results. Experimental results show that this adaptive sampling rate measurement method based on bidirectional prediction can effectively improve the classification accuracy of image blocks and make the classification results closer to the actual situation, thereby reducing the frame sampling rate to a certain extent and effectively improving the reconstruction quality of the video.

[0081] 2. The present invention proposes a multi-hypothesis prediction video decoding scheme based on variable sampling rate. First, since the reference frame is measured using a fixed high sampling rate, it can be directly reconstructed. For non-reference frames, the two types of image blocks with lower sampling rates must first be preprocessed, and then multi-hypothesis prediction is performed to obtain a predicted frame, and then a more accurate predicted frame is obtained through bidirectional motion estimation. Finally, the error between the predicted frame and the original frame is corrected through residual reconstruction to obtain a high-quality reconstructed frame. Experimental results show that this multi-hypothesis prediction video reconstruction scheme with variable sampling rate can reconstruct higher-quality video frames at a lower sampling rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] Figure 1 A flowchart of a video compression method based on inter-frame correlation provided by an embodiment of the present invention;

[0083] Figure 2 A simplified technical diagram of the process of extracting frames for algorithmic processing provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0084] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0085] like Figure 1 As shown, as a first embodiment of the present invention, a video compression method based on inter-frame correlation is provided, and the method includes:

[0086] Step 1, divide the input video sequence into several picture groups, each picture group contains multiple frames of pictures;

[0087] Step 2: For each picture group, set the first frame as the reference frame and the remaining frames as experimental frames, and sample the reference frame at a fixed high sampling rate;

[0088] Step 3, performing the same non-overlapping block processing on the reference frame and the non-reference frame, and dividing each reference frame and the non-reference frame into a plurality of image blocks;

[0089] Step 4, for each image block of the non-reference frame, classify the image blocks of the non-reference frame based on the degree of change of the image blocks corresponding to the reference frame, and assign different sampling rates to image blocks of different categories;

[0090] Step 5: For the reference frame, directly reconstruct it, preprocess the image blocks with lower sampling rate, and then perform multi-hypothesis prediction to obtain the predicted frame. Then, the error between the predicted frame and the original frame is corrected by residual reconstruction to obtain a high-quality reconstructed frame. Finally, the reconstruction result is corrected by using bidirectional motion estimation.

[0091] In order to achieve controllable total sampling rate, this paper proposes a two-level adaptive CVS framework based on inter-frame correlation. Figure 2 As shown in the figure. In this framework, a fixed sampling rate is used for reference frames and a variable sampling rate is used for non-reference frames. For a given non-reference frame, the total measurement value includes a fixed sampling rate measurement value and an adaptive sampling rate measurement value. Assuming that the average sampling rate of the non-reference frame image block is S, then S = F + A, where F is the fixed sampling rate and A is the average adaptive sampling rate.

[0092] In the above embodiment, the input video sequence is first divided into several groups of pictures (GOPs), each group of pictures contains N frames (N≥2), among which the first frame is set as the reference frame (I frame), and the remaining images are set as experimental frames (P frames). The reference frame and the experimental frame are processed differently. The reference frame is subjected to tone mapping processing separately, and the experimental frames in the same group will be divided into blocks of the same size and block matching motion estimation will be performed with the reference frame to find similar matching blocks in the reference frame. If a perfect matching block is found in the reference frame after motion estimation, the block of the experimental frame will use the block information of the reference frame, otherwise, the block of the experimental frame will be subjected to additional tone mapping processing.

[0093] Among them, the reference frame in each picture group is different from the experimental frame. The reference frame image needs to be processed by bilateral filtering tone mapping to obtain an LDR image with excellent visual effects. The bilateral filtering algorithm is an image filtering algorithm designed and proposed on the basis of the classic Gaussian filtering algorithm. It is a nonlinear filtering algorithm that considers both spatial position information and pixel value similarity in the filtering process. It can well preserve the edge features of the image and has the characteristics of locality, simplicity and non-iteration. Image block preprocessing is also achieved through bilateral filtering tone mapping to obtain an LDR image with excellent visual effects.

[0094] Preferably, since different areas of the video have different scene complexities and change intensities, the present invention reasonably allocates the sampling rate according to the degree of change between the divided video frames, that is, the image blocks with smaller changes are allocated with lower sampling rates, and the blocks with larger changes are allocated with higher sampling rates, and the image blocks are divided into three categories: approximately static blocks, slowly changing blocks, and rapidly changing blocks, so as to ensure that the video image can be reconstructed with higher quality at a lower total sampling rate. When setting the adaptive measurement rate, first select a suitable block size B, divide the video frame into K B×B blocks without overlapping, and then use the same measurement matrix for pre-sampling to obtain the measurement vector of each image block. Since the video scene complexity and change intensity are directly related to the difference between the pixels of the frames, the video blocks can be classified according to the residual energy, as follows:

[0095] Firstly, the measurement vectors of the corresponding image blocks of the reference frame and the non-reference frame are obtained using the same projection matrix, and the image blocks are divided into three types according to their energy difference values: basically unchanged blocks, slowly changing blocks and rapidly changing blocks.

[0096] Secondly, the results of the preliminary classification are corrected using the correlation within the image frame;

[0097] Afterwards, the final classification result is obtained, different sampling rates are assigned to different types of image blocks for sampling processing, and the number of measurement vector points of the current image block is adaptively adjusted to obtain a measurement vector.

[0098] Preferably, the correlation between the image frames is specifically as follows: setting the first frame as a reference frame, i.e., an I frame; then setting the third frame as a forward prediction frame, i.e., a P frame; and finally, setting the second frame as a bidirectional prediction frame, i.e., a B frame;

[0099] First, the P frame and the I frame are subjected to the same non-overlapping block processing, and are evenly divided into K D×D image blocks; the (residual energy) difference between the original data of the i-th image block of the P frame Xt+1 and the image block at the corresponding position in the I frame Xt-1 reflects the correlation between the corresponding image blocks of the two frames; therefore, the size of the residual energy value between the corresponding image blocks can be used as the classification basis of the P frame image blocks, and the B frame, P frame and I frame are subjected to the same non-overlapping block processing, and are evenly divided into K D×D image blocks;

[0100] Classifying the image blocks of the non-reference frame based on the degree of change of the image blocks corresponding to the reference frame specifically includes:

[0101] For P-frames:

[0102] The residual energy difference between the original data of the i-th image block of the P frame Xt+1 and the image block at the corresponding position in the I frame Xt-1 reflects the correlation between the corresponding image blocks of the two frames. Therefore, the size of the residual energy difference between the corresponding image blocks can be used as the classification basis of the P frame image blocks, and its expression is as follows:

[0103]

[0104] That is, the motion characteristics of the current CU are determined by the mean of the square difference of the brightness pixel values ​​of the current depth CU and the coded CU at the corresponding position in the time domain, where 2N represents the size of the current CU and CU Cur(I,j) and CU Col(I,j) They represent the brightness pixel value at position (i, j) in the current and corresponding CU blocks in the time domain. The larger the ASSD, the greater the difference between adjacent CUs in the time domain, which means the more intense the motion.

[0105] The ratio of the residual energy of the two image blocks to the energy of the reference image block is used as the evaluation criterion, and its expression is as follows:

[0106]

[0107] Among them, ASSDX represents the value of ASSD when the best depth in the encoded CU in the current frame is X (0-3), that is, ASSDX only considers the CU with the best coding depth of X, and the meanings of other parameters are the same as ASSD;

[0108] Because each measurement vector is a linear projection of the original signal data, and respectively represent and, that is, the ratio of the residual energy of the measurement vector to the measurement value energy of the reference image block is used as the image block classification decision criterion of the P frame, and its expression is as follows: ThSkip = b × Ave (ASSD notX )

[0109] ThSkip represents the average ASSD of all CUs with the best depth greater than X in the encoded CU. If the ASSD of the current CU block at depth X is greater than ThSkip, it means that the current CU block moves violently, so there is no need to calculate and judge various PU prediction modes at depth X, and directly jump to the next depth X+1 for smaller CU judgment. In the formula, b is the adjustment parameter. The larger the value of b, the larger the corresponding ThSkip.

[0110] For B-frames:

[0111] The correlation between the B frame and its two preceding and following frames is used to classify the image blocks; at this time, the measurement vectors obtained by pre-sampling the I frame and the P frame are respectively calculated to obtain the average values ​​of the two vectors, which is the ratio of the energy difference between the B frame measurement value and the average value to the average value energy calculated later, and the calculation formula is:

[0112] J(m, λ Motion ) = SAD(s, c(m)) + λ Motion R(m - p)

[0113] Wherein, m = (mx, my)t is a motion vector, λmotion is a Lagrange multiplier factor, SAD is the sum of absolute differences, s represents the original video signal, c represents the decoded video signal, p = (px, py)t is the predicted motion vector, and R(m - P) represents the number of bits required for the motion vector difference;

[0114] The image blocks are divided into three categories: basically unchanged blocks, slowly changing blocks, and rapidly changing blocks according to the magnitude of the e value. The process is as follows: First, set two thresholds T1 and T2, where T1 < T2. Compare the obtained e value with the two thresholds. When e < T1, the block is judged as a basically unchanged block; when T1 ≤ e ≤ T2, the image block is determined to be a slowly changing block; when e > T2, the block is judged as a rapidly changing block.

[0115] The intra-frame correlation corrects the types of the four adjacent image blocks above, below, left, and right of the current image block according to the type of the current image block.

[0116] During the adaptive sampling rate measurement process, corresponding sampling rates S1, S2, and S3 are assigned to the basically unchanged blocks, slowly changing blocks, and rapidly changing blocks respectively, where S1 < S2 < S3. S3 is the sampling rate of the image blocks in the reference frame. Then the corresponding number of sampling points for the three types of image blocks are M1 = S1·D2, M2 = S2·D2, and M respectively, where D is the side length of the K image blocks generated after the reference frame is segmented, and D2 represents the length of the one-dimensional signal formed by arranging each small image block;

[0117] The adaptive sampling rate measurement process for non-reference frames P frames and B frames is described as follows:

[0118] For the basically unchanged blocks, only the values from M1 + 1 to M2 in the pre-sampling vector need to be removed, and the first M1 values are retained to obtain the measurement vector. At this time, the sampling rate of the image block is reduced to S1;

[0119] For the slowly changing blocks, keep the M2 measurement values in the current pre-sampling vector unchanged, and the obtained measurement vector is equal to the pre-sampling vector. At this time, the sampling rate of the current image block is equal to S2;

[0120] For the rapidly changing blocks, the measurement matrix Φ of the reference frame I frame is used for projection to obtain the measurement vector. At this time, the sampling rate of the image block is the same as that of the I frame, which is S3;

[0121] The second step is the video compressive sensing decoding based on variable sampling rate, and the process is as follows:

[0122] For the reference frame, the BCS-SPL algorithm, i.e., the block image compressed sensing reconstruction method, is used for reconstruction;

[0123] For the reconstruction of non-reference frames, the basic unchanged blocks and slowly changing blocks are first preprocessed. Then, the preprocessed image blocks are predicted through multi-hypothesis prediction to obtain the predicted frame. Then, the residual reconstruction is performed to obtain the target frame. Finally, the reconstruction result is corrected using bidirectional motion estimation.

[0124] The process of the BCS-SPL algorithm is as follows:

[0125] (1) Use the minimum mean square error estimation (MMSE) to obtain an approximate solution of the original signal, that is, the initial solution x0 of the image (x0 = ΦTy);

[0126] (2) Use a 3×3 adaptive Wiener filter to reduce the image block effect caused by block segmentation and smooth the image;

[0127] (3) Project the filtered image into a convex set, expressed as:

[0128] p(x,y,Φ)=x+ΦT(ΦΦT)-1(y-Φx) (5)

[0129] When Φ is an orthogonal matrix, that is, ΦΦT = 1, equation (5) is simplified to

[0130] p(x,y,Φ)=x+ΦT(y-Φx) (6)

[0131] (4) Using a bivariate shrinkage threshold to filter the projection results to achieve the denoising process;

[0132] (5) Determine whether the iteration termination condition is met. If not, perform repeated iterations until the optimal solution is obtained and set the maximum number of iterations.

[0133] As a second embodiment of the present invention, a video compression system based on inter-frame correlation is provided, characterized in that the system includes a grouping module, a frame classification module, a blocking module, a sampling rate allocation module and a reconstruction module;

[0134] The grouping module is used to divide the input video sequence into a number of picture groups, each picture group contains multiple frames of pictures;

[0135] The frame classification module is used to set the first frame as the reference frame and the remaining frames as experimental frames for each picture group, and perform fixed high sampling rate sampling on the reference frame;

[0136] The block division module is used to perform the same non-overlapping block division processing on the reference frame and the non-reference frame, and divide each reference frame and the non-reference frame into a plurality of image blocks;

[0137] The sampling rate allocation module is used to classify the image blocks of the non-reference frame based on the degree of change of the image blocks corresponding to the reference frame for each image block of the non-reference frame, and allocate different sampling rates to the image blocks of different categories;

[0138] The reconstruction module is used to directly reconstruct the reference frame, preprocess the image blocks with a lower sampling rate, and then perform multi-hypothesis prediction to obtain a predicted frame. The error between the predicted frame and the original frame is then corrected by residual reconstruction to obtain a high-quality reconstructed frame. Finally, the reconstruction result is corrected by using bidirectional motion estimation.

[0139] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A video compression method based on inter-frame correlation, characterized in that: The method comprises: Step 1, divide the input video sequence into several picture groups, each picture group contains multiple frames of pictures; Step 2: For each picture group, set the first frame as the reference frame and the remaining frames as experimental frames, and sample the reference frame at a fixed high sampling rate; Step 3, performing the same non-overlapping block processing on the reference frame and the non-reference frame, and dividing each reference frame and the non-reference frame into a plurality of image blocks; Step 4, for each image block of the non-reference frame, classify the image blocks of the non-reference frame based on the degree of change of the image blocks corresponding to the reference frame, and assign different sampling rates to image blocks of different categories; Step 5: directly reconstruct the reference frame, preprocess the image blocks with lower sampling rate, and then perform multi-hypothesis prediction to obtain the predicted frame. Then, the error between the predicted frame and the corresponding original frame is corrected by residual reconstruction to obtain a high-quality reconstructed frame. Finally, the reconstruction result is corrected by using bidirectional motion estimation. Each picture group includes three frames of pictures, the first frame is set as a reference frame, i.e., an I frame, the third frame is set as a forward prediction frame, i.e., a P frame; the second frame is set as a bidirectional prediction frame, i.e., a B frame, and the B frame, the P frame and the I frame are subjected to the same non-overlapping block processing, and are evenly divided into K D×D image blocks; Classifying the image blocks of the non-reference frame based on the degree of change of the image blocks corresponding to the reference frame specifically includes: For P-frames: The residual energy difference between the original data of the i-th image block of the P frame Xt+1 and the image block at the corresponding position in the I frame Xt-1 reflects the correlation between the corresponding image blocks of the two frames. Therefore, the size of the residual energy difference between the corresponding image blocks is used as the classification basis of the P frame image blocks, and its expression is as follows: That is, the motion characteristics of the current CU are determined by the mean square of the difference between the brightness pixel values ​​of the current depth CU and the coded CU at the corresponding position in the time domain, where 2N represents the size of the current CU and CU Cur(I,j) and CU Col(I,j) They represent the brightness pixel value at position (i, j) in the current and corresponding CU blocks in the time domain. The larger the ASSD, the greater the difference between adjacent CUs in the time domain, which means the more intense the motion. The ratio of the residual energy of the two image blocks to the energy of the reference image block is used as the evaluation criterion; Because each measurement vector is a linear projection of the original signal data, the ratio of the residual energy of the measurement vector to the measurement value energy of the reference image block is used as the image block classification decision criterion of the P frame, and its expression is: ThSkip = b × Ave (ASSD not X ); ThSkip represents the average ASSD of all CUs with the best depth greater than X in the encoded CU. If the ASSD of the current CU block at depth X is greater than ThSkip, it means that the current CU block moves violently, so there is no need to calculate and judge various PU prediction modes at depth X, and directly jump to the next depth X+1 for smaller CU judgment. In the formula, b is the adjustment parameter. The larger the value of b, the larger the corresponding ThSkip. For B-frames: The correlation between the B frame and its two preceding and following frames is used to classify the image blocks; at this time, the measurement vectors obtained by pre-sampling the I frame and the P frame are respectively calculated to obtain the average values ​​of the two vectors, which is the ratio of the energy difference between the B frame measurement value and the average value to the average value energy calculated later, and the calculation formula is: J(m,λ Motion )=SAD(s,c(m))+λ Motion R(m-p) Where m is the motion vector, λmotion is the Lagrange multiplier factor, SAD is the sum of absolute errors, s is the original video signal, c is the decoded video signal, p is the predicted motion vector, and R(mP) is the number of bits required for the motion vector difference. The image blocks are divided into three categories according to the size of the e value: basically unchanged blocks, slowly changing blocks and rapidly changing blocks. The process is: first set two thresholds T1 and T2, T1<T2, and compare the obtained e value with the two thresholds. When eT1, the block is judged as a basically unchanged block; when T1≤e≤T2, the image block is judged as a slowly changing block; when e>T2, the block is judged as a rapidly changing block.

2. The video compression method based on inter-frame correlation according to claim 1, characterized in that: In step 4, the image blocks are classified specifically as follows: the residual energy difference between the corresponding image blocks of the reference frame and the non-reference frame is calculated, and the image blocks are divided into three types based on the residual energy difference, namely, basically unchanged blocks, slowly changing blocks and rapidly changing blocks.

3. The video compression method based on inter-frame correlation according to claim 1, characterized in that: The categories of the image blocks include basically unchanged blocks, slowly changing blocks and rapidly changing blocks, and the method further includes: During the adaptive sampling rate measurement process, the corresponding sampling rates are S1, S2 and S3 respectively assigned to the basically unchanged blocks, slowly changing blocks and rapidly changing blocks, S1<S2<S3, and the sampling rate of the image blocks of the reference frame is also S3. Then the number of sampling points corresponding to the three types of image blocks are M1=S1·D2, M2=S2·D2 and M3 respectively, where D1 is the side length of the K image blocks generated after the reference frame is divided into blocks, and D2 represents the one-dimensional signal length of each image block arranged; In step 5, for the reference frame, the BCS-SPL algorithm, i.e., the block image compressed sensing reconstruction method, is used for reconstruction; for the non-reference frame, the basic unchanged blocks and slowly changing blocks are first preprocessed, and then multi-hypothesis prediction is performed to obtain the predicted frame, and then the error between the predicted frame and the original frame is corrected through residual reconstruction to obtain a high-quality reconstructed frame, and finally, bidirectional motion estimation is used to correct the reconstruction result.

4. The video compression method based on inter-frame correlation according to claim 3, characterized in that: The process of the BCS-SPL algorithm is as follows: A, use the minimum mean square error estimation MMSE to obtain the approximate solution of the original signal, that is, the initial solution x0 of the image (x0 = ΦTy); B, use a 3×3 adaptive Wiener filter to reduce the image block effect caused by blocking and smooth the image; C, project the filtered image block into the convex set, expressed as: p(x,y,Φ)=x+ΦT(ΦΦT)-1(y-Φx); When Φ is an orthogonal matrix, that is, ΦΦT=1, the above formula is simplified to: p(x,y,Φ)=x+ΦT(y-Φx); D, use the bivariate shrinkage threshold to filter the projection results to achieve the denoising process; E, determine whether the iteration termination condition is met. If not, perform repeated iterations until the optimal solution is obtained and set the maximum number of iterations; Among them, x refers to the x-coordinate component vector of the pixel block, y refers to the y-coordinate component of the pixel block, T refers to the function formula for obtaining the reconstructed frame by BCS-SPL optimization, and Φ refers to the vector transformation formula between the original frame and the predicted frame.

5. A video compression system based on inter-frame correlation, characterized in that: The system includes a grouping module, a frame classification module, a blocking module, a sampling rate allocation module and a reconstruction module; The grouping module is used to divide the input video sequence into a number of picture groups, each picture group contains multiple frames of pictures; The frame classification module is used to set the first frame as the reference frame and the remaining frames as experimental frames for each picture group, and to sample the reference frame at a fixed high sampling rate; The block division module is used to perform the same non-overlapping block division processing on the reference frame and the non-reference frame, and divide each reference frame and non-reference frame into multiple image blocks; The sampling rate allocation module is used to classify the image blocks of each non-reference frame based on the degree of change of the corresponding image blocks of the reference frame, and allocate different sampling rates to the image blocks of different categories; The reconstruction module is used to directly reconstruct the reference frame, preprocess the image blocks with a lower sampling rate, then perform multi-hypothesis prediction to obtain a predicted frame, and then correct the error between the predicted frame and the original frame through residual reconstruction to obtain a high-quality reconstructed frame. Finally, bidirectional motion estimation is used to correct the reconstruction result; Among them, each group of pictures includes three pictures. The first picture is set as the reference frame, that is, the I frame, and the third picture is set as the forward prediction frame, that is, the P frame; the second picture is set as the bidirectional prediction frame, that is, the B frame. The B frame, P frame and I frame are subjected to the same non-overlapping block division processing, and are all divided into K image blocks of size D×D; Classifying the image blocks of the non-reference frame based on the degree of change of the corresponding image blocks of the reference frame specifically includes: For the P frame: The residual energy difference between the original data of the i-th block image of the P frame Xt+1 and the corresponding image block at the corresponding position in the I frame Xt-1 reflects the correlation between the corresponding image blocks of these two frames. Therefore, the size of the residual energy difference between the corresponding image blocks is used as the classification basis for the P frame image blocks, and its expression is as follows: That is, the motion characteristics of the current CU are determined by the mean square of the difference between the brightness pixel values ​​of the current depth CU and the coded CU at the corresponding position in the time domain, where 2N represents the size of the current CU and CU Cur(I,j) and CU Col(I,j) They represent the brightness pixel value at position (i, j) in the current and corresponding CU blocks in the time domain. The larger the ASSD, the greater the difference between adjacent CUs in the time domain, which means the more intense the motion. The ratio of the residual energy of the two image blocks to the energy of the reference image block is used as the judgment criterion; Because each measurement vector is a linear projection of the original signal data, the ratio of the residual energy of the measurement vector to the measurement value energy of the reference image block is used as the image block classification decision criterion of the P frame, and its expression is: ThSkip = b × Ave (ASSD not X ); ThSkip represents the mean of the ASSD of all CUs with the best depth greater than X in the encoded CU. If the ASSD at the current CU block depth X is greater than ThSkip, it means that the current CU block has relatively intense motion. Therefore, it is not necessary to calculate and judge various PU prediction modes at depth X, and directly jump to the next depth X+1 for smaller-sized CU judgment. In the formula, b is an adjustment parameter, and the larger the value of b, the larger the corresponding ThSkip; For the B frame: The correlation between the B frame and its two adjacent frames is used to perform image block classification and decision; at this time, the measurement vectors pre-sampled from the I frame and the P frame are respectively the average values calculated from these two vectors. For calculating the ratio of the energy difference between the B frame measurement value and the average value to the average value energy, its calculation formula is: J(m,λ Motion )=SAD(s,c(m))+λ MotionR (m-p) In the formula, m is the motion vector, λmotion is the Lagrange multiplier factor, SAD is the sum of absolute differences, s represents the original video signal, c represents the decoded video signal, p is the predicted motion vector, and R(m-P) represents the number of bits required for the motion vector difference; The image blocks are divided into three categories: basically unchanged blocks, slowly changing blocks, and rapidly changing blocks according to the size of the e value. The process is as follows: First, set two thresholds T1 and T2, where T1 < T2. Compare the obtained e value with the two thresholds. When e < T1, the block is judged as a basically unchanged block; when T1 ≤ e ≤ T2, the image block is judged as a slowly changing block; when e > T2, the block is judged as a rapidly changing block.

6. The video compression system based on inter-frame correlation according to claim 5, characterized in that: The image blocks are classified specifically as follows: the residual energy difference between the corresponding image blocks of the reference frame and the non-reference frame is calculated, and the image blocks are divided into three types based on the size of the residual energy difference, namely, basically unchanged blocks, slowly changing blocks and rapidly changing blocks.

7. The video compression system based on inter-frame correlation according to claim 5, characterized in that: The categories of the image blocks include basically unchanged blocks, slowly changing blocks and rapidly changing blocks, and the reconstruction module is specifically used for: During the adaptive sampling rate measurement process, the corresponding sampling rates are S1, S2 and S3 respectively assigned to the basically unchanged blocks, slowly changing blocks and rapidly changing blocks, S1<S2<S3, and the sampling rate of the image blocks of the reference frame is also S3. Then the number of sampling points corresponding to the three types of image blocks are M1=S1·D2, M2=S2·D2 and M3 respectively, where D1 is the side length of the K image blocks generated after the reference frame is divided into blocks, and D2 represents the one-dimensional signal length of each image block arranged; For reference frames, the BCS-SPL algorithm, i.e., the block-based compressed sensing reconstruction method, is used for reconstruction. For non-reference frames, the basic unchanged blocks and slowly changing blocks are first preprocessed, and then multiple hypothesis predictions are performed to obtain predicted frames. Then, the error between the predicted frame and the original frame is corrected through residual reconstruction to obtain a high-quality reconstructed frame. Finally, bidirectional motion estimation is used to correct the reconstruction result.

8. The video compression system based on inter-frame correlation according to claim 7, characterized in that: The process of the BCS-SPL algorithm is as follows: A, use the minimum mean square error estimation MMSE to obtain the approximate solution of the original signal, that is, the initial solution x0 of the image (x0 = ΦTy); B, use a 3×3 adaptive Wiener filter to reduce the image block effect caused by blocking and smooth the image; C, project the filtered image block into the convex set, expressed as: p(x,y,Φ)=x+ΦT(ΦΦT)-1(y-Φx); When Φ is an orthogonal matrix, that is, ΦΦT=1, the above formula is simplified to: p(x,y,Φ)=x+ΦT(y-Φx); D, use the bivariate shrinkage threshold to filter the projection results to achieve the denoising process; E, determine whether the iteration termination condition is met. If not, perform repeated iterations until the optimal solution is obtained and set the maximum number of iterations; Among them, x refers to the x-coordinate component vector of the pixel block, y refers to the y-coordinate component of the pixel block, T refers to the function formula for obtaining the reconstructed frame by BCS-SPL optimization, and Φ refers to the vector transformation formula between the original frame and the predicted frame.