CN111355881A - A Video Stabilization Method to Eliminate Rolling Shutter Artifacts and Jitters Simultaneously - Google Patents

A Video Stabilization Method to Eliminate Rolling Shutter Artifacts and Jitters Simultaneously Download PDF

Info

Publication number
CN111355881A
CN111355881A CN201911260902.8A CN201911260902A CN111355881A CN 111355881 A CN111355881 A CN 111355881A CN 201911260902 A CN201911260902 A CN 201911260902A CN 111355881 A CN111355881 A CN 111355881A
Authority
CN
China
Prior art keywords
frame
grid
motion
intra
video
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911260902.8A
Other languages
Chinese (zh)
Other versions
CN111355881B (en
Inventor
吴慧聪
杨帆
肖亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University of Science and Technology
Original Assignee
Nanjing University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing University of Science and Technology filed Critical Nanjing University of Science and Technology
Priority to CN201911260902.8A priority Critical patent/CN111355881B/en
Publication of CN111355881A publication Critical patent/CN111355881A/en
Application granted granted Critical
Publication of CN111355881B publication Critical patent/CN111355881B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/681Motion detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/68Control of cameras or camera modules for stable pick-up of the scene, e.g. compensating for camera body vibrations
    • H04N23/689Motion occurring during a rolling shutter mode
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Studio Devices (AREA)

Abstract

本发明公开了一种同时消除卷帘伪影和抖动的视频稳定化方法,包括如下步骤:1)网格化视频帧;2)估计帧间运动;3)构造数据保真项与运动平滑正则项;4)构建帧间帧内运动联合优化模型;5)估计帧内运动;6)设定自适应滑动窗口;7)计算自适应权重;8)求解复原变换;9)同时去卷帘伪影稳定化视频生成。本发明通过网格化视频的每一帧,利用单应性变换模拟帧间运动,刚性变换模拟帧内运动,建立帧间帧内运动联合模型,直接求解出去卷帘伪影且去抖动的复原变换;该方法可同时实现视频去卷帘伪影与视频稳定化,避免了视频去抖过程中的过平滑问题,可广泛应用于采用CMOS相机的手机拍摄、无人机拍摄、车载导航等多种类型的视频稳定化。

Figure 201911260902

The invention discloses a video stabilization method for simultaneously eliminating rolling shutter artifacts and jitter, comprising the following steps: 1) gridding video frames; 2) estimating motion between frames; 3) constructing data fidelity terms and motion smoothing rules 4) Construct a joint optimization model for intra-frame motion; 5) Estimate intra-frame motion; 6) Set adaptive sliding window; 7) Calculate adaptive weights; 8) Solve restoration transformation; 9) Simultaneously remove rolling shutter pseudo Shadow stabilized video generation. By gridding each frame of the video, the present invention uses homography transformation to simulate inter-frame motion, rigid transformation simulates intra-frame motion, establishes a joint model of inter-frame and intra-frame motion, and directly solves the restoration of rolling shutter artifacts and de-jittering. Transform; this method can simultaneously achieve video rolling shutter artifact removal and video stabilization, avoiding the problem of over-smoothing in the video de-shake process, and can be widely used in mobile phone shooting, drone shooting, vehicle navigation, etc. using CMOS cameras types of video stabilization.

Figure 201911260902

Description

同时消除卷帘伪影和抖动的视频稳定化方法A Video Stabilization Method to Eliminate Rolling Shutter Artifacts and Jitters Simultaneously

技术领域technical field

本发明涉及抖动视频稳定化技术,特别是一种同时消除卷帘伪影和抖动的视 频稳定化方法。The present invention relates to the stabilization technology of shaking video, in particular to a video stabilization method for simultaneously eliminating rolling shutter artifacts and shaking.

背景技术Background technique

在视频处理与显示领域,通过车载摄像平台、无人机或舰船摄像系统、手持 摄像设备等采用CMOS相机拍摄到的视频信号,往往会因为摄像机逐行成像而 存在卷帘伪影,并且拍摄过程受到随机扰动也易造成视频抖动。一方面,这些视 频退化极易引起视频观测者的视觉疲劳并且影响视频图像的内容理解,导致观察 者的误判或者漏判;另一方面,这些视频抖动和卷帘效应通常会妨碍人们对这些 视频的后续处理,例如跟踪、识别和模式分析等。In the field of video processing and display, video signals captured by CMOS cameras through vehicle-mounted camera platforms, UAV or ship camera systems, handheld camera equipment, etc. often have rolling shutter artifacts due to the camera's progressive imaging, and the shooting The random disturbance of the process is also easy to cause video jitter. On the one hand, these video degradations can easily cause visual fatigue of video observers and affect the content understanding of video images, leading to misjudgment or omission by observers; Subsequent processing of video, such as tracking, recognition and pattern analysis, etc.

目前,已经有许多针对卷帘伪影和视频抖动分离处理的方法,例如鲁棒网格 修复方法[Yeong Jun Koh,Chulwoo Lee,and Chang-Su Kim.2015.Video StabilizationBased on Feature Trajectory Augmentation and Selection and Robust Mesh GridWarping.IEEE Transactions on Image Processing 24,12(2015), 5260-5273.]和子空间方法[Feng Liu,Michael Gleicher,Jue Wang,Hailin Jin and AseemAgarwala.2011.Subspace video stabilization.ACM Transactions on Graphics 30,1(2011),4.]。鲁棒网格修复方法采取分离处理的框架,其首先对无卷帘伪影 的运动轨迹进行估计,然后对修正后的特征轨迹进行运动平滑。而子空间方法将 卷帘伪影作为一组结构化的噪声,在视频稳像的过程中隐式地去除卷帘伪影。At present, there have been many methods for rolling shutter artifacts and video jitter separation processing, such as robust mesh restoration methods [Yeong Jun Koh, Chulwoo Lee, and Chang-Su Kim. 2015. Video StabilizationBased on Feature Trajectory Augmentation and Selection and Robust Mesh GridWarping. IEEE Transactions on Image Processing 24, 12(2015), 5260-5273.] and subspace methods [Feng Liu, Michael Gleicher, Jue Wang, Hailin Jin and AseemAgarwala. 2011. Subspace video stabilization. ACM Transactions on Graphics 30 , 1 (2011), 4.]. The robust mesh repair method adopts the framework of separation processing, which firstly estimates the motion trajectories without rolling shutter artifacts, and then performs motion smoothing on the corrected feature trajectories. In contrast, the subspace method treats rolling artifact as a set of structured noises and implicitly removes the rolling artifact during video stabilization.

然而,无论是鲁棒网格修复方法或子空间方法,都是基于分别处理卷帘伪影 或视频抖动,算法过程复杂。However, both the robust mesh repair method and the subspace method are based on dealing with rolling shutter artifacts or video jitter respectively, and the algorithm process is complicated.

发明内容SUMMARY OF THE INVENTION

本发明的目的在于提供一种同时消除卷帘伪影和抖动的视频稳定化方法。The object of the present invention is to provide a video stabilization method that simultaneously eliminates rolling shutter artifacts and jitter.

实现本发明目的的技术解决方案为:一种同时消除卷帘伪影和抖动的视频稳 定化方法,该方法包括以下步骤:The technical solution that realizes the object of the present invention is: a kind of video stabilization method that simultaneously eliminates rolling shutter artifact and jitter, and the method comprises the following steps:

步骤1、网格化视频帧:假设观测到的含有卷帘伪影的抖动视频序列 为:{It|t∈[1,N]},其中N表示视频序列的帧数,对于每一帧视频图像,定义形式 为8×8的网格,则第t帧It中第i行第j列的网格可表示为

Figure BDA0002311552830000011
并定义同一网格列下相邻网格之间的曝光时间为单位时间;Step 1. Gridded video frames: Assume that the observed jittering video sequence with rolling shutter artifacts is: {I t |t∈[1,N]}, where N represents the number of frames of the video sequence, for each frame The video image is defined as an 8×8 grid, then the grid of the i-th row and the j-th column in the t -th frame It can be expressed as
Figure BDA0002311552830000011
And define the exposure time between adjacent grids under the same grid column as unit time;

