A video compression method and system using adaptive perceptual sampling

Key frames are identified through inter-frame motion vector compensation and adaptive sampling, combined with vector matrix calculation correlation for inter-frame reconstruction and compression, which solves the problem in the existing technology of unstable reconstruction quality of inter-frame matching algorithms under multiple joint sampling rates. problem, improving the video compression effect.

CN115604463BActive Publication Date: 2024-10-18TIANJIN NAT CYBERNET SECURITY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202211091555.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-07
Publication Date
2024-10-18
Estimated Expiration
2042-09-07

AI Technical Summary

Technical Problem

The reconstruction quality of existing inter-frame matching algorithms is unstable under multiple joint sampling rates, and existing video quality enhancement methods ignore the spatiotemporal correlation between frames, resulting in poor video compression results.

Method used

Inter-frame compensation is performed by extracting inter-frame motion vectors, key frames and non-key frames are identified, adaptive sampling is performed based on the inter-frame time domain distance, and inter-frame reconstruction and compression coding are performed by combining the vector matrix calculation correlation.

Benefits of technology

It improves the reconstruction quality of video compression under multiple joint sampling rates, overcomes instability problems, and strengthens the video quality enhancement effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115604463B_ABST
    Figure CN115604463B_ABST
Patent Text Reader

Abstract

The present invention provides a video compression method and system with adaptive perceptual sampling. The current frame is compensated by the inter-frame motion vectors of the current frame and the previous and next frames, some characteristic vectors of the current frame can be strengthened, and the difference estimation with the reference frame is performed to obtain key frames and non-key frames. Adaptive sampling is adopted, and only non-key frames are reconstructed between frames. Finally, the correlation is calculated by transposing the matrix, and the cluttered frames are eliminated before compression. The problem of unstable reconstruction quality under multiple joint sampling rates in the prior art is overcome.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network multimedia, and in particular to a video compression method and system with adaptive perceptual sampling. Background Art

[0002] The existing inter-frame matching algorithm shows unstable reconstruction quality under various joint sampling rates because the sampling rate of key frames is inconsistent with that of non-key frames. At the same time, the existing video quality enhancement methods also have certain limitations, emphasizing the video enhancement of a single frame but ignoring the temporal and spatial correlation between frames.

[0003] Therefore, there is an urgent need for a targeted adaptive perceptual sampling video compression method and system. Summary of the invention

[0004] The object of the present invention is to provide a video compression method and system for adaptive perceptual sampling, so as to solve the problem that the prior art exhibits unstable reconstruction quality under multiple joint sampling rates.

[0005] In a first aspect, the present application provides a video compression method for adaptive perceptual sampling, the method comprising:

[0006] Acquire a video data stream, perform frame processing on the video data stream, and obtain first data in frames;

[0007] Extracting a first inter-frame motion vector between a current frame and a previous frame of the first data, and extracting a second inter-frame motion vector between the current frame and a next frame, and compensating the current frame based on the first inter-frame motion vector and the second inter-frame motion vector, wherein the compensation is to use the inter-frame motion vector as input data for expanding video quality enhancement to strengthen a feature vector of the current frame; and continuously performing inter-frame motion vector compensation on a temporal timeline to obtain second data;

[0008] Performing a difference operation between each frame of the second data and the reference frame, estimating the difference, and if the difference is outside a preset range, it indicates that the frame is more different from the reference frame than expected and is identified as a key frame, otherwise it is identified as a non-key frame;

[0009] The key frames are sampled at a high sampling rate, the non-key frames are sampled at a low sampling rate, and only the non-key frames with the low sampling rate are reconstructed between frames, and the nearest key frame is selected as a reference based on the time domain distance between frames to complete the inter-frame reconstruction;

[0010] Recombining the key frame with the non-key frame reconstructed between frames to obtain third data;

[0011] Input the third data into the vector matrix template to obtain the first vector matrix P1, and calculate the transposed matrix T1 of the first vector matrix P1; input the reference frame into the vector matrix template to obtain the reference matrix P2, calculate the transposed matrix T2 of the reference matrix P2, calculate the correlation between T1 and T2, and eliminate the frames whose correlation values ​​are higher than the threshold to obtain the fourth data;

[0012] compressing and encoding the fourth data to obtain a compressed data stream, and sending the compressed data stream to a next-level device;

[0013] Receive and decompress the compressed data stream sent by the other device.

