video debanding 视频去色带方法调研

本文只记录在调研banding算法过程中看过的一些源码和论文,不做系统的整理和性能评估。比较潦草,欢迎大佬补充指正。

应用场景

banding artifacts 通常产生的原因:

  1. 视频编码量化
  2. 增强算法(如 color tone mapping,对比度增强)增加了相邻区域的色阶距离

传统方法

dither

搜debanding提到的比较多的一个方法就是dithering,基本原理就是给图像添加一个随机的像素偏移,相当于用随机噪声cover掉了banding效果。
由于dither在编码时容易被抹除,因此最好的方法是加在playback端

在这里插入图片描述
在这里插入图片描述

ffmpeg filter

ffmpeg中有两个debanding filter
deband

	ffmpeg -i input.mp4 -vf deband output.mp4

gradfun

	ffmpeg -i input.mp4 -vf gradfun output.mp4

速度上gradfun略快,主客观效果暂无测试

paper

记录一下看过的两篇paper

  • Advanced Video Debanding
    传统方法常用的debanding步骤
  1. Detect regions of banding. Since banding is most visible on smooth gradients, they usually look for low-textured regions of the picture.
  2. Undo the quantization and restore the original aspects of the image(比如映射回浮点数或者使用更高的比特数). This is done by applying a smoothing process to the degraded picture and thus removing the banding discontinuities.
  3. Finally, in order to match the screen bit depth, quantization needs to be reapplied. However, this time, a dithering process is used, which adds a noise pattern to create the illusion of a smooth gradient
    现有方法的不足:
    Unfortunately the existing approaches are limited, either by the level of quantization they can deal with, or by the picture quality they can achieve.
    本文提出的banding检测和评估方法
    在这里插入图片描述
    将相同RGB值的像素点连通成局部区域(块),可以看到,有banding现象的视频,块尺寸较大。因此将块大小的分布作为banding强度的index。
    pixel banding index公式
    在这里插入图片描述
    曲线,画出来是这样,相关阈值的设定见paper
    在这里插入图片描述
    接下来,是修复banding的方法,基于以下几个observation
    1. 相同banding块中的像素点,其原始像素值不能偏离当前块像素值太多,
    2. 原始像素值受相邻块影响(其实就是相邻块做一个线性插值)
    3. 相邻块越大,对当前像素点影响越大(基于块大小计算权值)
      在这里插入图片描述
      distance使用到相邻块最近像素点的距离。
      最终计算权值的公式
      在这里插入图片描述
      最后,为了防止再次量化产生的banding,加入dither,dither矩阵:在这里插入图片描述
      评论:
      无参考的banding检测还是会产生误检的情况,把一些人为的色块边界smooth掉,所以针对我们的使用场景(处理增强产生的banding),还是使用有参的方法会好一些。
      dither这一步一般适合加在量化后或者playback的时候,我们暂时不考虑
  • Adaptive Debanding Filter
    这一篇是2020年SPL的论文,对现有的banding检测和处理方法做了还不错的review
    banding的检测:
    使用了基于canny算子的检测手段。通过计算梯度,用两个阈值将像素分为三类,flat pixels (FP),candidate banding pixel (CBP),textured pixels (TP)
    banding的消除使用了boxblur,kernel大小随band大小自适应调整
    在这里插入图片描述
    kernel 大小计算公式,band面积除以相邻边长
    在这里插入图片描述
    对于窗口中存在tp(texture pixel)的,将kernel大小迭代减半。texture pixel也是通过梯度判定。
    在这里插入图片描述
    评论:
    全文来看创新性并不多,对于纹理的保留也是手动设定梯度阈值来实现。

目前看到的方法来看,原理基本差不多,使用低通滤波处理banding边缘,后处理加dither防止banding复现,对于不同强度的纹理区分处理

待更新
一篇banding检测的论文
A perceptual visibility metric for banding artifacts

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值