步骤2、估计帧间运动:将视频序列中两两相邻帧对应的网格应用特征点检 测得到运动特征点,利用随机抽样一致性方法计算每一帧视频图像的刚性变换矩 阵与单应性矩阵,则第t帧第i行第j列网格的刚性变换矩阵与单应性矩阵分别可 表示为:

Figure BDA0002311552830000021
其中i,j∈[1,8],t∈[1,N];Step 2. Estimate inter-frame motion: apply feature points to the grids corresponding to adjacent frames in the video sequence to obtain motion feature points, and use the random sampling consistency method to calculate the rigid transformation matrix and homography of each frame of video image. matrix, then the rigid transformation matrix and the homography matrix of the grid at the ith row and the jth column of the t-th frame can be expressed as:
Figure BDA0002311552830000021
where i,j∈[1,8],t∈[1,N];

步骤3、构造数据保真项与运动平滑正则项:定义网格

Figure BDA0002311552830000022
的在单位时间内的 帧内运动为
Figure BDA0002311552830000023
利用当前帧It的前后帧It-1与It+1Step 3. Construct data fidelity term and motion smoothing regular term: define grid
Figure BDA0002311552830000022
The intra-frame motion in unit time is
Figure BDA0002311552830000023
Utilize the frame It-1 and It+1 before and after the current frame It;

依据同一网格列下的帧内运动之和与帧间运动之间的保真性,构造帧间帧内 运动数据保真项

Figure BDA0002311552830000024
According to the fidelity between the sum of the intra-frame motion and the inter-frame motion under the same grid column, construct the inter-frame intra-frame motion data fidelity term
Figure BDA0002311552830000024

依据帧内运动在采样密度浓的条件下具有的相似性,构造帧内运动平滑正则 项According to the similarity of intra-frame motion under the condition of dense sampling density, construct the smoothing regular term of intra-frame motion

Figure BDA0002311552830000025
Figure BDA0002311552830000025

步骤4、构建帧间帧内运动联合优化模型:依据步骤3构造的约束项,建立 帧间帧内运动联合优化模型:argmin{F}P(F)+λQ(F),其中,正则化参数λ>0;Step 4. Build a joint optimization model for intra-frame motion: According to the constraints constructed in Step 3, build a joint optimization model for intra-frame motion: argmin {F} P(F)+λQ(F), where the regularization parameter λ>0;

步骤5、估计帧内运动:依据刚性变换矩阵参数中的角度θ、水平位移x与垂 直位移y具有的可加性,将步骤4中的联合模型针对三种参数分别进行优化,最 终分别求解出帧内运动的角度θ、水平位移x与垂直位移y三种参数,并合成求解 出帧内运动矩阵

Figure BDA0002311552830000026
Step 5. Estimate the motion in the frame: According to the additivity of the angle θ, the horizontal displacement x and the vertical displacement y in the rigid transformation matrix parameters, the joint model in Step 4 is optimized for the three parameters, and finally solved separately. The three parameters of the angle θ, horizontal displacement x and vertical displacement y of the intra-frame motion are combined to solve the intra-frame motion matrix
Figure BDA0002311552830000026

步骤6、设定自适应滑动窗口:对每一个网格采用窗口化处理,窗口大小设 置为s,则步骤2中得到的第t帧It的帧间运动矩阵

Figure BDA0002311552830000027
Figure BDA0002311552830000028
与步骤5中得到的帧内运动矩阵
Figure BDA0002311552830000029
s的取值范围为[0,30]的整数;Step 6. Set the adaptive sliding window: adopt windowing processing for each grid, and set the window size to s, then the inter-frame motion matrix of the t -th frame It obtained in step 2
Figure BDA0002311552830000027
Figure BDA0002311552830000028
with the intra-frame motion matrix obtained in step 5
Figure BDA0002311552830000029
The value range of s is an integer in the range of [0,30];

步骤7、计算自适应权重:计算当前网格到第k帧全局快门点网格之间的时 间距离与空间距离,则权重

Figure BDA00023115528300000210
其中G(·)表 示高斯函数,最终可获得一组权重向量
Figure BDA00023115528300000211
并为同一帧的网格估计一个统一的 权重向量:
Figure BDA00023115528300000212
||·||1为矩阵的L1范数;Step 7. Calculate the adaptive weight: Calculate the time distance and spatial distance between the current grid and the kth frame global shutter point grid, then the weight
Figure BDA00023115528300000210
where G( ) represents the Gaussian function, and finally a set of weight vectors can be obtained
Figure BDA00023115528300000211
and estimate a uniform weight vector for the grid of the same frame:
Figure BDA00023115528300000212
||·|| 1 is the L1 norm of the matrix;

步骤8、求解复原变换:依据步骤7得到的自适应权重,依据关系

Figure BDA0002311552830000031
可求解第t帧It中第i行第j列的网格 的复原变化,其中wt,k为自适应权重,
Figure BDA0002311552830000032
为窗口中网格
Figure BDA0002311552830000033
到网格
Figure BDA0002311552830000034
之间的帧间 运动的累积,
Figure BDA0002311552830000035
为第k帧i行j列网格到该网格列全局快门点的帧内运动累积, 则
Figure BDA0002311552830000036
可表示当前网格到第k帧全局快门点的总运动;Step 8. Solve the restoration transformation: according to the adaptive weight obtained in step 7, according to the relationship
Figure BDA0002311552830000031
It can solve the restoration change of the grid of the i-th row and the j-th column in the t -th frame It, where w t,k is the adaptive weight,
Figure BDA0002311552830000032
grid in the window
Figure BDA0002311552830000033
to grid
Figure BDA0002311552830000034
The accumulation of inter-frame motion between,
Figure BDA0002311552830000035
is the accumulation of the intra-frame motion from the grid to the global shutter point of the kth frame i row j column, then
Figure BDA0002311552830000036
It can represent the total motion from the current grid to the global shutter point of the kth frame;

步骤9、同时去卷帘伪影稳定化视频生成:依据变换矩阵

Figure BDA0002311552830000037
Figure BDA0002311552830000038
对每一帧视频图像的每一网格进行重新绘制,最终生成去卷帘伪影的稳 定的视频图像序列。Step 9. Simultaneously remove the rolling shutter artifacts and stabilize the video generation: according to the transformation matrix
Figure BDA0002311552830000037
Figure BDA0002311552830000038
Each grid of each frame of video image is redrawn, and finally a stable video image sequence with rolling shutter artifacts is generated.

进一步的,步骤3中构造数据保真项时,依据网格

Figure BDA0002311552830000039
的帧内运动将与同一 网格列中的其他网格
Figure BDA00023115528300000310
共享,可得到性质
Figure BDA00023115528300000311
等 式左侧为网格
Figure BDA00023115528300000312
经过8个单位时间帧内运动的累积,右侧为该网格对应的帧间 运动,依据此性质可设计帧内运动之和与帧间运动之间的数据保真项P(F)。Further, when constructing the data fidelity item in step 3, according to the grid
Figure BDA0002311552830000039
The intra-frame motion will be shared with other grids in the same grid column
Figure BDA00023115528300000310
shared, available
Figure BDA00023115528300000311
The left side of the equation is the grid
Figure BDA00023115528300000312
After the accumulation of motion in 8 unit time frames, the right side is the inter-frame motion corresponding to the grid. According to this property, the data fidelity term P(F) between the sum of intra-frame motion and inter-frame motion can be designed.

进一步的,步骤3中构造运动平滑正则项时,依据帧内运动在高频采样条件 下应当具有的相似性,对于网格

Figure BDA00023115528300000313
的帧内运动
Figure BDA00023115528300000314
其与同一网格列下一网格行 的网格
Figure BDA00023115528300000315
的帧内运动
Figure BDA00023115528300000316
应具有相似性,则可设计平滑正则项
Figure BDA00023115528300000317
Figure BDA00023115528300000318
Further, when constructing the motion smoothing regular term in step 3, according to the similarity that the intra-frame motion should have under high-frequency sampling conditions, for the grid
Figure BDA00023115528300000313
Intra-frame motion
Figure BDA00023115528300000314
its grid with the same grid column next grid row
Figure BDA00023115528300000315
Intra-frame motion
Figure BDA00023115528300000316
should have similarity, then a smooth regular term can be designed
Figure BDA00023115528300000317
Figure BDA00023115528300000318

