Video jitter elimination method and device, terminal equipment and storage medium

文档序号:1721407 发布日期:2019-12-17 浏览:40次 中文

阅读说明:本技术 一种视频抖动消除方法、消除装置、终端设备及存储介质 (Video jitter elimination method and device, terminal equipment and storage medium ) 是由 杨建旭 杨可军 王皓 李程启 郑文杰 张骥 丁兆硕 于 2019-07-23 设计创作,主要内容包括:本发明公开了一种视频抖动消除方法,包括以下步骤:将视频帧划分为若干子区域块,并对子区域块进行筛选得到筛选视频帧;对筛选视频帧采用运动估计进行运动补偿得到补偿视频帧。本发明还公开了一种视频抖动消除装置、视频抖动消除设备和一种计算机可读存储介质。本发明根据灰度梯度识别视频抖动,算法简单;通过运动估计进行运动补偿,保证了最终获得的视频帧的品质。(the invention discloses a video jitter elimination method, which comprises the following steps: dividing the video frame into a plurality of sub-region blocks, and screening the sub-region blocks to obtain a screened video frame; and performing motion compensation on the screened video frame by adopting motion estimation to obtain a compensated video frame. The invention also discloses a video jitter elimination device, a video jitter elimination device and a computer readable storage medium. The method identifies the video jitter according to the gray gradient, and has simple algorithm; and the quality of the finally obtained video frame is ensured by performing motion compensation through motion estimation.)

1. A video judder removal method, comprising:

dividing the video frame into a plurality of sub-region blocks, and screening the sub-region blocks to obtain a screened video frame;

And performing motion compensation on the screened video frame by adopting motion estimation to obtain a compensated video frame.

2. the method according to claim 1, wherein the video frame is divided into a plurality of sub-area blocks, and the sub-area blocks are screened to obtain a screened video frame; the method specifically comprises the following steps:

And screening the subarea blocks by adopting gray gradient, deleting the subarea blocks with jitter to obtain blank subarea blocks, reserving the subarea blocks without jitter, and forming a screening video frame by the blank subarea blocks and the subarea blocks without jitter.

3. The method according to claim 2, wherein the selecting the sub-region block using the gray scale gradient comprises:

And calculating the gray gradient of each sub-region block, and comparing the gray gradient of each sub-region block with a gradient threshold, wherein the sub-region block with the gray gradient smaller than the gray threshold is a sub-region block with jitter, and the sub-region block with the gray gradient larger than or equal to the gray threshold is a sub-region block without jitter.

4. the method of claim 3, wherein the gray threshold is an average of gray gradients of the sub-region blocks.

5. the method according to claim 2, wherein the selecting the sub-region block using the gray scale gradient comprises:

calculating the gray scale gradient of each sub-region block, and sequencing the gray scale gradients according to the numerical value;

Calculating the difference between every two adjacent gray gradients according to the sorting sequence;

Calculating the average value of all the difference values, and deleting the sub-region module corresponding to the difference value larger than the average value;

The sub-region module corresponding to the difference value is a sub-region module corresponding to a larger value of the two gray gradients used for calculating the difference.

6. The method of claim 1, wherein the motion compensation of the filtered video frames using motion estimation results in compensated video frames; the method specifically comprises the following steps: and obtaining the motion information of the video frame by adopting motion estimation, and performing motion compensation on the screened video frame.

7. A video judder removal apparatus, comprising:

The screening module is used for dividing the video frame into a plurality of sub-area blocks and screening the sub-area blocks to obtain a screened video frame;

And the compensation module is used for performing motion compensation on the screened video frames by adopting motion estimation to obtain compensated video frames.

8. a video judder removal device comprising a memory, a processor and a computer program stored in said memory and executable on said processor, characterized in that said processor implements a video judder removal method as claimed in claims 1-6 when executing said computer program.

9. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out a video judder removal method as claimed in claims 1-6.

Technical Field

The present invention relates to the field of video processing technologies, and in particular, to a method and an apparatus for eliminating video jitter, a terminal device, and a storage medium.

Background

Video jitter refers to the overall displacement between video frames, thereby affecting a series of subsequent operations such as video impression and compression coding.

Technologies for detecting video jitter are currently roughly: an optical flow method, a block matching method, a feature point matching method, and a gray projection method. Fast corner detection and LK sparse optical flow are adopted in the actual operation of the optical flow method. Block matching is a common method in image denoising and motion estimation. By matching the query block with neighboring image blocks, the K blocks closest to the query block are found from these neighboring blocks. The feature point matching method and the optical flow method are relatively dependent on the search of feature points. The gray projection method is a method which is used more, has relatively small calculated amount and has good actual effect.