[0014] In a second aspect, the present application provides a video compression system for adaptive perceptual sampling, the system comprising:

[0015] An acquisition unit, used for acquiring a video data stream, performing frame processing on the video data stream, and obtaining first data in frames;

[0016] a preprocessing unit, configured to extract a first inter-frame motion vector between a current frame and a previous frame of the first data, and extract a second inter-frame motion vector between the current frame and a subsequent frame, and compensate the current frame based on the first inter-frame motion vector and the second inter-frame motion vector, wherein the compensation is to use the inter-frame motion vector as input data for extending video quality enhancement to strengthen a feature vector of the current frame; and continuously perform inter-frame motion vector compensation on a temporal timeline to obtain second data;

[0017] a recognition unit, configured to perform a difference operation between each frame of the second data and a reference frame, and estimate the difference. If the difference is outside a preset range, it indicates that the frame is more different from the reference frame than expected, and is recognized as a key frame; otherwise, it is recognized as a non-key frame;

[0018] an adaptive unit, configured to sample the key frame at a high sampling rate, sample the non-key frame at a low sampling rate, and perform inter-frame reconstruction only on the non-key frame at the low sampling rate, select the nearest key frame as a reference based on the time domain distance between frames, and complete the inter-frame reconstruction; and reassemble the key frame with the non-key frame after the inter-frame reconstruction to obtain third data;

[0019] A correlation unit is used to input the third data into a vector matrix template to obtain a first vector matrix P1, and calculate a transposed matrix T1 of the first vector matrix P1; input the reference frame into the vector matrix template to obtain a reference matrix P2, calculate a transposed matrix T2 of the reference matrix P2, calculate the correlation between T1 and T2, and eliminate frames with correlation values ​​higher than a threshold value to obtain fourth data;

[0020] A compression unit, used for compressing and encoding the fourth data to obtain a compressed data stream, and sending the compressed data stream to a next-level device;

[0021] The decompression unit is used to receive and decompress the compressed data stream sent by the other device.

[0022] In a third aspect, the present application provides a video compression system for adaptive perceptual sampling, the system comprising a processor and a memory:

[0023] The memory is used to store program code and transmit the program code to the processor;

[0024] The processor is used to execute any one of the four possible methods of the first aspect according to the instructions in the program code.

[0025] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to execute any one of the four possible methods in the first aspect.

[0026] Beneficial Effects

[0027] The present invention provides a video compression method and system with adaptive perceptual sampling. The current frame is compensated by the inter-frame motion vectors of the current frame and the previous and next frames, some characteristic vectors of the current frame can be strengthened, and the difference estimation with the reference frame is performed to obtain key frames and non-key frames. Adaptive sampling is adopted, and only non-key frames are reconstructed between frames. Finally, the correlation is calculated by transposing the matrix, and the cluttered frames are eliminated before compression. The problem of unstable reconstruction quality under multiple joint sampling rates in the prior art is overcome. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0029] Figure 1 A flowchart of a video compression method for adaptive perceptual sampling according to the present invention;

[0030] Figure 2 This is an architecture diagram of a video compression system for adaptive perceptual sampling according to the present invention;

[0031] Figure 3 A deployment diagram of a computer-readable storage medium according to the present invention. DETAILED DESCRIPTION

[0032] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.

[0033] Figure 1 The flowchart of the video compression method of adaptive perceptual sampling provided in this application includes:

[0034] Acquire a video data stream, perform frame processing on the video data stream, and obtain first data in frames;

[0035] Extracting a first inter-frame motion vector between a current frame and a previous frame of the first data, and extracting a second inter-frame motion vector between the current frame and a next frame, and compensating the current frame based on the first inter-frame motion vector and the second inter-frame motion vector, wherein the compensation is to use the inter-frame motion vector as input data for expanding video quality enhancement to strengthen a feature vector of the current frame; and continuously performing inter-frame motion vector compensation on a temporal timeline to obtain second data;

[0036] Performing a difference operation between each frame of the second data and the reference frame, estimating the difference, and if the difference is outside a preset range, it indicates that the frame is more different from the reference frame than expected and is identified as a key frame, otherwise it is identified as a non-key frame;

[0037] The key frames are sampled at a high sampling rate, the non-key frames are sampled at a low sampling rate, and only the non-key frames with the low sampling rate are reconstructed between frames, and the nearest key frame is selected as a reference based on the time domain distance between frames to complete the inter-frame reconstruction;