进一步的,步骤5中刚性变换定义为三自由度变换

Figure BDA00023115528300000319
其中θ、x与y分别表示两两相邻网格之间的旋 转角度、水平位移与垂直位移;该变换具有的可加性,即
Figure BDA00023115528300000320
Figure BDA00023115528300000321
Further, the rigid transformation in step 5 is defined as a three-degree-of-freedom transformation
Figure BDA00023115528300000319
where θ, x and y represent the rotation angle, horizontal displacement and vertical displacement between two adjacent grids, respectively; the transformation has additivity, that is,
Figure BDA00023115528300000320
Figure BDA00023115528300000321

进一步的,步骤5中依据刚性变换具有可加性的性质,则步骤4中的最优化 模型可转化为三个自由度上的最优化模型,对于水平位移,f表示帧内水平位移, r表示帧间水平位移,则步骤3中的数据保真项与运动平滑项转化为:Further, according to the additive property of rigid transformation in step 5, the optimization model in step 4 can be transformed into an optimization model with three degrees of freedom. For horizontal displacement, f represents the horizontal displacement within the frame, and r represents Horizontal displacement between frames, then the data fidelity term and motion smoothing term in step 3 are transformed into:

Figure BDA00023115528300000322
Figure BDA00023115528300000322

Figure BDA0002311552830000041
Figure BDA0002311552830000041

最优化模型转化为argmin{f}P(f)+λQ(f),通过新的模型可求出每一网格的水 平位移

Figure BDA0002311552830000042
垂直位移与旋转角度求解方法同水平位移;该模型以矩阵-矢量形式 可表示为:The optimization model is transformed into argmin {f} P(f)+λQ(f), and the horizontal displacement of each grid can be obtained through the new model
Figure BDA0002311552830000042
The solution methods of vertical displacement and rotation angle are the same as horizontal displacement; the model can be expressed in matrix-vector form as:

Figure BDA0002311552830000043
Figure BDA0002311552830000043

进一步的,步骤7中构造自适应权重时

Figure BDA0002311552830000044
时,定义网格
Figure BDA0002311552830000045
到网格
Figure BDA0002311552830000046
的时 间距离与空间距离分别为|t-k|与
Figure BDA0002311552830000047
Figure BDA0002311552830000048
则为两个网 格之间的水平距离,
Figure BDA0002311552830000049
为两个网格之间的垂直距离。Further, when constructing the adaptive weight in step 7
Figure BDA0002311552830000044
, define the grid
Figure BDA0002311552830000045
to grid
Figure BDA0002311552830000046
The temporal and spatial distances are |tk| and
Figure BDA0002311552830000047
Figure BDA0002311552830000048
is the horizontal distance between the two grids,
Figure BDA0002311552830000049
is the vertical distance between the two grids.

进一步的,步骤8中定义

Figure BDA00023115528300000410
为第k帧第i行j列网格到全局快门点的帧内运 动累积,若以第4网格行作为全局快门点,则第t帧It中第k行第j列的网格的帧内 运动复原矩阵可表示为:
Figure BDA00023115528300000411
通过
Figure BDA00023115528300000412
可去除每一网 格的卷帘伪影。Further, as defined in step 8
Figure BDA00023115528300000410
It is the accumulation of the intra-frame motion from the grid of the i-th row and j column of the k-th frame to the global shutter point. If the 4th grid row is used as the global shutter point, the grid of the k-th row and the j-th column in the t-th frame It is The intra-frame motion restoration matrix can be expressed as:
Figure BDA00023115528300000411
pass
Figure BDA00023115528300000412
Rolling shutter artifacts can be removed for each grid.

本发明与现有技术相比,其显著优点为:(1)针对低质视频同时出现卷帘伪 影和抖动的退化问题,现有技术往往需要去卷帘伪影和去抖动两种分离的预处理 过程,而本发明建立了一个联合处理的最优化模型,通过网格化视频帧的帧内和 帧间运动估计以及自适应滑动窗口全职调整,可克服视频稳定化中的欠平滑与过 平滑问题;(2)本发明充分利用了帧间帧内运动的相关性,并自适应地调整权重 参数,使得本发明方法同时在视频去抖动与视频去卷帘伪影方面都具有良好的效 果;(3)本发明通过网格化视频的每一帧,利用单应性变换模拟帧间运动,刚性 变换模拟帧内运动,建立帧间帧内运动联合模型,直接求解出去卷帘伪影且去抖 动的复原变换,可广泛应用于采用CMOS相机的手机拍摄、无人机拍摄、车载 导航等多种类型的视频稳定化。Compared with the prior art, the present invention has the following significant advantages: (1) For the degradation problem of rolling-shutter artifact and jitter appearing at the same time in low-quality video, the prior art often requires two separate methods for rolling-shutter artifact and jitter removal. preprocessing process, and the present invention establishes an optimization model of joint processing, which can overcome the under-smoothing and over-smoothing in video stabilization through intra-frame and inter-frame motion estimation of gridded video frames and full-time adjustment of adaptive sliding window. smoothing problem; (2) the present invention makes full use of the inter-frame and intra-frame motion correlation, and adaptively adjusts the weight parameters, so that the method of the present invention has good effects in both video de-jitter and video rolling-shutter artifact removal at the same time. (3) The present invention utilizes homography transformation to simulate inter-frame motion, and rigid transformation simulates intra-frame motion through each frame of gridded video, establishes a joint model of inter-frame intra-frame motion, and directly solves the rolling shutter artifact and The recovery transformation of de-shake can be widely used in various types of video stabilization, such as mobile phone shooting, drone shooting, and car navigation using CMOS cameras.

附图说明Description of drawings

图1是本发明的同时消除卷帘伪影和抖动的视频稳定化方法流程图。FIG. 1 is a flow chart of the video stabilization method for simultaneously eliminating rolling shutter artifacts and jitter according to the present invention.

图2(a)是第一个测试视频的第一帧图。Figure 2(a) is the first frame of the first test video.

图2(b)是第一个测试视频的第二帧图。Figure 2(b) is the second frame of the first test video.

图2(c)是原始两帧之间的残差图。Figure 2(c) is the residual map between the original two frames.

图2(d)是仅用本方法去抖动后两帧之间的残差图。Fig. 2(d) is the residual image between two frames after only using this method to de-jitter.

图2(e)是鲁棒网格修复方法处理后两帧之间的残差图。Figure 2(e) is a residual map between two frames after processing by the robust mesh repair method.

图2(f)是本方法同时去抖动与去卷帘伪影后两帧之间的残差图。Figure 2(f) is the residual image between two frames after simultaneous de-jitter and rolling-shutter artifact removal by this method.

图3(a)是原始的特征点轨迹图。Figure 3(a) is the original feature point trajectory map.

图3(b)是鲁棒网格修复方法处理后的特征点轨迹图。Figure 3(b) is the feature point trajectories processed by the robust mesh repair method.

图3(c)是子空间方法处理后的特征点轨迹图。Figure 3(c) is the feature point trajectory after processing by the subspace method.

图3(d)是本发明方法处理后的特征点轨迹图。Fig. 3(d) is a trajectory diagram of the feature points processed by the method of the present invention.

图4(a)是测试视频中随机挑选的三帧原始图。Figure 4(a) is the original image of three randomly selected frames in the test video.

图4(b)是三帧图经由鲁棒网格修复方法处理后的结果图。Figure 4(b) is the result of the three-frame image processed by the robust mesh repair method.

图4(c)是三帧图经由子空间方法处理后的结果图。FIG. 4( c ) is the result of processing the three-frame image by the subspace method.

图4(d)是三帧图经由本发明方法处理后的结果图。FIG. 4(d) is a result diagram of the three-frame image processed by the method of the present invention.

图5中的(1)-(10)分别为本发明实验使用的包含抖动与卷帘伪影的10 个测试视频图。(1)-(10) in FIG. 5 are 10 test video images including jitter and rolling shutter artifacts used in the experiment of the present invention, respectively.

