NLM去噪算法

ffmpeg版本(NLM时域版本):
ffmpeg -s $wx$h -pix_fmt yuv420p -i $input -vf nlmeans=h=2:range=3:temporal=1 $output

-vf nlmeans=h=2:range=3:temporal=1 为参数调节,使用的ffmpeg是这个


官网
The filter is named nlmeans and has the following parameters:

h - averaging weight decay parameter (larger values give smoother videos).
range - spatial search range (default=3), should be odd number.
temporal - number of frames to include into search (default=2).
patchsize - pixel context region width (default=7, little need to change), should be odd number.

The default values (h=8, range=3, temporal=2) are a good starting point for the restoration of very noisy video (old VHS tapes).You may also try 10;5;3 for really noisy inputs or 6;3;1 for good quality inputs.

It is also interesting to note that one can simply apply the filter on interlaced material. The algorithm itself is robust enough to handle this nicely without artifacts.
https://www.dirk-farin.net/projects/nlmeans/index.html


输入
\\10.154.33.153\opt\yqy\NoiseEstimate\00_input
测试结果
\\10.154.33.153\opt\yqy\NoiseEstimate\01_output


Non-Local Means顾名思义,这是一种非局部平均算法。(NLM算法)
何为局部平均滤波算法呢?那是在一个目标像素周围区域平滑取均值的方法,所以非局部均值滤波就意味着它使用图像中的所有像素,这些像素根据某种相似度进行加权平均。滤波后图像清晰度高,而且不丢失细节。

其出发点应该是借鉴了越多幅图像加权的效果越好的现象,那么在同一幅图像中对具有相同性质的区域进行分类并加权平均得到去噪后的图片,应该降噪效果也会越好。
该算法使用自然图像中普遍存在的冗余信息来去噪声。与双线性滤波、中值滤波等利用图像局部信息来滤波不同,它利用了整幅图像进行去噪。
以图像块为单位在图像中寻找相似区域,再对这些区域取平均,较好地滤除图像中的高斯噪声。

 
https://blog.csdn.net/piaoxuezhong/article/details/78345929

不是像素点的欧式距离,是像素灰度值的差值的欧式差距
https://blog.csdn.net/jaych/article/details/54562593

该算法的基本原理是:假设同一副图像上,有着很多相似的纹理;因此在有噪声的区域,可以通过某种方式情况下,将相似的纹理区域来替换噪声区域。从而达到较好的去噪效果,并且不太多的损失细节。
https://blog.csdn.net/u011630458/article/details/51317415
 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

WX Chen

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值