分页: 1 / 4

BM3D-r7 | BM3D和V-BM3D降噪算法的VS滤镜实现

发表于 : 2015-05-24 15:54
mawen1250
Source & Readme

Binary: GitHub | NMM

After over a month's effort, it's finally completed.
Including the 2D(image) denoising filter BM3D and the 3D(video) denoising filter V-BM3D.

The computational complexity of this denoising algorithm is fairly high, thus it's very slow.
Moreover, the memory consumption of V-BM3D is very high. Since for each current frame, multiple frames are requested, and the filtering result is also aggregated to those frames.

包括2D(图像)降噪算法BM3D的实现,以及3D(视频)降噪算法V-BM3D的实现。

建议使用mvsfunc中的BM3D函数,使用更方便简单:

代码: 全选

import mvsfunc as mvf

core.max_cache_size = 4000 # Set a big enough cache size. For V-BM3D, you may need 8000 or even more (according to resolution and radius)

# Any input format
clip = mvf.BM3D(clip, sigma=[3,3,3], radius1=0) # radius1=0 for BM3D, radius1>0 for V-BM3D
# Same as input format

Re: BM3D-r2 最佳的降噪算法之一,BM3D和V-BM3D的VS滤镜实现

发表于 : 2015-05-25 1:50
mawen1250
Update r2

Fix memory leaks in VAggregate.

Re: BM3D-r3 最佳的降噪算法之一,BM3D和V-BM3D的VS滤镜实现

发表于 : 2015-05-26 23:04
mawen1250
Update r3

Fixed a stupid mistake that the order of applying DCT and IDCT is reversed (it should be DCT->filter->IDCT), which leads to over-filtering in fine structures and produces artifacts such as blocking, ringing and desaturation.
Now it actually filters as expected.

之前居然把DCT和IDCT的顺序搞反了(FFTW里的FFTW_REDFT10和FFTW_REDFT01被我弄反了,明明还看了好多次的说……),这下处理结果终于类似于官方MATLAB版的结果了。

Re: BM3D-r3 最佳的降噪算法之一,BM3D和V-BM3D的VS滤镜实现

发表于 : 2015-06-01 1:37
vempx
辛苦了
这几天处理的片子都没有noise,等遇到需要降噪的片子我就试试你的这个滤镜!

Re: BM3D-r3 最佳的降噪算法之一,BM3D和V-BM3D的VS滤镜实现

发表于 : 2015-06-01 8:21
mawen1250
贴一些我这儿的测试结果,CPU有点弱(像i7 E3之类的大概有我的2倍速度)。

代码: 全选

AMD X4 635 @ 2.9GHz
8GB x 2

Windows 7 x64
VapourSynth r27 x64
BM3D r3 x64

1920x1080 YUV420P8 input
convert to 16bit OPP to process
16bit RGB output
request 200 frames
threads=4
max_cache_size=10000



VBasic+VFinal, profile="fast", process all channels
    radius  fps
    1       0.44
    2       0.33
    3       0.24
    4       memory boom!

VBasic+VFinal, profile="fast", process Y only in GRAY color family
    radius  fps
    1       0.62
    2       0.45
    3       0.35
    4       0.29
基本上处理1080p的YUV的话,radius=1的V-BM3D至少需要大概5GB内存,速度会比默认参数下的BM3D还快一些(因为V-BM3D一些参数低),radius=4就完全爆内存了。处理Gray的内存消耗就低了不少(理论上应该只有1/3)。

Re: BM3D-r3 最佳的降噪算法之一,BM3D和V-BM3D的VS滤镜实现

发表于 : 2015-06-01 10:17
vempx
这个速度……太感人了……

Re: BM3D-r3 最佳的降噪算法之一,BM3D和V-BM3D的VS滤镜实现

发表于 : 2015-06-01 23:39
mawen1250
贴一个群友的测试结果:
QQ图片20150601233814.png

Re: BM3D-r3 最佳的降噪算法之一,BM3D和V-BM3D的VS滤镜实现

发表于 : 2015-10-12 11:30
digimoon
不知道为啥直接loadplugin或者将dll扔到vs的plugin目录里都提示没有这个namespace,libfftw3f-3已经在path里了难道还需要装其他什么运行库吗?
win10 x64,vs r28 x64

{:cat_15} win10逗逼了似乎是没有载入,重启一下后正常了

Re: BM3D-r3 最佳的降噪算法之一,BM3D和V-BM3D的VS滤镜实现

发表于 : 2015-10-29 16:26
lsy17096535
斑竹你好 能发个bm3d处理的脚本吗?我这里一直报错,最近做压片,想提高一下亮度,并且降噪,谢谢啦。

Re: BM3D-r3 最佳的降噪算法之一,BM3D和V-BM3D的VS滤镜实现

发表于 : 2015-10-29 20:42
mawen1250
lsy17096535 写了:斑竹你好 能发个bm3d处理的脚本吗?我这里一直报错,最近做压片,想提高一下亮度,并且降噪,谢谢啦。
用mvsfunc里BM3D