图6是对35名用户的视频视觉评价结果图。FIG. 6 is a graph showing the results of video visual evaluation for 35 users.

具体实施方式Detailed ways

本发明针对CMOS相机拍摄的视频,实现同时去除视频中的卷帘伪影与抖 动的效果,通过对帧间帧内运动建立估计模型,提出了同时消除卷帘伪影和抖动 的一种联合优化方法。下面结合图1,详细说明本发明的实施过程:Aiming at the video shot by the CMOS camera, the invention realizes the effect of simultaneously removing the rolling shutter artifacts and the jitter in the video, and proposes a joint optimization for simultaneously eliminating the rolling shutter artifacts and the jitter by establishing an estimation model for the motion between frames and frames. method. Below in conjunction with Fig. 1, the implementation process of the present invention is described in detail:

步骤1、网格化视频帧:假设观测到的含有卷帘伪影的抖动视频序列 为:{It|t∈[1,N]},其中N表示视频序列的帧数,对于每一帧视频图像,定义形式 为8×8的网格,则第t帧It中第i行第j列的网格可表示为

Figure BDA0002311552830000051
并定义同一网格列下相邻网格之间的曝光时间为单位时间。Step 1. Gridded video frames: Assume that the observed jittering video sequence with rolling shutter artifacts is: {I t |t∈[1,N]}, where N represents the number of frames of the video sequence, for each frame The video image is defined as an 8×8 grid, then the grid of the i-th row and the j-th column in the t -th frame It can be expressed as
Figure BDA0002311552830000051
And define the exposure time between adjacent grids under the same grid column as unit time.

步骤2、估计帧间运动:将视频序列中两两相邻帧对应的网格应用特征点检 测得到稠密的运动特征点,利用随机抽样一致性方法计算每一帧视频图像的刚性 变换矩阵与单应性矩阵,则第t帧第i行第j列网格的刚性变换矩阵与单应性矩阵 分别可表示为:

Figure BDA0002311552830000061
其中i,j∈[1,8],t∈[1,N]。Step 2. Estimate inter-frame motion: use feature points to detect the grids corresponding to adjacent frames in the video sequence to obtain dense motion feature points, and use the random sampling consistency method to calculate the rigid transformation matrix of each frame of video image and the single frame. The rigid transformation matrix and the homography matrix of the grid at the ith row and the jth column of the t-th frame can be expressed as:
Figure BDA0002311552830000061
where i,j∈[1,8],t∈[1,N].

步骤3、构造数据保真项与运动平滑正则项:定义网格

Figure BDA0002311552830000062
的在单位时间内的 帧内运动为
Figure BDA0002311552830000063
利用当前帧It的前后帧It-1与It+1Step 3. Construct data fidelity term and motion smoothing regular term: define grid
Figure BDA0002311552830000062
The intra-frame motion in unit time is
Figure BDA0002311552830000063
Use the frames It-1 and It+1 before and after the current frame It.

依据同一网格列下的帧内运动之和与帧间运动之间的保真性,构造帧间帧内 运动数据保真项

Figure BDA0002311552830000064
According to the fidelity between the sum of the intra-frame motion and the inter-frame motion under the same grid column, construct the inter-frame intra-frame motion data fidelity term
Figure BDA0002311552830000064

依据帧内运动在采样密度浓的条件下具有的相似性,构造帧内运动平滑正则项According to the similarity of intra-frame motion under the condition of dense sampling density, construct an intra-frame motion smoothing regular term

Figure BDA0002311552830000065
Figure BDA0002311552830000065

步骤3.1、构造数据保真项时,依据网格

Figure BDA0002311552830000066
的帧内运动将与同一网格列中的 其他网格
Figure BDA0002311552830000067
共享,可得到性质
Figure BDA0002311552830000068
等式左侧为网 格
Figure BDA0002311552830000069
经过8个单位时间帧内运动的累积,右侧为该网格对应的帧间运动,依据 此性质可设计帧内运动之和与帧间运动之间的数据保真项P(F)。Step 3.1. When constructing data fidelity items, according to the grid
Figure BDA0002311552830000066
The intra-frame motion will be shared with other grids in the same grid column
Figure BDA0002311552830000067
shared, available
Figure BDA0002311552830000068
The left side of the equation is the grid
Figure BDA0002311552830000069
After the accumulation of motion in 8 unit time frames, the right side is the inter-frame motion corresponding to the grid. According to this property, the data fidelity term P(F) between the sum of intra-frame motion and inter-frame motion can be designed.

步骤3.2、构造运动平滑正则项时,依据帧内运动在高频采样条件下应当具 有的相似性,对于网格

Figure BDA00023115528300000610
的帧内运动
Figure BDA00023115528300000611
其与同一网格列下一网格行的网格
Figure BDA00023115528300000612
的帧内运动
Figure BDA00023115528300000613
应具有相似性,则可设计平滑正则项
Figure BDA00023115528300000614
Step 3.2. When constructing the motion smoothing regular term, according to the similarity that the motion in the frame should have under the condition of high frequency sampling, for the grid
Figure BDA00023115528300000610
Intra-frame motion
Figure BDA00023115528300000611
its grid with the same grid column next grid row
Figure BDA00023115528300000612
Intra-frame motion
Figure BDA00023115528300000613
should have similarity, then a smooth regular term can be designed
Figure BDA00023115528300000614

步骤4、构建帧间帧内运动联合优化模型:依据步骤3构造的约束项,建立 帧间帧内运动联合优化模型:argmin{F}P(F)+λQ(F),其中,正则化参数λ>0。Step 4. Build a joint optimization model for intra-frame motion: According to the constraints constructed in Step 3, build a joint optimization model for intra-frame motion: argmin {F} P(F)+λQ(F), where the regularization parameter λ>0.

步骤5、估计帧内运动:依据刚性变换矩阵参数中的角度θ、水平位移x与垂 直位移y具有的可加性,将步骤4中的联合模型针对三种参数分别进行优化,最 终分别求解出帧内运动的角度θ、水平位移x与垂直位移y三种参数,并合成求解 出帧内运动矩阵

Figure BDA00023115528300000615
Step 5. Estimate the motion in the frame: According to the additivity of the angle θ, the horizontal displacement x and the vertical displacement y in the rigid transformation matrix parameters, the joint model in Step 4 is optimized for the three parameters, and finally solved separately. The three parameters of the angle θ, horizontal displacement x and vertical displacement y of the intra-frame motion are combined to solve the intra-frame motion matrix
Figure BDA00023115528300000615

步骤5.1、刚性变换定义为三自由度变换

Figure BDA00023115528300000616
其 中θ,x与y分别表示两两相邻网格之间的旋转角度,水平位移与垂直位移。依据该 变换具有的可加性,即
Figure BDA0002311552830000071
Step 5.1, the rigid transformation is defined as a three-degree-of-freedom transformation
Figure BDA00023115528300000616
where θ, x and y represent the rotation angle, horizontal displacement and vertical displacement between two adjacent grids, respectively. According to the additivity of this transformation, that is
Figure BDA0002311552830000071

步骤5.2、依据刚性变换具有可加性的性质,则步骤4中的最优化模型可转 化为三个自由度上的最优化模型,如对于水平位移,f表示帧内水平位移,r表示 帧间水平位移,则步骤3中的数据保真项与运动平滑项转化为:Step 5.2. According to the additivity of rigid transformation, the optimization model in step 4 can be transformed into an optimization model with three degrees of freedom. For example, for horizontal displacement, f represents the horizontal displacement within the frame, and r represents the inter-frame horizontal displacement. Horizontal displacement, the data fidelity term and motion smoothing term in step 3 are transformed into:

Figure BDA0002311552830000072
Figure BDA0002311552830000072

Figure BDA0002311552830000073
Figure BDA0002311552830000073

最优化模型转化为argmin{f}P(f)+λQ(f),通过新的模型可求出每一网格的水 平位移