The optical flow method depends on the detection of characteristic points, and the robustness is poor; the block matching method has higher requirements on image stability; the feature point matching method also depends on the search of feature points, and the calculated amount is huge; the gray projection method utilizes the change of the overall gray distribution rule of the image to determine the movement between frames, but has the defects that the global motion calculation is influenced by foreground motion and the effect on the rotary motion is poor.

Disclosure of Invention

In view of the above-mentioned deficiencies of the prior art, the present invention provides a video jitter elimination method, an elimination apparatus, a terminal device and a storage medium.

the technical scheme adopted by the invention is as follows:

In a first aspect, the present invention provides a video jitter elimination method, including:

Dividing the video frame into a plurality of sub-region blocks, and screening the sub-region blocks to obtain a screened video frame;

And performing motion compensation on the screened video frame by adopting motion estimation to obtain a compensated video frame.

in a first possible implementation manner of the first aspect, the video frame is divided into a plurality of sub-region blocks, and the sub-region blocks are screened to obtain a screened video frame; the method specifically comprises the following steps:

And screening the subarea blocks by adopting gray gradient, deleting the subarea blocks with jitter to obtain blank subarea blocks, reserving the subarea blocks without jitter, and forming a screening video frame by the blank subarea blocks and the subarea blocks without jitter.

In a second possible implementation manner of the first aspect, the screening the sub-region blocks by using a gray scale gradient specifically includes:

and calculating the gray gradient of each sub-region block, and comparing the gray gradient of each sub-region block with a gradient threshold, wherein the sub-region block with the gray gradient smaller than the gray threshold is a sub-region block with jitter, and the sub-region block with the gray gradient larger than or equal to the gray threshold is a sub-region block without jitter.

Further, the gray threshold is an average value of gray gradients of the sub-region blocks.

in a third possible implementation manner of the first aspect, the screening the sub-region blocks by using a gray scale gradient specifically includes:

Calculating the gray scale gradient of each sub-region block, and sequencing the gray scale gradients according to the numerical value;

Calculating the difference between every two adjacent gray gradients according to the sorting sequence;

Calculating the average value of all the difference values, and deleting the sub-region module corresponding to the difference value larger than the average value;

The sub-region module corresponding to the difference value is a sub-region module corresponding to a larger value of the two gray gradients used for calculating the difference.

In a fourth possible implementation manner of the first aspect, the motion compensation is performed on the screened video frames by using motion estimation to obtain compensated video frames; the method specifically comprises the following steps: and obtaining the motion information of the video frame by adopting motion estimation, and performing motion compensation on the screened video frame.

in a second aspect, an embodiment of the present invention provides a video jitter removing apparatus, including:

the screening module is used for dividing the video frame into a plurality of sub-area blocks and screening the sub-area blocks to obtain a screened video frame;

And the compensation module is used for performing motion compensation on the screened video frames by adopting motion estimation to obtain compensated video frames.

in a third aspect, an embodiment of the present invention provides a video jitter removing apparatus, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the video jitter removing method when executing the computer program.

In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored, where the computer program is executed by a processor to implement a video jitter elimination method as described above.

The invention has the beneficial effects that:

The gray scale gradient of each sub-region block is calculated, and the sub-region blocks with the gray scale gradient smaller than the gradient threshold value are deleted. Video jitter is identified according to the gray gradient, and the algorithm is simple; motion compensation is carried out through motion estimation, so that the quality of finally obtained video frames is ensured; the gradient threshold value is a variable value, and the updating of the gradient threshold value according to each frame of video is realized, so that the screening of the sub-region blocks in each video frame is favorably ensured to be carried out according to the characteristics of the video frame, the video jitter elimination method is ensured to adapt according to the characteristics of the video frame, the video jitter elimination effect is favorably further improved, the integrity of the video is ensured, and the quality of each frame of video is ensured.

Drawings

FIG. 1 is a flow chart of a video jitter removal method according to the present invention;

fig. 2 is a block diagram of a video jitter removing apparatus according to the present invention.

Detailed Description

The invention provides a video jitter elimination method, which realizes the identification and elimination of jitter blur in a video frame by screening a sub-region module according to gray gradient; after the jitter blur is deleted, the blank area is compensated according to the motion estimation, so that the integrity of the video frame is ensured, and the video jitter is eliminated.

The foregoing is the core idea of the present application, and in order to make those skilled in the art better understand the scheme of the present application, the present application will be further described in detail with reference to the accompanying drawings. It should be understood that the specific features in the embodiments and examples of the present application are detailed description of the technical solutions of the present application, and are not limited to the technical solutions of the present application, and the technical features in the embodiments and examples of the present application may be combined with each other without conflict.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:潜望式摄像模组及其阵列摄像模组及其制造方法和电子设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类