The invention discloses a method for repairing scratches in the video sequence, which comprises the following steps: (1) read each frame of video sequences and scratch detection mask; (2) according to the discrete gradient in vertical and horizontal direction, the total variation inpainting model along the vertical or horizontal direction to repair scratches; (3) the gradient by oblique the discretization of the total variation inpainting model along the diagonal scratches; (4) to step through weight (2), (3) combine along the horizontal or vertical direction and along the inclined to repair scratches; (5) whether the end number of judgment by iterative repair or iterative threshold; (6) output save the video sequence after repair. The calculation of pixel method omits the weak correlation between the ends of the scratch, to avoid spreading false information, and the use of the two gradient discretization method, which not only can transfer the horizontal or vertical direction to repair point information and can transmit information to the cable to repair more accurate results.
【技术实现步骤摘要】
本专利技术属于数字视频图像处理领域,具体地说是涉及一种应用于电影电视的胶片和磁带的数字化。
技术介绍
划痕是视频序列中最常见的一种损伤,产生的主要原因是胶片在播放、拷贝以及倒巻过程中被坚硬颗粒引起的刮擦,主要为垂直和水平划痕两种,表现为黑色和白色,宽度通常为3 10个像素。视频序列中的划痕通常在相同位置附近持续出现若干帧。划痕的形状细长,两端的相关性比较弱,甚至有些划痕在垂直或者水平方向贯穿整帧画面,两端可利用的信息有限,增加了划痕的修复难度。由于垂直划痕在连续帧上持续出现在相同位置,从视频序列前后帧中可获得的有用信息非常有限,时域的修复方法并不适合,常采用空间插值的方法修复],如LeeC.H. Restoringspline interp- olation of CT images . IEEE Transactions on Medical Imaging,September 1983, 2 (3) : 142-149.禾口 Li S. Z., Chan K. L., Wang H. Bayesian image restorationand segmentation by constrained optimization .CVPR, 96,Int. Conf. on ComputerVision and Pattern Recognition, Jun 1996, {18} : 1_6还有Philippe Thevenaz, Thieny Blu,Michael Unser. Interpolation Revisited. IEEE Tra ...
【技术保护点】
一种视频序列中划痕的修复方法,其特征在于包括如下步骤:(1),读入视频序列和每一帧划痕检测掩模;(2),选择视频画面中存在的划痕方向,计算修复点的梯度分量,向修复点传递梯度分量和邻域像素点的信息,若存在的是垂直划痕,则转步骤(2-1),若存在的是水平划痕,则转步骤(2-2);(2-1),视频画面上存在的是垂直划痕,沿水平方向修复划痕,计算修复点的水平方向上的梯度分量,向修复点传递水平梯度分量和水平方向邻域像素点的信息;(2-2),视频画面上存在的是水平划痕,沿垂直方向修复划痕,计算修复点的垂直方向上的梯度分量,向修复点传递垂直梯度分量和垂直方向邻域的像素点的信息;(3),对TV半点格式求解梯度进行改变,其梯度从按垂直和水平方向分解变为按正方形对角线方向进行分解,计算修复点的斜向方向上的四个梯度分量,沿斜向修复划痕,向划痕传递斜向梯度分量和斜向邻域像素点的信息;(4),对步骤(2-1)或(2-2)设置一个权值为q↓[1],对步骤(3)设置一个权值为q↓[2],通过各自的权值令步骤(2)和步骤(3)结合起来,对视频画面中的划痕进行修复;(5),分别以设定的阈值θ或设定修复迭代次数控制迭代修 ...
【技术特征摘要】
【专利技术属性】
技术研发人员:谷伊,韩军,蒋慧钧,闵友钢,王亚萍,
申请(专利权)人:上海大学,
类型:发明
国别省市:31[中国|上海]
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。