Figure BDA0002311552830000074
并推广到垂直位移与旋转角度上。该模型以矩阵-矢量形式可表示为:The optimization model is transformed into argmin {f} P(f)+λQ(f), and the horizontal displacement of each grid can be obtained through the new model
Figure BDA0002311552830000074
And generalized to vertical displacement and rotation angle. The model can be represented in matrix-vector form as:

Figure BDA0002311552830000075
Figure BDA0002311552830000075

步骤6、设定自适应滑动窗口:对每一个网格采用窗口化处理,窗口大小设 置为s,则步骤2中得到的第t帧It的帧间运动矩阵

Figure BDA0002311552830000076
Figure BDA0002311552830000077
与步骤5中得到的帧内运动矩阵
Figure BDA0002311552830000078
s的取值范围为[0,30]的整数。Step 6. Set the adaptive sliding window: adopt windowing processing for each grid, and set the window size to s, then the inter-frame motion matrix of the t -th frame It obtained in step 2
Figure BDA0002311552830000076
Figure BDA0002311552830000077
with the intra-frame motion matrix obtained in step 5
Figure BDA0002311552830000078
The value range of s is an integer in the range [0,30].

步骤7、计算自适应权重:计算当前网格到第k帧全局快门点网格之间的时 间距离与空间距离,则权重

Figure BDA0002311552830000079
其中G(·)表 示高斯函数,最终可获得一组权重向量
Figure BDA00023115528300000710
并为同一帧的网格估计一个统一的 权重向量:
Figure BDA00023115528300000711
为矩阵的L1范数。Step 7. Calculate the adaptive weight: Calculate the time distance and spatial distance between the current grid and the kth frame global shutter point grid, then the weight
Figure BDA0002311552830000079
where G( ) represents the Gaussian function, and finally a set of weight vectors can be obtained
Figure BDA00023115528300000710
and estimate a uniform weight vector for the grid of the same frame:
Figure BDA00023115528300000711
is the L1 norm of the matrix.

构造自适应权重时

Figure BDA00023115528300000712
时,定义网格
Figure BDA00023115528300000713
到网格
Figure BDA00023115528300000714
的时间距离与空间距离分 别为|t-k|与
Figure BDA0002311552830000081
Figure BDA0002311552830000082
则为两个网格之间的水平距离,
Figure BDA0002311552830000083
为两个网格之间的垂直距离。When constructing adaptive weights
Figure BDA00023115528300000712
, define the grid
Figure BDA00023115528300000713
to grid
Figure BDA00023115528300000714
The temporal and spatial distances are |tk| and
Figure BDA0002311552830000081
Figure BDA0002311552830000082
is the horizontal distance between the two grids,
Figure BDA0002311552830000083
is the vertical distance between the two grids.

步骤8、求解复原变换:依据步骤7得到的自适应权重,依据关系

Figure BDA0002311552830000084
可求解第t帧It中第i行第j列的网格 的复原变化,其中wt,k为自适应权重,
Figure BDA0002311552830000085
为窗口中网格
Figure BDA0002311552830000086
到网格
Figure BDA0002311552830000087
之间的帧间 运动的累积,
Figure BDA0002311552830000088
为第k帧i行j列网格到改网格列全局快门点的帧内运动累积, 则
Figure BDA0002311552830000089
可表示当前网格到第k帧全局快门点的总运动。Step 8. Solve the restoration transformation: according to the adaptive weight obtained in step 7, according to the relationship
Figure BDA0002311552830000084
It can solve the restoration change of the grid of the i-th row and the j-th column in the t -th frame It, where w t,k is the adaptive weight,
Figure BDA0002311552830000085
grid in the window
Figure BDA0002311552830000086
to grid
Figure BDA0002311552830000087
The accumulation of inter-frame motion between,
Figure BDA0002311552830000088
is the intra-frame motion accumulation from the grid of the kth frame i row j column to the global shutter point of the new grid column, then
Figure BDA0002311552830000089
It can represent the total motion of the current grid to the global shutter point of the kth frame.

定义

Figure BDA00023115528300000810
为第k帧i行j列网格到改网格列全局快门点的帧内运动累积,若以 第4网格行作为全局快门点,则第t帧It中第k行第j列的网格的帧内运动复原矩阵 可表示为:
Figure BDA00023115528300000811
通过
Figure BDA00023115528300000812
可去除每一网格的卷帘伪影。definition
Figure BDA00023115528300000810
It is the intra-frame motion accumulation from the grid in the i row and j column of the kth frame to the global shutter point of the changed grid column. The intra-frame motion restoration matrix of the grid can be expressed as:
Figure BDA00023115528300000811
pass
Figure BDA00023115528300000812
Rolling shutter artifacts can be removed for each grid.

步骤9、同时去卷帘伪影稳定化视频生成:依据变换矩阵

Figure BDA00023115528300000813
Figure BDA00023115528300000814
对每一帧视频图像的每一网格进行重新绘制,最终生成去卷帘伪影的稳 定的视频图像序列。Step 9. Simultaneously remove the rolling shutter artifacts and stabilize the video generation: according to the transformation matrix
Figure BDA00023115528300000813
Figure BDA00023115528300000814
Each grid of each frame of video image is redrawn, and finally a stable video image sequence with rolling shutter artifacts is generated.

本发明的效果可通过以下仿真实验进一步说明:The effect of the present invention can be further illustrated by the following simulation experiments:

(1)仿真条件(1) Simulation conditions

仿真实验采用十组含有卷帘伪影的抖动视频数据,本仿真实验均在Windows 7操作系统下采用Matlab R2012完成。处理器为Xeon W3520 CPU(2.66GHz), 内存为4GB。仿真实验中各个参数的初始化值为:正则化参数λ设置为1,两个 高斯函数的标准差分别为6与30,窗口长度为2s+1且s=30。Ten groups of jitter video data containing rolling shutter artifacts are used in the simulation experiments. The simulation experiments are all completed under the Windows 7 operating system using Matlab R2012. The processor is a Xeon W3520 CPU (2.66GHz), and the memory is 4GB. The initialization values of each parameter in the simulation experiment are: the regularization parameter λ is set to 1, the standard deviations of the two Gaussian functions are 6 and 30, respectively, and the window length is 2s+1 and s=30.

本发明方法的性能通过用户视觉主观体验定性评价进行分析。实验中,35 名参与者对不同稳定化方法的结果视频进行主观打分,为了公平测试,参与者在 未知具体方法时选出人体视觉感受较好的视频。The performance of the method of the present invention is analyzed by qualitative evaluation of the user's visual subjective experience. In the experiment, 35 participants subjectively scored the resulting videos of different stabilization methods. For fair testing, participants selected videos with better human visual perception when the specific methods were unknown.

(2)仿真内容(2) Simulation content

本发明采用真实抖动视频数据检验算法的去抖动性能,测试视频为含有卷帘 伪影的抖动视频。为测试本发明算法的性能,将提出的视频稳定化方法与目前国 际上主流的方法对比。对比方法包括:鲁棒性网格修复方法与子空间方法。The present invention adopts real shaking video data to check the de-shaking performance of the algorithm, and the test video is a shaking video containing rolling shutter artifacts. In order to test the performance of the algorithm of the present invention, the proposed video stabilization method is compared with the current international mainstream method. The comparison methods include: robust mesh repair method and subspace method.

(3)仿真实验结果分析(3) Analysis of simulation results

图2(a)~图2(f)为不同去卷帘伪影方法得到两帧图像的残差图,图3(a) ~图3(d)为不同视频稳定化方法处理后的特征点轨迹图,图4(a)~图4(d) 为不同同时去除卷帘伪影与抖动的方法得到的结果图,图5为10个测试视频, 图6为35名用户对10个测试视频的视觉评价结果。Figures 2(a) to 2(f) are the residuals of two frames of images obtained by different methods of removing the rolling shutter artifact, and Figures 3(a) to 3(d) are the feature points processed by different video stabilization methods. Trajectory diagrams, Figure 4(a)~Figure 4(d) are the results obtained by different methods of simultaneously removing rolling shutter artifacts and jitter, Figure 5 is 10 test videos, Figure 6 is 35 users on 10 test videos visual evaluation results.