[0038] Recombining the key frame with the non-key frame reconstructed between frames to obtain third data;

[0039] Input the third data into the vector matrix template to obtain the first vector matrix P1, and calculate the transposed matrix T1 of the first vector matrix P1; input the reference frame into the vector matrix template to obtain the reference matrix P2, calculate the transposed matrix T2 of the reference matrix P2, calculate the correlation between T1 and T2, and eliminate the frames whose correlation values ​​are higher than the threshold to obtain the fourth data;

[0040] compressing and encoding the fourth data to obtain a compressed data stream, and sending the compressed data stream to a next-level device;

[0041] Receive and decompress the compressed data stream sent by the other device.

[0042] In some preferred embodiments, the acquiring of the video data stream includes presetting different acquisition strategies according to different platforms to acquire video data streams of multiple different platforms.

[0043] In some preferred embodiments, the acquiring of video data streams of multiple different platforms includes encrypting and decoding the video data streams.

[0044] In some preferred embodiments, the high sampling rate and the low sampling rate are preset by a server, and a request is made to the server to obtain the sampling rate.

[0045] Figure 2 The architecture diagram of the adaptive perceptual sampling video compression system provided by the present application, the system includes:

[0046] An acquisition unit, used for acquiring a video data stream, performing frame processing on the video data stream, and obtaining first data in frames;

[0047] a preprocessing unit, configured to extract a first inter-frame motion vector between a current frame and a previous frame of the first data, and extract a second inter-frame motion vector between the current frame and a next frame, and compensate the current frame based on the first inter-frame motion vector and the second inter-frame motion vector, wherein the compensation is to use the inter-frame motion vector as input data for extending video quality enhancement to strengthen a feature vector of the current frame; and continuously perform inter-frame motion vector compensation on a temporal timeline to obtain second data;

[0048] a recognition unit, configured to perform a difference operation between each frame of the second data and a reference frame, and estimate the difference. If the difference is outside a preset range, it indicates that the frame is more different from the reference frame than expected, and is recognized as a key frame; otherwise, it is recognized as a non-key frame;

[0049] an adaptive unit, configured to sample the key frame at a high sampling rate, sample the non-key frame at a low sampling rate, and perform inter-frame reconstruction only on the non-key frame at the low sampling rate, select the nearest key frame as a reference based on the time domain distance between frames, and complete the inter-frame reconstruction; and reassemble the key frame with the non-key frame after the inter-frame reconstruction to obtain third data;

[0050] A correlation unit is used to input the third data into a vector matrix template to obtain a first vector matrix P1, and calculate a transposed matrix T1 of the first vector matrix P1; input the reference frame into the vector matrix template to obtain a reference matrix P2, calculate a transposed matrix T2 of the reference matrix P2, calculate the correlation between T1 and T2, and eliminate frames with correlation values ​​higher than a threshold value to obtain fourth data;

[0051] A compression unit, used for compressing and encoding the fourth data to obtain a compressed data stream, and sending the compressed data stream to a next-level device;

[0052] The decompression unit is used to receive and decompress the compressed data stream sent by the other device.

[0053] The present application provides a video compression system for adaptive perceptual sampling, the system comprising: the system comprising a processor and a memory:

[0054] The memory is used to store program code and transmit the program code to the processor;

[0055] The processor is used to execute the method described in any one of all embodiments of the first aspect according to the instructions in the program code.

[0056] The present application provides a computer-readable storage medium, such as Figure 3 As shown, the computer-readable storage medium is used to store program code, and the program code is used to execute the method described in any one of all embodiments of the first aspect.

[0057] In a specific implementation, the present invention further provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment of the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only storage memory (abbreviated as: ROM) or a random access memory (abbreviated as: RAM), etc.

[0058] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention or certain parts of the embodiments.

[0059] The same and similar parts between the various embodiments of this specification can be referred to each other. In particular, for the embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.

[0060] The above-described embodiments of the present invention do not limit the protection scope of the present invention.

Claims

