Log in

View Full Version : DeFreq and FFT3DFilter integration ?


Poutnik
27th April 2005, 17:47
I post a new thread, because it does involve both ones.

What about an idea to integrate both filter into the only onepass filter ? Defreq could be an optional mode
to additional cleaning of frequency domain.

Advantage ? Only one FFT(+IFFT) instead of two. Both filters are great, but not for speed ;) )

Is there a way for DeFreq to catch peak frequences
by its own AI, not by mine ?

------------------------------------------
BTW: Thanks a lot, Fizick, for your great filters.
I created for test 100fr clip from

"credits.avs".killaudio.trim(0,100).adgrain(10,0,0)

fft3dfilter(sigma=5) produces XviD-AVI almost same size as
latest Removedust and Removedirt scripts that I like,
but looks much better.

tsp
27th April 2005, 17:59
You can't integrate these two filters that easy because fft3dfilter does width/bw*height/bh*(1 to 4 depending on what ow and oh is set to) fft/ifft of size bw*bh while defreq makes only 1 fft/ifft of size width*height

Fizick
27th April 2005, 20:38
Poutnik,
1. some time ago i thinked about "FFTTools", but it may be good only in Avisynth 3.0 with float (not-integer) pixels.

2. tsp is right.

3. DeFreq can catch peak frequences (it search extremum in window for every frame independently)
But you or somebody else can improve it (with source code).
But it need in your AI. :)

Poutnik
28th April 2005, 06:41
I have basic knowledge of FFT only and for sure I cannot improve your source code.
I did some coding in CP/M - DOS TurboPascal5, C and ASM M80 (Z80) about 15 years ago :) ASM optimizing 8bit graphics was interesting challenge for me.

BTW bh=height and bw=width is probably nonsense without floats,
is not ?

tsp
28th April 2005, 18:48
Originally posted by Poutnik

BTW bh=height and bw=width is probably nonsense without floats,
is not ?

ehh what do you mean? fft3dfilter with bw=width and bh=height?

Poutnik
28th April 2005, 20:07
Originally posted by tsp
ehh what do you mean? fft3dfilter with bw=width and bh=height? Exactly, just thinking... :)

tsp
28th April 2005, 22:24
you can use it like this:

fft3dfilter(src,bt=1,bw=src.width(),bh=src.height(),ow=0,oh=0)

This would limit the usefullness when you can't change these parameters.
also you can save the resulting frequency image(before the ifft) in a frame of size width: (width+1)*4 and height:height
though the frame would be pure garbage if viewed so the frame will only be usefull for filters that are aware that the frame is a complex float image.
This is how MVtools communicates informations between the filters.

Poutnik
29th April 2005, 05:26
Well, I could, if I am able do such coding in todays PCs.. :)

tsp
29th April 2005, 18:15
It's not that hard if you have tried programming before(even if it's 15 years ago :) )
I didn't know anything about filter programming in september last year and very little about c++ but I grapped VC++ from here (it's free) (http://lab.msdn.microsoft.com/vs2005/) and started programming and I have a good idéa about making a filter now (although some would thing otherwise :p )
So try it. It's not that hard.

Poutnik
1st May 2005, 18:07
Originally posted by tsp
It's not that hard if you have tried programming before(even if it's 15 years ago :) )
I didn't know anything about filter programming in september last year and very little about c++ but I grapped VC++ from here (it's free) (http://lab.msdn.microsoft.com/vs2005/) and started programming and I have a good idéa about making a filter now (although some would thing otherwise :p )
So try it. It's not that hard.

thanks, you are encouraging me. I have an experience things are
often much easier they appears to be ( except those
with opposite conclusion :p )

Fizick
1st May 2005, 23:12
But you need in win2000 or WinXp for MS VC++ Toolkit 2003 or 2005.
So, search MS VC6 or upgrade.

Poutnik
3rd May 2005, 15:58
Originally posted by Fizick
But you need in win2000 or WinXp for MS VC++ Toolkit 2003 or 2005.
So, search MS VC6 or upgrade.
Thanks for a tip, Fizick.
BTW, if FFT3DFilter would get
into Kassandro's optimization hands.. :D

JnZ
18th May 2005, 21:10
Hi

I test FFT3Dfilter once, and not expected much result, but how was my surpise for great result. I think that it's the best denoiser I've seen during last year! It runs at about 15fps on my machine with XviD, and this is enough, I think.

I also look at your pages and see many useful filters like DeFreq. Great work Fizick! Your job is highly appreciated! (at least by me :D)

And at the end I want to say hallo to my countryman Poutnik, first other Czech I've met here. :)

Bye

Poutnik
21st May 2005, 09:02
I have for pleasure tried fft3dfilter
on animated TotalCommander printscreen image ( rolling over 1 point right per frame), with strong added noise.
The result was not optimal, but it was impossible in that case.
But it was much much better than I thought it could be.

Czech: Zdravim JnZ