图2(a)~图2(f)中采用帧差法对修复效果进行可视化。图2(a)是第一 个测试视频的第一帧图,图2(b)是第一个测试视频的第二帧图,图2(c)是 原始两帧之间的残差图,图2(d)是仅用本方法去抖动后两帧之间的残差图, 图2(e)是鲁棒网格修复方法处理后两帧之间的残差图,图2(f)是本方法同 时去抖动与去卷帘伪影后两帧之间的残差图。可明显观察到,使用本方法同时去 除抖动与卷帘伪影得到两帧图像之间的残差最小,能够很好的去除视频中含有的 卷帘伪影与抖动效果。In Figures 2(a) to 2(f), the frame difference method is used to visualize the restoration effect. Figure 2(a) is the first frame of the first test video, Figure 2(b) is the second frame of the first test video, and Figure 2(c) is the residual image between the original two frames, Figure 2(d) is the residual image between the two frames after de-jittering with this method, Figure 2(e) is the residual image between the two frames after the robust mesh repair method, and Figure 2(f) is the residual map between the two frames after simultaneous de-jittering and rolling-shutter artifact removal by this method. It can be clearly observed that using this method to remove jitter and rolling shutter artifacts at the same time obtains the smallest residual between the two frames of images, which can well remove the rolling shutter artifacts and jitter effects contained in the video.

图3(a)是原始的特征点轨迹图,图3(b)是鲁棒网格修复方法处理后的 特征点轨迹图,图3(c)是子空间方法处理后的特征点轨迹图,图3(d)是本 发明方法处理后的特征点轨迹图。可观测到,本发明方法在处理视频抖动时也具 有良好的效果,由于采用了自适应的权重设计,在处理阶跃运动类型的抖动时, 不易出现过平滑的现象,表明了本发明方法在视频去抖动方面也有极好的效果。Figure 3(a) is the original feature point trajectory diagram, Figure 3(b) is the feature point trajectory diagram processed by the robust grid repair method, and Figure 3(c) is the feature point trajectory diagram processed by the subspace method, Fig. 3(d) is a trajectory diagram of the feature points processed by the method of the present invention. It can be observed that the method of the present invention also has a good effect when dealing with video jitter. Due to the adaptive weight design, when dealing with the jitter of the step motion type, the phenomenon of over-smoothing is not easy to occur, which shows that the method of the present invention is effective in It also has excellent results in video de-shaking.

图4(a)是测试视频中随机挑选的三帧原始图,图4(b)是三帧图经由鲁 棒网格修复方法处理后的结果图,图4(c)是三帧图经由子空间方法处理后的 结果图,图4(d)是三帧图经由本发明方法处理后的结果图。由图4(a)~图4 (d)可看出,子空间方法仅仅将卷帘伪影作为一种结构化的噪声,在视频去抖 动过程中隐式地处理,其结果出现了空间扭曲的现象,而鲁棒网格修复方法和本 发明方法都有一个特定的步骤来处理卷帘伪影,因此可在一定程度上纠正对象。 此外,由于本发明采用自适应权值,我们的结果比其他两种方法在快速运动的情 况下保存了更多的图像信息。Figure 4(a) is the original image of three frames randomly selected from the test video, Figure 4(b) is the result image of the three-frame image processed by the robust grid repair method, and Figure 4(c) is the image of the three-frame image after sub-processing Figure 4(d) is the result of the three-frame image processed by the method of the present invention. As can be seen from Figure 4(a)~Figure 4(d), the subspace method only treats the rolling shutter artifact as a kind of structured noise, which is implicitly processed in the process of video debounce, resulting in spatial distortion. phenomenon, while both the robust mesh repair method and the method of the present invention have a specific step to deal with the rolling shutter artifact, so the object can be corrected to a certain extent. Furthermore, our results preserve more image information than the other two methods in the case of fast motion due to the adaptive weights employed in the present invention.

图6显示了对35名用户的视频视觉评价结果图。由于人们可能有不同的标 准,因此很难设计一个指标来定量评估稳定和卷帘门校正的效果。因此,我们对 35名参与者进行了用户调研,进行了定性比较。图5为随机选择的是个测试视 频,对每个测试视频,用户在未知三种修复方法的情况下(鲁棒网格修复方法、 子空间方法与本发明方法),选择其认为视觉效果最好的视频。在第7、9、10 个视频的测试用例中,没有参与者选择子空间方法,因为存在明显的几何畸变, 视觉体验大大降低。此外,更多的用户更倾向于本发明方法,他们认为本发明方 法在运动平滑和信息保存之间取得了更好的平衡,因此认为本发明方法优于其它 两种最先进的方法,实现了同时去除视频抖动和去除卷帘伪影。Figure 6 shows a graph of video visual evaluation results for 35 users. Since people may have different standards, it is difficult to devise a metric to quantitatively assess the effects of stabilization and shutter correction. Therefore, we conducted a user survey of 35 participants for qualitative comparisons. Fig. 5 is a randomly selected test video. For each test video, when the user does not know the three repair methods (robust grid repair method, subspace method and the method of the present invention), he chooses the best visual effect. 's video. In the test cases of the 7th, 9th, and 10th videos, no participant chose the subspace method, because of the obvious geometric distortion, the visual experience was greatly reduced. In addition, more users are more inclined to the method of the present invention, they believe that the method of the present invention achieves a better balance between motion smoothing and information preservation, and therefore believe that the method of the present invention is superior to the other two state-of-the-art methods, achieving Simultaneously removes video jitter and removes rolling shutter artifacts.

Claims (7)