1. A video compression method with adaptive perceptual sampling, characterized in that: The method comprises: Acquire a video data stream, perform frame processing on the video data stream, and obtain first data in frames; Extracting a first inter-frame motion vector between a current frame and a previous frame of the first data, and extracting a second inter-frame motion vector between the current frame and a next frame, and compensating the current frame based on the first inter-frame motion vector and the second inter-frame motion vector, wherein the compensation is to use the inter-frame motion vector as input data for expanding video quality enhancement to strengthen a feature vector of the current frame; and continuously performing inter-frame motion vector compensation on a temporal timeline to obtain second data; Performing a difference operation between each frame of the second data and the reference frame, estimating the difference, and if the difference is outside a preset range, it indicates that the frame is more different from the reference frame than expected, and is identified as a key frame; otherwise, it is identified as a non-key frame; The key frames are sampled at a high sampling rate, the non-key frames are sampled at a low sampling rate, and only the non-key frames with the low sampling rate are reconstructed between frames, and the nearest key frame is selected as a reference based on the time domain distance between frames to complete the inter-frame reconstruction; Recombining the key frame with the non-key frame reconstructed between frames to obtain third data; Input the third data into the vector matrix template to obtain the first vector matrix P1, and calculate the transposed matrix T1 of the first vector matrix P1; input the reference frame into the vector matrix template to obtain the reference matrix P2, calculate the transposed matrix T2 of the reference matrix P2, calculate the correlation between T1 and T2, and eliminate the frames with the correlation value higher than the threshold to obtain the fourth data, that is, calculate the correlation by transposing the matrix and eliminate the messy frames; compressing and encoding the fourth data to obtain a compressed data stream, and sending the compressed data stream to a next-level device; Receive and decompress the compressed data stream sent by the other device.

2. The method according to claim 1, characterized in that: The obtaining of the video data stream includes presetting different obtaining strategies according to different platforms, and obtaining the video data streams of multiple different platforms.

3. The method according to claim 2, characterized in that: The acquiring of video data streams of multiple different platforms includes encrypting and decoding the video data streams.

4. The method according to claim 3, characterized in that: The high sampling rate and the low sampling rate are preset by a server, and a request is made to the server to obtain the sampling rate.

5. A video compression system with adaptive perceptual sampling, characterized in that: The system comprises: An acquisition unit, used for acquiring a video data stream, performing frame processing on the video data stream, and obtaining first data in frames; a preprocessing unit, configured to extract a first inter-frame motion vector between a current frame and a previous frame of the first data, and extract a second inter-frame motion vector between the current frame and a subsequent frame, and compensate the current frame based on the first inter-frame motion vector and the second inter-frame motion vector, wherein the compensation is to use the inter-frame motion vector as input data for extending video quality enhancement to strengthen a feature vector of the current frame; and continuously perform inter-frame motion vector compensation on a temporal timeline to obtain second data; a recognition unit, configured to perform a difference operation between each frame of the second data and a reference frame, and estimate the difference. If the difference is outside a preset range, it indicates that the frame is more different from the reference frame than expected, and is recognized as a key frame; otherwise, it is recognized as a non-key frame; an adaptive unit, configured to sample the key frame at a high sampling rate, sample the non-key frame at a low sampling rate, and perform inter-frame reconstruction only on the non-key frame at the low sampling rate, select the nearest key frame as a reference based on the time domain distance between frames, and complete the inter-frame reconstruction; and reassemble the key frame with the non-key frame after the inter-frame reconstruction to obtain third data; A correlation unit is used to input the third data into a vector matrix template to obtain a first vector matrix P1, and calculate a transposed matrix T1 of the first vector matrix P1; input the reference frame into a vector matrix template to obtain a reference matrix P2, calculate a transposed matrix T2 of the reference matrix P2, calculate the correlation between T1 and T2, and eliminate frames with correlation values ​​higher than a threshold value to obtain fourth data, that is, calculate the correlation by transposing the matrix and eliminate cluttered frames; A compression unit, used for compressing and encoding the fourth data to obtain a compressed data stream, and sending the compressed data stream to a next-level device; The decompression unit is used to receive and decompress the compressed data stream sent by the other device.

6. A video compression system with adaptive perceptual sampling, characterized in that: The system comprises a processor and a memory: The memory is used to store program codes and transmit the program codes to the processor; The processor is used to execute the method according to any one of claims 1 to 4 according to the instructions in the program code.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program codes, and the program codes are executed by a processor to implement the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Video image compression artifact removing method combining motion compensation and generative adversarial network

    CN111866521A

  • Audio and video compression method, device, equipment, system and storage medium

    CN112995676A