View Full Version : New very slow FFT denoiser
Pages :
1
2
[
3]
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Fizick
17th January 2005, 00:23
It is not my problem.
The problem is free hosting.
But i do not want pay for free soft.
Warpenterprises is not my host. I has not access to it.
Try once more later.
Be patient. :)
krieger2005
17th January 2005, 02:44
Kill your firewall. This can help. When i try to download the files from Fizick's server i get an error-page. After i kill my firewall there are no problems to download something.
------ EDIT:
Ups. I should read before i reply. However, i had such a situation like described above and it helped to kill my firewall (ZoneAlarm)
leonid_makarovsky
20th January 2005, 04:08
I finally got it to work. It looks great. However, can anyone recommend settings to clean up VHS capture. I need both PAL and NTSC. This is what I use so far:
clip = PixieDust(clip)
clip = convertToYV12(clip)
clip = fft3dfilter(clip, sigma = 2)
clip = convertToYUY2(clip)
clip = LimitedSharpen(clip)
Thanks in advance.
--Leonid
Mug Funky
20th January 2005, 05:39
fizick: something i'd like your opinion on...
is there much point in feeding fft3d with motion-compensated frames? i've done a quick hack to do this (using mvtools of course), but i'm wondering if it really makes sense as you're working in the frequency domain, and so spatial corellation may not mean as much as it does with regular temporal smoothers. certainly the results are good, but i'm not sure if it's worth the extra cpu time. i figured you wrote this denoiser, so maybe you've got some insight into it :)
also, the effectiveness of motion-compensation is reduced a little what with bt=3 disabled for now.
Richard Berg
21st January 2005, 08:39
The problem is free hosting.
But i do not want pay for free soft.
Avisynth contributors have always been welcome to host on avisynth.org. Contact me if you need anything.
(That goes for everyone from plugin coders to brave souls who want to try to document IIP ;))
Didée
21st January 2005, 10:17
Broad hint has reached recipient ;) - (oh my ... :rolleyes: )
After all, iiP is documented. One just has to do a little more reading ... /*whistles a melody*/
(And IMO iiP isn't *that* hard to understand. Documenting LS's upcoming bigger brother, that is what's making my hair turn grey ...)
DarkFoon
27th January 2005, 08:11
Since this thread has been dead for a few weeks now, I have come to post some ideas and try to stir the ashes.
Here are some conversation starting ideas:
1) adaptive/variable sigma value. Is it possible? How could it be done? pros/cons?
2) other colorspace support?
3) other (faster?) temporal algorithms? I'm not all that keen here, but maybe somebody who is will post.
4) Built-in FFT so FFTW.dll doesn't need to be downloaded too.
5) Assembly optimizations?
6) A "preview" mode, like in Vague denoiser or MSmooth?
7) A different type of fourier transform?
Well, that's all I can think of. C'mon people, lets get to brainstorming!
TheUnforgiven
27th January 2005, 19:46
just wanted to say that i tried ihis filter on a vhs capture and i liked the look and the size saving alot.
i would use it almost always on these sources if the filter speed significantly improved.
leonid_makarovsky
27th January 2005, 20:16
Originally posted by TheUnforgiven
just wanted to say that i tried ihis filter on a vhs capture and i liked the look and the size saving alot.
i would use it almost always on these sources if the filter speed significantly improved.
What settings did you use?
--Leonid
TheUnforgiven
27th January 2005, 20:30
i started with those settings suggested by DarkFoon
fft3dfilter(sigma=2.0, plane=0, bt=2, bh=48, bw=48, measure=false) #<- Y plane
fft3dfilter(sigma=3.0, plane=1, bt=2, bh=48, bw=48, measure=false) #<- U plane
fft3dfilter(sigma=4.0, plane=2, bt=2, bh=48, bw=48, measure=false) #<- V plane
Fizick
27th January 2005, 20:33
My some quick comments to DarkFoon's questions.
1) no comments yet :)
2) I have a plan to add YUY2 soon.
3) faster temporal? Can anybody post speed test results for last version with bt=1 and bt=2?
I have a plan to add Kalman temporal filter, but some parameter is still not clear for me.
4) FFTW is fastest fft availiable free, and for most general sizes.
5) some code parts may be optimized, for example for Athlon 3Dnow float,
but i checked time: if i disable non-fft code parts, the speed increasing is about 30% only.
You must understand, that using of overlapped blocks doubles the frame width and height.
So the filter must be slow.
6) what do you want see in preview? FFT spectrum? normalized? real, imagine or amplitude? on big frame for all overlapped blocks?
7) recently i understood, that FFT3Dfilter in 2D mode (bt=1) for bw=8, bh=8 is quite similar to DCT filter by Tom Barry http://forum.doom9.org/showthread.php?threadid=38539
I do not think that this thread has been dead a few weeks.
But i am a little wonder, why anybody not post speed test results for last version.
Once more question to all:
8) Is old mode bt=3 is better than bt=2 (not speed but quality)?
Fizick
27th January 2005, 23:09
BTW, I release version 0.5 (added YUY2 support).
Not tested, of course ;)
DarkFoon
28th January 2005, 00:16
@TheUnforgiven
I found a rather large deficiency in the settings that I suggested, which you are using. If you set your script up so that the filtered is subtracted from the unfiltered, you'll see that the right 24 pixels are unfiltered. That's because I forgot that YV12 has chroma that is 1/2 height and width. I fixed it with these settings:FFT3dFilter(sigma=2.0, plane=0, bt=2, bh=40 ,bw=40, measure=false)
FFT3dFilter(sigma=3.0, plane=1, bt=2, bh=40 ,bw=40, measure=false)
FFT3dFilter(sigma=3.0, plane=2, bt=2, bh=40 ,bw=40, measure=false)
I use this while working on 720x480 video (which is the only resolution I work at) and its spectacular. If only there were some way to make it go faster... (Unfortunately, it will be slower in YUY2 mode than YV12, because there will be more pixels)
@Fizick
About the preview mode, I haven't the faintest idea what most of those mean. I do know one thing I can answer: the last part, why not have it show basically the output frame, only the noise that it removed is made obvious. That's what I was thinking of, a way to see how much detail is lost. So the user could fine-tune the sigma value to remove just the noise. I know I could just use my eyes, but sometimes its hard, and this could help the process along.
By the way, what does the 'measure' option do? I know its on the website, but that description makes no sense to me. Can you explain it in better detail?
Fizick
29th January 2005, 01:03
About MEASURE (cited from nice pdf FFTW manual - read more there!)
FFTW_MEASURE
instructs FFTW to run and measure the execution time of several FFTs in order to find the
best way to compute the transform of size n. This process takes some time (usually a few
seconds), depending on your machine and on the size of the transform. FFTW_ESTIMATE,
on the contrary, does not run any computation and just builds a reasonable plan that is
probably sub-optimal. In short, if your program performs many transforms of the same size
and initialization time is not important, use FFTW_MEASURE; otherwise use the estimate.
More news.
I release new version 0.6 with simple (?) Kalman temporal optimal recursive filter.
DarkFoon
30th January 2005, 23:12
@Fizick
thanks for the explanation! In light of what you said in the explanation, perhaps measure should be set to =true by default?
I gave kalman a try a few days ago, its a little picky, but it can remove *HUGE* ammounts of noise, with very small numbers. For example, I had sigma=1, ratio=1.25, bh/bw=40, and it removed tons of noise! (My settings above leave no artifacting (ghosting) on 100% scene changes.)
As for the preview mode, what about FFT Spectrum in amplitude? All I really want is something that I can use to help fine-tune my sigma/ratio value.
Keep up the good work!
Fizick
30th January 2005, 23:49
Measure=true results in some start delay, so i do not want set it as default.
Yes, Kalman can remove noise :)
I will think about some preview later. But overlapped frame is large, and complex (real + imagine part).
rigth now i release a new version 0.7 with bt=3 re-enabled.
And I still wait speed test data.
Socio
31st January 2005, 14:56
I have not been able to access Fizick"s site in several days to get the latest version, is it just me or has anyone else been able access the site?
Mug Funky
31st January 2005, 18:09
i think it's just you :(
just got the new version. thanks, fizick :)
Socio
31st January 2005, 21:15
Originally posted by Mug Funky
i think it's just you :(
just got the new version. thanks, fizick :)
Hmm?
Maybe my ISP does not like his site all though I have been able to access it in the past.
Boulder
31st January 2005, 21:53
If you have a proxy configured in your browser's options, try disabling it, or adjust it so that fizick's site isn't accessed via the proxy.
Socio
1st February 2005, 15:49
Do not have a proxy, I even shut down my firewall and tried to connect and still can't. Hopefully someone will mirror his stuff elswhere some day soon.
Boulder
1st February 2005, 17:08
What about accessing via proxy (if your ISP has one you can use) ? It would definitely be the best solution if they were mirrored on avisynth.org though;)
DarkFoon
4th February 2005, 04:39
I'd have posted a speed test by now, if it weren't that my power supply is about ready to die, and I'm afraid to leave my computer on for long periods of time unattended.
From what I have experienced, Kalman feels a littler slower, depending on scene complexity. If I'm wrong, don't blame me: I calls 'em like I sees 'em.
Fizick, what do you use to program this filter?
Fizick
4th February 2005, 21:10
I used my hands and PC keyboard (mouse sometimes) :)
krieger2005
4th February 2005, 22:05
I guess it was Microsoft Visual C++ 6.0? But could be also some of the other c-compiler.
Fizick
5th February 2005, 02:09
BTW, I release Version 0.8, 05 February 2005 - added experimental sharpening option and bt=-1
(2 in 1) ;)
Backwoods
5th February 2005, 11:47
Your site seems to be down.
SirCanealot
5th February 2005, 12:05
Yo, all.
I've been using FFT3D for a while, and it's a great filter, but I'm having a kicker of a problem with it now...
All of the settings are somewhat complicated and unexplained, so I'm not sure what buttons to press :P *kicks Fizick*
http://www.williams1.homechoice.co.uk/JinkiEp2(Original).png
http://www.williams1.homechoice.co.uk/JinkiEp2(FFTProcesed).png
I think my problem is most obvious when comparing filesizes - the processed one is 150kb bigger!
Basically, FFT is cleaning up the crap on the image, but it's adding some weird grain-like effect to the image. It doesn't do this all the time, so I'm somewhat confused as to why it's doing it.
I'm using slightly tweaked settings of someone else who posted theirs back in the thread:
FFT3dFilter(sigma=2.0, plane=0, bt=3, bh=32 ,bw=32, measure=false)
FFT3dFilter(sigma=3.0, plane=1, bt=3, bh=32 ,bw=32, measure=false)
FFT3dFilter(sigma=3.0, plane=2, bt=3, bh=32 ,bw=32, measure=false)
I've tried messing around with all the settings you see there; but the only thing that seems to stop the effect is putting bh/bw to "4". This completely gets rid of the effect, but FFT hardly denoises at all then!
I've tried twaking the sigma, bt value, turning measure on and off. I don't know what to do, bleh~ :(
My source is 1024x576. Is it something like I need to use specific bh/bw settings for each res? I've never really understood bh/bw ^^
By the by, Fizick, are you interested in putting FFT on my webspace? It's a pain that your site is always down, and people can't get the latest version goodness :P
You'd probably need to create a tiny website for me (I don't know the first thing about website creation even if it's been on my 'to do' list for years), since linking to stuff like I've done above doesn't seem to work very well for anything other than pictures. Either that or people will need to dive into the depths of all the crap on the root folder :P
Anyway, thanks for any help, all.
Fizick
5th February 2005, 18:48
SirCanealot,
Any denoiser produce some artifacts to image.
There are no restoration without some cost (blurring, ghosting, etc)
Do your understand that this plugin is:
1.Free :)
2.Experimental :)
Thanks for your analisis and report! It is what i want get from people. (otherwise i simply would not public my plugins)
Do you read the Kokaram paper (link in first message) ?
Yes, it is hard, but is useful.
Every frame is divided by blocks. Its width is bw, its weight is bh (in pixels). Every block is processed almost independetly
(it is reaaly not true becouse of overlapping, but it must simplify understanding).
Thanks for hosting suggestion, but I do not have a time for web-programming too. (but I will try solve this problem soon).
Boulder,
why you do not send the downloaded file to Socio ? :)
Boulder
5th February 2005, 19:02
Hmm, I assumed he got them since he didn't ask anybody to send them to him. Nevertheless, I put the latest version on my webspace.
http://www.saunalahti.fi/sam08/fft3dfilter08.zip
http://www.saunalahti.fi/sam08/fftw3win32mingw.zip
Fizick
5th February 2005, 20:23
Boulder,
it was my almost joke, but thanks anyway. :)
DarkFoon
6th February 2005, 00:04
@SirCanealot
Your source image looks good enough that you don't need to denoise it (meaning that the noise there is negligible). Unless its more noticeable when it is playing.
I do see the artifacting that FFT3D adds back into the image... (I also like the slight blurring it gives to the edges) very strange...
If I were in your situation, I'd use
FFT3dFilter(sigma=2.0, plane=0, bt=0, bh=64 ,bw=64, ratio=1.25-2, measure=true)
FFT3dFilter(sigma=3.0, plane=1, bt=0, bh=32 ,bw=32, ratio=1.25-2, measure=true)
FFT3dFilter(sigma=3.0, plane=2, bt=0, bh=32 ,bw=32, ratio=1.25-2, measure=true)
The Kalman seems to do a very good job (i haven't used it much though, computer problems...) Note: make sure to set the ratio value, the ones I have given are just what have worked for me.
FYI: 'ratio' controls the "scenechange threshold" essentially for kalman, it determines how much weight change is given. A great way to see this, is by opening your script in vdub, frame-advancing about 10 frames that have no motion[it is important that these frames are NOT solid black], and then using CTRL+G to go to some other part of the video that is completely different. If you see a ghost over top the new frame, lower the ratio. Repeat and keep lowering the ratio value until you see no ghosting or it is faint emough that it doesnt matter.
http://virus-pserver.ath.cx:81/kizawa/example.png
An extreme example with ratio=80 after ~15 frames
If you think kalman looks bad, use bt=2. I have achieved superior results with that one (when my computer still worked, I used that everytime)
You might also lower the sigma values. The noise in the original image is so small, that a sigma value greater than 2 might be too much. Let me know how it all works out for you.
Another FYI: Measure=true means that the filter gets time to find the best FFT to use. It is a speed increase, essentially. But it takes a few extra seconds on load. (negligible, in my opinion)
@Fizick
I am not quite understanding what "overlapped blocks" means. Is it explained in that manual on the very first post?
Also, what program opens up a .ps file?
Thanks!
State of Mind
6th February 2005, 05:53
SirCanealot, you know...from normal viewing distance, those two screenshots don't look different at all.
Boulder
6th February 2005, 11:13
Originally posted by Fizick
Boulder,
it was my almost joke, but thanks anyway. :)
I should have added the :p to the end of my post but forgot it..
Anyway, if there's any other filter that people are asking for but can't get for some reason, just let me know and I'll put it there as well.
Yuri
6th February 2005, 11:26
Fizick
Thank you for another great filter.
I personally liked the new sharpening feature very MUCH, unfortunately, when it's on, it produces thin horizontal line at the top and at the bottom. How could one get rid of this?
the script:
-------------------------
Mpeg2Source("film-film-film.d2v")
crop(12,0,-16,-4,align=true)
RemoveDirt()
DeGrainMedian(limitY=5,limitUV=10,mode=2)
Tweak(hue=0.0,sat=1.3,bright=0.0,cont=1.00)
FFT3DFilter(sigma=1.5,bt=2,sharpen=0.9)
LimitedSharpen(Lmode=2)
unfilter(70,0)
------------------------
Boulder
6th February 2005, 12:21
Did you try moving the filter before cropping?
Fizick
6th February 2005, 12:53
SirCanealot,
State of Mind is right, your clip need in more sharpening but not in strong denoising.
So, try
FFT3dFilter(sigma=2, plane=0, bt=3, ratio=2, sharpen=0.6)
DarkFoon,
About overlapped blocks.
Consider horizontal dimension only for simplity
(same for vertical).
Every frame image block has width=bw.
But step between blocks (used for FFT) is half value (bw/2).
So, neighbors blocks are overlapped by bw/2 in this filter.
More correctly, every block (used for FFT) is not simple copy of frame image pixels, but formed with some window weight. This weight is a some function (cosine), weight=1 at block center and =0.5 at block border. So, the summmary weight of two neighbors block is =1 for all pixels (both at center and at border, and at any intermediate points).
All these blocks are tranformed by FFT, then spectrum are filtered. Then we do reverse FFT for every block. At last we do summation of all blocks, use the same window weights for overlaped parts, to produce output frame image.
(anybody understand my bad English ?)
Why use overlapping? - To prevent blockiness at block borders. The cost is huge speed decreasing.
This method is well known to some peoples :),
I hope Manao one day implement it in MVTOOLS. ;)
DarkFoon and all advanced users,
About *.ps files format (paper link in my very first post). It is postscript. But firstly you mus decompress GZ acrive by WinRar etc.
Use free GSview with Ghostscript to open *.PS files.
(there are many links in Google search to download)
Hint: You may convert PS file to PDF format by GSView (use menu File->Convert->pdfwrite device) and then use Acrobat reader.
BTW, There are many interesting papers (and example images from his book)about film restoration at Kokaram site
http://www.mee.tcd.ie/~ack/
BTW, there are many papers with some more advanced algorithms presented, with comparing of its results with old (1993) FFT3D filter :)
Yuri,
I know about this lines at first block border,
but do not know how to remove it yet.
BTW, IMHO you use to many denoisers and sharpeners in your script...
SirCanealot
6th February 2005, 14:28
Right~ I've done some more mucking around, finally...
First, to address...
I fully understand this filter is free and experimental. But that's exactly why I'm posting: in case you're not aware of this problem, and in an attempt to fix it/work around it, since I really like this filter :D
Your source image looks good enough that you don't need to denoise it
The source is actually CQ Quant 3 XVid, so there's a fair ammount of noise to get rid of.
Actually, that's why I was basically trying to use FFT (and some other very light filters) - it's removing the light noise in the encode while keeping the detail ^^
Especially since I'm recompressing it, I need to remove the noise as best I can...
State of Mind is right, your clip need in more sharpening but not in strong denoising.
So, try
FFT3dFilter(sigma=2, plane=0, bt=3, ratio=2, sharpen=0.6)
Okay, now this gets annoying/interesting :P
I've actually got some sharpening going (see below), so I'm not really interested in FFT's sharpening (this time!; the problem with the white lines is a bit of a problem right now, but it does look interesting).
However, for the sake of argument, I tried the above settings.
Err, the artifacting is GONE when a sharpen setting of 0.6 is used :/
When a sharpen setting of 0.1 is used, it's still there, just somewhat reduced.
This is VERY odd :/
Bug~?
Anyway... let's spam some more screenshots and you can see what I'm beating my brain over now ^^
Edit: Why are ALL forums right now NOT pasting my screenshots correctly!? It worked a while back 0_o
http://www.williams1.homechoice.co.uk/JinkiEp2%5b22740%5d(Raw).png
http://www.williams1.homechoice.co.uk/JinkiEp2%5b22740%5d(FFT).png
http://www.williams1.homechoice.co.uk/JinkiEp2%5b22740%5d(FFT+others).png
These are with the settings DarkFoon posted, which seemed to work quite well. Except I'm using bt=2 and ratio=0.75 (seemed to work best).
Others is me tuning up Deen which seems to smooth over the artifacting somewhat ^^
http://www.williams1.homechoice.co.uk/JinkiEp2%5b22740%5dFFT0.6).png
http://www.williams1.homechoice.co.uk/JinkiEp2%5b22740%5d(FFT0.1).png
See? 0.6: NO~ arifacts (but the white line problem). 0.1: reduced artifacts (check it against the original raw).
http://www.williams1.homechoice.co.uk/JinkiEp2%5b22740%5d(Finished).png
And this is (currently) what the finished filtering will look like.
A bit later (too hungry now :P) I'll try turning on the internal sharpening slightly with the settings Darkfoon posted (they're denoising better anyway), but this is very odd.
IS it a bug... or is it something else?
SirCanealot, you know...from normal viewing distance, those two screenshots don't look different at all.
Remember these are screenshots... noise looks like... 10x as bad in motion :P
And remember you need to zoom to your desktop res too... which is 1280x960 here ^^
Did you try moving the filter before cropping?
And if that's addressed at me: I ain't cropping; this isn't a DVD source :P
Fizick
6th February 2005, 21:19
I release version 0.8.1, 6 February 2005 - skip sharpening of the lowest frequencies to prevent parasitic lines near borders.
Soulhunter
6th February 2005, 22:28
#####################################################################################
# Source: Gladiator PAL/R2 - Chapter 19 - 1000 frames
# Result: FFV1
# System: Athlon XP2800+
# FFT3D : V.0.8
#####################################################################################
# 001
# No Filtering
# Time: 0:49 / Size: 143MB
# http://img154.exs.cx/img154/4661/0019il.png
#####################################################################################
# 002
# FFT3dFilter(sigma=1.0, plane=0, bt=3, bh=32 ,bw=32, measure=false)
# Time: 4:54 / Size: 137MB
# http://img85.exs.cx/img85/7259/0026xt.png
#####################################################################################
# 003
# FFT3dFilter(sigma=2.0, plane=0, bt=3, bh=32 ,bw=32, measure=false)
# Time: 4:52 / Size: 129MB
# http://img128.exs.cx/img128/395/0034hz.png
#####################################################################################
# 004
# FFT3dFilter(sigma=3.0, plane=0, bt=3, bh=32 ,bw=32, measure=false)
# Time: 4:48 / Size: 125MB
# http://img112.exs.cx/img112/9279/0045iv.png
#####################################################################################
# 005
# FFT3dFilter(sigma=1.0, plane=0, bt=3, bh=16 ,bw=16, measure=false)
# Time: 4:12 / Size: 140MB
# http://img81.exs.cx/img81/7068/0057cf.png
#####################################################################################
# 006
# FFT3dFilter(sigma=2.0, plane=0, bt=3, bh=16 ,bw=16, measure=false)
# Time: 4:13 / Size: 132MB
# http://img156.exs.cx/img156/2201/0067ez.png
#####################################################################################
# 007
# FFT3dFilter(sigma=3.0, plane=0, bt=3, bh=16 ,bw=16, measure=false)
# Time: 4:07 / Size: 129MB
# http://img82.exs.cx/img82/8642/0073ub.png
#####################################################################################
# 008
# FFT3dFilter(sigma=1.0, plane=0, bt=0, bh=16 ,bw=16, measure=false)
# Time: 5:24 / Size: 142MB
# http://img158.exs.cx/img158/1033/0081qe.png
#####################################################################################
# 009
# FFT3dFilter(sigma=2.0, plane=0, bt=0, bh=16 ,bw=16, measure=false)
# Time: 5:25 / Size: 138MB
# http://img125.exs.cx/img125/3852/0098vn.png
#####################################################################################
# 010
# FFT3dFilter(sigma=3.0, plane=0, bt=0, bh=16 ,bw=16, measure=false)
# Time: 5:27 / Size: 134MB
# http://img100.exs.cx/img100/4333/0106nu.png
#####################################################################################
# 011
# FFT3dFilter(sigma=1.0, plane=0, bt=3, bh=16 ,bw=16, measure=true)
# Time: 4:05 / Size: 140MB
# http://img200.exs.cx/img200/7541/0114qs.png
#####################################################################################
# 012
# FFT3dFilter(sigma=2.0, plane=0, bt=3, bh=16 ,bw=16, measure=true)
# Time: 4:04 / Size: 132MB
# http://img164.exs.cx/img164/6030/0127zg.png
#####################################################################################
# 013
# FFT3dFilter(sigma=3.0, plane=0, bt=3, bh=16 ,bw=16, measure=true)
# Time: 4:00 / Size: 129MB
# http://img95.exs.cx/img95/3737/0131fr.png
#####################################################################################
# 014
# FFT3dFilter(sigma=1.0, plane=0, bt=3, bh=16 ,bw=16, measure=false, sharpen=0.5)
# Time: 4:29 / Size: 140MB
# http://img95.exs.cx/img95/5532/0145zp.png
#####################################################################################
# 015
# FFT3dFilter(sigma=2.0, plane=0, bt=3, bh=16 ,bw=16, measure=false, sharpen=0.5)
# Time: 4:27 / Size: 133MB
# http://img99.exs.cx/img99/6766/0150bp.png
#####################################################################################
# 016
# FFT3dFilter(sigma=3.0, plane=0, bt=3, bh=16 ,bw=16, measure=false, sharpen=0.5)
# Time: 4:26 / Size: 132MB
# http://img103.exs.cx/img103/4134/0166ne.png
#####################################################################################
# 017
# FFT3dFilter(sigma=1.0, plane=0, bt=-1, bh=16 ,bw=16, measure=false, sharpen=0.5)
# Time: 3:10 / Size: 151MB
# http://img40.exs.cx/img40/7020/0172rj.png
#####################################################################################
# 018
# FFT3dFilter(sigma=1.0, plane=0, bt=-1, bh=16 ,bw=16, measure=false, sharpen=1.0)
# Time: 3:11 / Size: 157MB
# http://img106.exs.cx/img106/1716/0188gh.png
#####################################################################################
# 019
# FFT3dFilter(sigma=1.0, plane=0, bt=-1, bh=32 ,bw=32, measure=false, sharpen=1.0)
# Time: 4:01 / Size: 157MB
# http://img24.exs.cx/img24/2587/0190kv.png
#####################################################################################
DarkFoon
6th February 2005, 22:35
@SirCanealot
Your finished product looks spectacular: it's sharp, and clean. But there is this one type of noise I saw in the girl's hair. It's this wierd discoloration, but I know how to remove it. Ever heard of a filter called MSmooth? You can find it on http://neuron2.net under 'Mine'. With a situation like yours (which I have been in myself) just set the threshold really low, so as not to destroy your lines, and then raise the strength to high values(not too high, or you get a wierd "graying"). I usually use Msmooth after FFT3D to make the color homogeneous, or to fix gradients. A sample script:
msmooth(threshold=3, strength=5, mask=false)
Make sure to tweak the threshold with the mask feature, it really helps!
'Ratio' only has an effect if bt=0. (But how does sharpen work for you if it has to have bt=-1? hmmmm...)
I bet you used lanczos(4?) to resize... It looks very sharp.
Anyways, these are my two cents on the matter. If you want your source to look good after encoding, *sigh* (I know I'm going to catch hell for this...) you might give the WM9 codec a try. Unfortunately, I have never gotten good results with Xvid, except with high bitrate. WM9 has compressed 1.5GB Mpgs down to ~150MB (audio+video) with acceptable degredation. (If it were something I really cared about, I'd use a higher bitrate) I use Nic's WM9Enc to encode WM9, I'd recommend that you give it a try.
@Fizick
Two questions:
1) does 'ratio' have any effect if bt= does NOT equal 0?
2) does 'sharpen=' have any effect if bt= does NOT equal -1?
These relate to the above stuff, and if I am wrong in what I said above, SirCanealot, listen to what Fizick has to say.
Also, is there a way that you could make it so the user could turn off overlapped blocks, for speed increase? (And to satisfy my curiosity ;) ) I wonder if it is still worth it even with really low sigma values...
Anyways, good luck to all!
Fizick
6th February 2005, 23:40
Soulhunter,
thanks, but do you have some comments?
Fizick
6th February 2005, 23:51
1) does 'ratio' have any effect if bt= does NOT equal 0?
"this ratio also defines threshold noise value at sharpening stage."
does 'sharpen=' have any effect if bt= does NOT equal -1?
Yes, for all modes.
bt=-1 is "pure" sharpen.
Also, is there a way that you could make it so the user could turn off overlapped blocks, for speed increase?
I do not tryed make such mode...
No, i do not want make bad filter :)
And to satisfy my curiosity ) I wonder if it is still worth it even with really low sigma values...
I am afraid SirCanealot will see artefactes (blockiness) even with really low sigma values and will want kick me again :D
Soulhunter
7th February 2005, 00:13
Originally posted by Fizick
Soulhunter,
thanks, but do you have some comments?
General stuff...
- BH/BW = 32 gives imo better results than BH/BW = 16
- Sharpening @ BH/BW = 16 produced artefacts
- High sigma values producing artefacts
My opinion...
- Blending FFT3D with DeGrainMedian gives fantastic results
- BH/BW = 32 is minimum value I would use
- This filter rockz... ^^
Requests...
- A "auto add boarders" function to match the blocksize
- Could you explain how the sharpening works?
- A "show me the difference" function
- Maybe add some presets... :\
Bye
SirCanealot
7th February 2005, 00:24
Originally posted by Fizick
I am afraid SirCanealot will see artefactes (blockiness) even with really low sigma values and will want kick me again :D
Well, why do the artifacts go away when I turn sharpening on?
That says bug to me, so...
I don't want to kick you, I just want to get yo shit working as well as possible :P
Your finished product looks spectacular: it's sharp, and clean. But there is this one type of noise I saw in the girl's hair. It's this wierd discoloration, but I know how to remove it.
Do you mean that fact that it's discoloured over the raw?
That's because I opened the raw in VirtualDub (not through AVS), and the rest of them were through AVS. If I know rightly, that discolouration won't get through into the final encode. I meant to open the raw in AVS, but I guess I couldn't be bothered :P
Or are you talking about something else? Maybe I should see how MSmooth combats the artifacts anyway, though I've never had much luck with MSmooth before :/
And yes, it was Lanczos4Resize, heh.
A Lanczos4Resize down from the 1024x576 source that is ^^
Downscalling like that basically stopped pasteling too.
Anyways, these are my two cents on the matter. If you want your source to look good after encoding, *sigh* (I know I'm going to catch hell for this...) you might give the WM9 codec a try.
XVid encodes that epiosde to 190 megs at Quant 2/Quant 3 B-Frames *shrugs*
No thanks to FFT, though I do wonder how much filesize is damaged because of the bug-artifacts :P
And, yes, die for suggesting WMV9 enccoding :P
DarkFoon
7th February 2005, 19:19
http://virus-pserver.ath.cx:81/kizawa/noise-demo.png
This is the wierd discoloration I was talking about. (And this image is the one in your post called 'finished.png' so I assume this is what is going to the encoder...)
Though, even if it was caused by opening raw in VDub, you should still give Msmooth a whirl; in my experience, it plays very nicely with FFT3D. :)
What destination medium is this encode going to? HDD, DVD, S/VCD? Just curious...
And, yes, die for suggesting WMV9 enccoding :P
In regards to that: I calls 'em like I sees 'em. I have been very pleased with the results I have achieved with WMV9 (Especially the 2-pass VCM codec). Xvid has often let me down in terms of quality, and also filesize. :( (As in the quality will disappoint and the filesize will be very large). Maybe I'll give it a whirl again too, as soon as I fix my $!#@*&% computer!!! :angry:
Anyways, what settings do you use for your Xvid encodes? (Please be very specific).
Good luck!
[OT]
What anime is this?
SirCanealot
7th February 2005, 20:51
Originally posted by DarkFoon
This is the wierd discoloration I was talking about. (And this image is the one in your post called 'finished.png' so I assume this is what is going to the encoder...)
That's what FFT is causing, and that's what I'm trying to fix ^^
And I basically use the defaults; but cartoon mode on, quants set to 2-31, trellis (or whatever it's called) on, H.263 Matrix, and B-Frames quantiser ratio set to 1.0. Don't use anything like GMC, QPel or anything.
And the destination medium is .avi...
And make sure you turn WMV9's autosmoothing off :D
Fizick
7th February 2005, 21:01
DarkFoon,
BTW now I think about you suggestion to remove overlapping.
But really I want not remove, but decrease the overlapping,
for example fix it to 8 pixels (may be variable parameter).
I may decrease the blocks number (for not very small block sizes) and increase speed with factor about 2 to 3.
But some work is needed (and time).
tsp
7th February 2005, 21:57
isn't the windowfunction(overlap) necesary to minimize leakage(from one frequency to the adjoining frequencies) when determing the power spectral density?
Also I'm trying to recreate the filter using the GPU instead of the CPU this should hopefull lead to some speed improvememt(fast parrallel floating point math and high bandwith). At the moment the FFT part is nearly done. So maybe in a week or two it's done.
DarkFoon
7th February 2005, 22:12
@SirCanealot
Well, if that is what FFT is creating, just use Msmooth to remove it (Msmooth is really good at removing that type of artifacting) and quit bitching. ;) It's probably some inherent problem with FFT or weiner or Kalman, or temporal in general (I've seen the same thing with other temporal filters...)
Msmoother at work... (http://virus-pserver.ath.cx:81/kizawa/msmoothed.tif) (Stupid IE wants to download it, instead of displaying it... :angry: (The green circle is there to draw your attention to the smoother and better-looking gradient... By the way, it's 32-bit)
By the way, the script for that was:
converttoRGB32()
msmooth(threshold=10, strength=5, mask=false)
All I know, is that Msmooth is really good at removing that kind of noise on anime. (I don't like Msmooth for live source at all, I use FFT exclusively in that case). Actually on anime, before I used FFT, I would use msmooth to remove most of the spatial noise, and Peachsmoother after it to make it all uniform along the time axis. But all this was back when my computer wasn't about to die :angry:
I haven't done much encoding since...
What is autosmoothing? I have never seen it anywhere in WMV9. Are you talking about the slider that has smoothness on one end, and sharpness on the other? I always set that one to sharp. ;)
BTW, you still haven't answered my question, what anime is that? :)
@Fizick
It will be interesting to see how it looks, and how fast it becomes. Overlapped blocks do make it look good, but when the sigma is really, REALLY high (I did this for fun) I get this wierd grid look. I suppose that is true even with overlapped blocks completely off...
Also, this means that you may be able to implement a 'show me the differences' mode more easily! YAY!
EDIT:
@tsp
GO you! I can wait to explode my Geforce2 MX400! I think it will be interesting to see how it uses the GPU...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.