1.一种同时消除卷帘伪影和抖动的视频稳定化方法,其特征在于,该方法包括以下步骤:1. a kind of video stabilization method that eliminates rolling shutter artifact and shaking simultaneously, it is characterised in that the method comprises the following steps: 步骤1、网格化视频帧:假设观测到的含有卷帘伪影的抖动视频序列为:{It|t∈[1,N]},其中N表示视频序列的帧数,对于每一帧视频图像,定义形式为8×8的网格,则第t帧It中第i行第j列的网格可表示为
Figure FDA0002311552820000011
i,j∈[1,8],t∈[1,N],并定义同一网格列下相邻网格之间的曝光时间为单位时间;
Step 1. Gridded video frames: Assume that the observed jittering video sequence with rolling shutter artifacts is: {I t |t∈[1,N]}, where N represents the number of frames of the video sequence, for each frame The video image is defined as an 8×8 grid, then the grid of the i-th row and the j-th column in the t -th frame It can be expressed as
Figure FDA0002311552820000011
i, j∈[1,8], t∈[1,N], and define the exposure time between adjacent grids under the same grid column as unit time;
步骤2、估计帧间运动:将视频序列中两两相邻帧对应的网格应用特征点检测得到运动特征点,利用随机抽样一致性方法计算每一帧视频图像的刚性变换矩阵与单应性矩阵,则第t帧第i行第j列网格的刚性变换矩阵与单应性矩阵分别可表示为:
Figure FDA0002311552820000012
其中i,j∈[1,8],t∈[1,N];
Step 2. Estimate inter-frame motion: apply feature points to the grids corresponding to adjacent frames in the video sequence to obtain motion feature points, and use the random sampling consistency method to calculate the rigid transformation matrix and homography of each frame of video image. matrix, then the rigid transformation matrix and the homography matrix of the grid at the ith row and the jth column of the t-th frame can be expressed as:
Figure FDA0002311552820000012
where i, j∈[1,8], t∈[1,N];
步骤3、构造数据保真项与运动平滑正则项:定义网格
Figure FDA0002311552820000013
的在单位时间内的帧内运动为
Figure FDA0002311552820000014
利用当前帧It的前后帧It-1与It+1
Step 3. Construct data fidelity term and motion smoothing regular term: define grid
Figure FDA0002311552820000013
The intra-frame motion in unit time is
Figure FDA0002311552820000014
Utilize the frame It-1 and It+1 before and after the current frame It;
依据同一网格列下的帧内运动之和与帧间运动之间的保真性,构造帧间帧内运动数据保真项
Figure FDA0002311552820000015
According to the fidelity between the sum of the intra-frame motion and the inter-frame motion under the same grid column, construct the inter-frame intra-frame motion data fidelity term
Figure FDA0002311552820000015
依据帧内运动在采样密度浓的条件下具有的相似性,构造帧内运动平滑正则项According to the similarity of intra-frame motion under the condition of dense sampling density, construct an intra-frame motion smoothing regular term
Figure FDA0002311552820000016
Figure FDA0002311552820000016
步骤4、构建帧间帧内运动联合优化模型:依据步骤3构造的约束项,建立帧间帧内运动联合优化模型:arg min{F}P(F)+λQ(F),其中,正则化参数λ>0;Step 4. Build a joint optimization model for intra-frame motion: According to the constraints constructed in step 3, build a joint optimization model for intra-frame motion: arg min {F} P(F)+λQ(F), where regularization parameter λ>0; 步骤5、估计帧内运动:依据刚性变换矩阵参数中的角度θ、水平位移x与垂直位移y具有的可加性,将步骤4中的联合模型针对三种参数分别进行优化,最终分别求解出帧内运动的角度θ、水平位移x与垂直位移y三种参数,并合成求解出帧内运动矩阵
Figure FDA0002311552820000017
Step 5. Estimate the motion in the frame: According to the additivity of the angle θ, the horizontal displacement x and the vertical displacement y in the rigid transformation matrix parameters, the joint model in Step 4 is optimized for the three parameters, and finally solved separately. The three parameters of the angle θ, horizontal displacement x and vertical displacement y of the intra-frame motion are combined to solve the intra-frame motion matrix
Figure FDA0002311552820000017
步骤6、设定自适应滑动窗口:对每一个网格采用窗口化处理,窗口大小设置为s,则步骤2中得到的第t帧It的帧间运动矩阵
Figure FDA0002311552820000018
Figure FDA0002311552820000019
与步骤5中得到的帧内运动矩阵
Figure FDA00023115528200000110
s的取值范围为[0,30]的整数;
Step 6. Set the adaptive sliding window: adopt windowing processing for each grid, and set the window size to s, then the inter-frame motion matrix of the t -th frame It obtained in step 2
Figure FDA0002311552820000018
Figure FDA0002311552820000019
with the intra-frame motion matrix obtained in step 5
Figure FDA00023115528200000110
The value range of s is an integer in the range of [0, 30];
步骤7、计算自适应权重:计算当前网格到第k帧全局快门点网格之间的时间距离与空间距离,则权重
Figure FDA0002311552820000021
其中G(·)表示高斯函数,最终可获得一组权重向量
Figure FDA0002311552820000022
并为同一帧的网格估计一个统一的权重向量:
Figure FDA0002311552820000023
为矩阵的L1范数;
Step 7. Calculate the adaptive weight: Calculate the time distance and spatial distance between the current grid and the kth frame global shutter point grid, then the weight
Figure FDA0002311552820000021
where G( ) represents the Gaussian function, and finally a set of weight vectors can be obtained
Figure FDA0002311552820000022
and estimate a uniform weight vector for the grid of the same frame:
Figure FDA0002311552820000023
is the L1 norm of the matrix;
步骤8、求解复原变换:依据步骤7得到的自适应权重,依据关系
Figure FDA0002311552820000024
i,j∈[1,8],t∈[1,N]可求解第t帧It中第i行第j列的网格的复原变化,其中wt,k为自适应权重,
Figure FDA0002311552820000025
为窗口中网格
Figure FDA0002311552820000026
到网格
Figure FDA0002311552820000027
之间的帧间运动的累积,
Figure FDA0002311552820000028
为第k帧i行j列网格到该网格列全局快门点的帧内运动累积,则
Figure FDA0002311552820000029
可表示当前网格到第k帧全局快门点的总运动;
Step 8. Solve the restoration transformation: according to the adaptive weight obtained in step 7, according to the relationship
Figure FDA0002311552820000024
i, j∈[1,8], t∈[1,N] can solve the restoration change of the grid in the i-th row and j-th column in the t-th frame I t , where w t, k are the adaptive weights,
Figure FDA0002311552820000025
grid in the window
Figure FDA0002311552820000026
to grid
Figure FDA0002311552820000027
The accumulation of inter-frame motion between,
Figure FDA0002311552820000028
is the intra-frame motion accumulation from the grid to the global shutter point of the kth frame i row j column, then
Figure FDA0002311552820000029
It can represent the total motion from the current grid to the global shutter point of the kth frame;
步骤9、同时去卷帘伪影稳定化视频生成:依据变换矩阵
Figure FDA00023115528200000210
Figure FDA00023115528200000211
对每一帧视频图像的每一网格进行重新绘制,最终生成去卷帘伪影的稳定的视频图像序列。
Step 9. Simultaneously remove the rolling shutter artifacts and stabilize the video generation: according to the transformation matrix
Figure FDA00023115528200000210
Figure FDA00023115528200000211
Each grid of each frame of video image is redrawn, and finally a stable video image sequence with rolling shutter artifacts is generated.
2.根据权利要求1所述的同时消除卷帘伪影和抖动的视频稳定化方法,其特征在于:步骤3中构造数据保真项时,依据网格
Figure FDA00023115528200000212
的帧内运动将与同一网格列中的其他网格
Figure FDA00023115528200000213
共享,可得到性质
Figure FDA00023115528200000214
等式左侧为网格
Figure FDA00023115528200000215
经过8个单位时间帧内运动的累积,右侧为该网格对应的帧间运动,依据此性质可设计帧内运动之和与帧间运动之间的数据保真项P(F)。
2. the video stabilization method of eliminating rolling shutter artifact and shaking simultaneously according to claim 1, is characterized in that: when constructing data fidelity item in step 3, according to grid
Figure FDA00023115528200000212
The intra-frame motion will be shared with other grids in the same grid column
Figure FDA00023115528200000213
shared, available
Figure FDA00023115528200000214
The left side of the equation is the grid
Figure FDA00023115528200000215
After the accumulation of motion in 8 unit time frames, the right side is the inter-frame motion corresponding to the grid. According to this property, the data fidelity term P(F) between the sum of intra-frame motion and inter-frame motion can be designed.
3.根据权利要求1所述的同时消除卷帘伪影和抖动的视频稳定化方法,其特征在于:步骤3中构造运动平滑正则项时,依据帧内运动在高频采样条件下应当具有的相似性,对于网格
Figure FDA00023115528200000216
的帧内运动
Figure FDA00023115528200000217
其与同一网格列下一网格行的网格
Figure FDA00023115528200000218
的帧内运动
Figure FDA00023115528200000219
应具有相似性,则可设计平滑正则项
Figure FDA00023115528200000220
3. the video stabilization method that eliminates rolling shutter artifact and jitter simultaneously according to claim 1, is characterized in that: when constructing motion smoothing regular term in step 3, should have under high-frequency sampling condition according to intra-frame motion. similarity, for grids
Figure FDA00023115528200000216
Intra-frame motion
Figure FDA00023115528200000217
its grid with the same grid column next grid row
Figure FDA00023115528200000218
Intra-frame motion
Figure FDA00023115528200000219
should have similarity, then a smooth regular term can be designed
Figure FDA00023115528200000220
4.根据权利要求1所述的同时消除卷帘伪影和抖动的视频稳定化方法,其特征在于:步骤5中刚性变换定义为三自由度变换
Figure FDA0002311552820000031
其中θ、x与y分别表示两两相邻网格之间的旋转角度、水平位移与垂直位移;该变换具有的可加性,即
Figure FDA0002311552820000032
Figure FDA0002311552820000033
4. the video stabilization method of eliminating rolling shutter artifact and shaking simultaneously according to claim 1, is characterized in that: in step 5, rigid transformation is defined as three degrees of freedom transformation
Figure FDA0002311552820000031
where θ, x and y represent the rotation angle, horizontal displacement and vertical displacement between two adjacent grids, respectively; the transformation has additivity, that is,
Figure FDA0002311552820000032
Figure FDA0002311552820000033
5.根据权利要求1所述的同时消除卷帘伪影和抖动的视频稳定化方法,其特征在于:步骤5中依据刚性变换具有可加性的性质,则步骤4中的最优化模型可转化为三个自由度上的最优化模型,对于水平位移,f表示帧内水平位移,r表示帧间水平位移,则步骤3中的数据保真项与运动平滑项转化为:5. the video stabilization method that eliminates rolling shutter artifact and jitter simultaneously according to claim 1, is characterized in that: in step 5, according to rigid transformation has the property of additivity, then the optimization model in step 4 can be transformed is the optimization model on three degrees of freedom. For horizontal displacement, f represents the horizontal displacement within the frame, and r represents the horizontal displacement between frames. Then the data fidelity term and motion smoothing term in step 3 are transformed into:
Figure FDA0002311552820000034
Figure FDA0002311552820000034
最优化模型转化为arg min{f}P(f)+λQ(f),通过新的模型可求出每一网格的水平位移
Figure FDA0002311552820000035
垂直位移与旋转角度求解方法同水平位移;该模型以矩阵-矢量形式可表示为:
The optimization model is transformed into arg min {f} P(f)+λQ(f), and the horizontal displacement of each grid can be obtained through the new model
Figure FDA0002311552820000035
The solution methods of vertical displacement and rotation angle are the same as horizontal displacement; the model can be expressed in matrix-vector form as:
Figure FDA0002311552820000036
Figure FDA0002311552820000036
.
6.根据权利要求1所述的同时消除卷帘伪影和抖动的视频稳定化方法,其特征在于:步骤7中构造自适应权重时
Figure FDA0002311552820000037
时,定义网格
Figure FDA0002311552820000038
到网格
Figure FDA0002311552820000039
的时间距离与空间距离分别为|t-k|与
Figure FDA00023115528200000310
Figure FDA00023115528200000311
则为两个网格之间的水平距离,
Figure FDA00023115528200000312
为两个网格之间的垂直距离。
6. the video stabilization method that eliminates rolling shutter artifact and shaking simultaneously according to claim 1, it is characterized in that: when constructing self-adaptive weight in step 7
Figure FDA0002311552820000037
, define the grid
Figure FDA0002311552820000038
to grid
Figure FDA0002311552820000039
The temporal and spatial distances are |tk| and
Figure FDA00023115528200000310
Figure FDA00023115528200000311
is the horizontal distance between the two grids,
Figure FDA00023115528200000312
is the vertical distance between the two grids.
7.根据权利要求1所述的同时消除卷帘伪影和抖动的视频稳定化方法,其特征在于:步骤8中定义
Figure FDA00023115528200000313
为第k帧第i行j列网格到全局快门点的帧内运动累积,若以第4网格行作为全局快门点,则第t帧It中第k行第j列的网格的帧内运动复原矩阵可表示为:
Figure FDA0002311552820000041
通过
Figure FDA0002311552820000042
可去除每一网格的卷帘伪影。
7. the video stabilization method that eliminates rolling shutter artifact and jitter simultaneously according to claim 1, it is characterized in that: define in step 8
Figure FDA00023115528200000313
It is the accumulation of the intra-frame motion from the grid of the i-th row and j column of the k-th frame to the global shutter point. If the 4th grid row is used as the global shutter point, the grid of the k-th row and the j-th column in the t-th frame It is The intra-frame motion restoration matrix can be expressed as:
Figure FDA0002311552820000041
pass
Figure FDA0002311552820000042
Rolling shutter artifacts can be removed for each grid.
CN201911260902.8A 2019-12-10 2019-12-10 Video stabilization method for simultaneously eliminating rolling artifacts and jitters Active CN111355881B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911260902.8A CN111355881B (en) 2019-12-10 2019-12-10 Video stabilization method for simultaneously eliminating rolling artifacts and jitters

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911260902.8A CN111355881B (en) 2019-12-10 2019-12-10 Video stabilization method for simultaneously eliminating rolling artifacts and jitters

Publications (2)

Publication Number Publication Date
CN111355881A true CN111355881A (en) 2020-06-30
CN111355881B CN111355881B (en) 2021-09-21

Family

ID=71193967

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911260902.8A Active CN111355881B (en) 2019-12-10 2019-12-10 Video stabilization method for simultaneously eliminating rolling artifacts and jitters

Country Status (1)

Country Link
CN (1) CN111355881B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014016451A (en) * 2012-07-09 2014-01-30 Ricoh Co Ltd Imaging device, method for calculating camera shake correction amount, and program for calculating camera shake correction amount
WO2016019238A1 (en) * 2014-07-31 2016-02-04 Apple Inc. Piecewise perspective transform engine
CN108010059A (en) * 2017-12-05 2018-05-08 北京小米移动软件有限公司 The method for analyzing performance and device of electronic flutter-proof algorithm
CN108886584A (en) * 2016-04-20 2018-11-23 三星电子株式会社 Method and apparatus for generating high-fidelity scaling for mobile video
CN109905565A (en) * 2019-03-06 2019-06-18 南京理工大学 Video debounce method based on motion mode separation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014016451A (en) * 2012-07-09 2014-01-30 Ricoh Co Ltd Imaging device, method for calculating camera shake correction amount, and program for calculating camera shake correction amount
WO2016019238A1 (en) * 2014-07-31 2016-02-04 Apple Inc. Piecewise perspective transform engine
CN108886584A (en) * 2016-04-20 2018-11-23 三星电子株式会社 Method and apparatus for generating high-fidelity scaling for mobile video
CN108010059A (en) * 2017-12-05 2018-05-08 北京小米移动软件有限公司 The method for analyzing performance and device of electronic flutter-proof algorithm
CN109905565A (en) * 2019-03-06 2019-06-18 南京理工大学 Video debounce method based on motion mode separation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张博: "基于NSC1003的CMOS图像处理技术研究", 《中国优秀硕士学位论文全文数据库》 *

Also Published As

Publication number Publication date
CN111355881B (en) 2021-09-21

Similar Documents

Publication Publication Date Title
CN111539879B (en) Blind video denoising method and device based on deep learning
Liu et al. Blind quality assessment of camera images based on low-level and high-level statistical features
Nair et al. At-ddpm: Restoring faces degraded by atmospheric turbulence using denoising diffusion probabilistic models
Aittala et al. Burst image deblurring using permutation invariant convolutional neural networks
EP3800878B1 (en) Cascaded camera motion estimation, rolling shutter detection, and camera shake detection for video stabilization
Ciancio et al. No-reference blur assessment of digital pictures based on multifeature classifiers
Yasarla et al. Learning to restore images degraded by atmospheric turbulence using uncertainty
CN104103050B (en) A kind of real video restored method based on local policy
US11303793B2 (en) System and method for high-resolution, high-speed, and noise-robust imaging
CN106204472B (en) Video Image Deblurring Method Based on Sparse Features
CN107133923B (en) A non-blind deblurring method for blurred images based on adaptive gradient sparse model
US20140126808A1 (en) Recursive conditional means image denoising
Yasarla et al. CNN-based restoration of a single face image degraded by atmospheric turbulence
He et al. Atmospheric turbulence mitigation based on turbulence extraction
Sahu et al. Blind deblurring using deep learning: A survey
KR101341871B1 (en) Video deblur method and apparatus
US9008453B2 (en) Blur-kernel estimation from spectral irregularities
Tao et al. LEGAN: A low-light image enhancement generative adversarial network for industrial internet of smart-cameras
CN109905565B (en) Video debounce method based on motion mode separation
CN111355881B (en) Video stabilization method for simultaneously eliminating rolling artifacts and jitters
CN106530261B (en) A kind of double dynamic fuzzy image recovery methods
Carbajal et al. Single image non-uniform blur kernel estimation via adaptive basis decomposition
Lee et al. Efficient Low Light Video Enhancement Based on Improved Retinex Algorithms
CN111553860B (en) Deep learning non-neighborhood mean processing method and system for water color remote sensing images
Guilluy et al. Feature trajectories selection for video stabilization

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Xiao Liang

Inventor after: Wu Huicong

Inventor after: Yang Fan

Inventor before: Wu Huicong

Inventor before: Yang Fan

Inventor before: Xiao Liang

GR01 Patent grant
GR01 Patent grant