Log in

View Full Version : Fractal denoising: FRFun


Pages : 1 [2] 3

Alain2
8th May 2006, 15:49
i.e. may be good idea use "motion compensation" for better cleaning
Well if combined with RemoveNoiceMC (http://forum.doom9.org/showthread.php?t=110078), it does a nice job :) (on anime at least. didn't try on films yet)

Soulhunter
9th May 2006, 04:39
Just a little note: FRFun7 needs X and Y axis to be multiple of 8, otherwise it'll introduce green bars on the bottom and the right of the frame. So one has to place FRFun7 before crop or after resize (even between crop and resize, but cropping width and height with multples of 8).
Right, I should add this info to the readme asap... ^^;


Bye

Soulhunter
9th May 2006, 04:52
WOW...
FrFun7 is "Spatio-temporal Smoothers", but FrFun3b is only "Spatial Smoothers" ;)

I know, becose need more memory for internal cache (I use SetMemoryMax)
Hehe, have you also compared the speed?

Could be surprising... ;)


Bye

Firesurfer
9th May 2006, 08:22
Thanks for v7!

Combined like:

AviSource("some.file")
DeGrainMedian(mode=2)
FrFun7(1.1,2.5,1.5)

give amazing results with my analog TV captures. Fine Detail is still there, massive amounts of noise gone, and still fast enough.

And the sharpening is not always needed when used at low thresholds.

AS
9th May 2006, 13:46
As corrected by the author, it's still a spatial smoother, as there is no temporal denoising.

AI
9th May 2006, 21:24
As corrected by the author, it's still a spatial smoother, as there is no temporal denoising.My conclusions:
1) The first and last frame wont get processed
2) optimization for multisequencing fft3dGPU and hard CPU filters
(I receive increased temporal radius)
3) for "my very hard cleaner script" need more memory then I have
(then increased temporal radius need more memory for internal cache)

I have thought that ver7 use previous and next frames

PS Excuse me my very bad English

AEtH
9th May 2006, 22:30
Awesome work! :thanks:

@Soulhunter
Is there any chance to process first and last frames?

Soulhunter
9th May 2006, 22:40
Is there any chance to process first and last frames?
Will be fixed in the next rev, same goes for the mod8 thing... ^^


Bye

Soulhunter
10th May 2006, 00:56
FRFun7 rev6 (http://soulhunter.chronocrossdev.com/data/frfun7_rev6.zip)


Bye

kevin23
10th May 2006, 17:14
Really Nice Filter but damn slow.

Though was just fooling around with this & LSF in my script.

FrFun7(1.1,2.5,1.5)
LimitedSharpenFaster(smode=4)


Speed in CCE was 0.21 & a sample of 1000 frames was 7.96mb

Now i used this script of LSf with Soothe
dull = last
sharp = dull.LimitedSharpenFaster(smode=4)
FrFun7(1.1,2.5,1.5)
Soothe( sharp, dull, 24)

Speed in CCE jumped to 0.44 & sample was 7.7mb in size.

Quality wise not much difference in both the clips.

Using Frfun7 only also gave a speed of 0.22 so what makes it go faster with Soothe and placed as it is in the script.

Alain2
10th May 2006, 18:12
dull = last
sharp = dull.LimitedSharpenFaster(smode=4)
FrFun7(1.1,2.5,1.5)
Soothe( sharp, dull, 24)

If really written like that, then FrFun is not used at all, soothe is working on the clips sharp and dull and nothing else here...

Maybe you wanted to say
sharp = sharp.FrFun7(1.1,2.5,1.5)

kevin23
10th May 2006, 19:25
If really written like that, then FrFun is not used at all, soothe is working on the clips sharp and dull and nothing else here...

Maybe you wanted to say
sharp = sharp.FrFun7(1.1,2.5,1.5)


Yep My bad ,

acrespo
22nd May 2006, 04:17
Any news about this filter?

Soulhunter
22nd May 2006, 04:31
Any news about this filter?
News? Like what?


Bye

acrespo
22nd May 2006, 14:03
Like new versions with speed improvements for example. ;)

Soulhunter
22nd May 2006, 15:24
Like new versions with speed improvements for example. ;)
Well, its already multiple times faster than the initial version (really, muuuch faster) and all reported bugs were fixed... The only thing I could imagine would be improved efficiency, but as nobody found situations where its lacks (at least nobody reported something, eh!?) I dont see much need for a new version! But maybe the author thinks different, lets wait n' see... ^^


Bye

Alain2
22nd May 2006, 16:48
It's not easy to see what pb can arise when we don't know what is the working principle behind... For me for instance, using lambda > 1.5 is not really good because it's blurring too much details. When using smaller lambdas, it doesn't seem to do noticable wrong things, and it is one filter in the chain filters of my scripts. Speedwise, it's not a bottleneck in my scripts, so that's fast enough ;)

Great filter :)

Zarxrax
22nd May 2006, 17:59
Well so far as improvements go, would it make sense to make this a 3d filter with its own unique temporal cleaning? Or is it just as good to use a seperate filter?

JuanC
29th May 2006, 02:24
I’ve been trying this filter on my analog TV captures, and I really like what it does, especially for anime.

I have to report an oddity: I am testing FrFun on a documentary that includes some black&white clips. My script: Mpeg2source()
Tcomb()
TFM()
TDecimate()
DeGrainMedian()
FrFun7() Goes at 8-9 fps as long as the video has color, but when it gets to the B&W parts, it goes down to 5-6 fps, then it returns to 8-9 fps when it reaches colored parts, and so forth…

Mug Funky
29th May 2006, 04:33
hmm. try it on a pure black clip and see what happens... maybe it doesn't like seeing chroma as flat 128

foxyshadis
19th June 2006, 02:43
http://foxyshadis.slightlydark.com/random/frfun-green.jpg
I very much doubt this discoloration is an intended effect of the filter. I'd also like to turn chroma processing off for these b&w movies, same reason Juan mentioned.

Suchy
29th June 2006, 21:02
I found bug in frfun3b or in textsub.

I noticed that if frfun3b(x) is before TextSub(y) then subs aren't rendered.

Script works (no errors), but here is no subs.
ANy ideas?

AVISource("F:\Encoding\movie.avi",audio=false)

UnDot()
frfun3b(3,0,1)
Dup(threshold=.5,blend=true)
Convolution3D(preset="animeBQ")
FluxSmoothST()
frfun3b(2,0,1)

TextSub("F:\Encoding\subs.ass")

Now subtitles aren't displayed.

AVISource("F:\Encoding\movie.avi",audio=false)

UnDot()
frfun3b(3,0,1)
Dup(threshold=.5,blend=true)
Convolution3D(preset="animeBQ")
FluxSmoothST()
#frfun3b(2,0,1)

TextSub("F:\Encoding\subs.ass")

And now everything is ok.

foxyshadis
30th June 2006, 06:25
frfun7 is the current version, have you tried it?

It seems like this might become a MarcFD-style forgotten filter though...

Suchy
30th June 2006, 11:18
ok thanks.
I chcecked with version 7
Subtitles are ok, but filtering by frfun7 is other than filtering with a same parametrs by frfun3b

Werido.

Soulhunter
30th June 2006, 11:37
Yeah, FrFun3's processing is different from FrFun7's... Btw, I was told the bug with TextSub is caused by missing emms, probably we'll see a fix the next days!

EDIT: Or in the next weeks... months... >.>


Thanks n' Bye

DarkFoon
4th August 2006, 13:36
Hmm, this is a very interesting filter.
However, I have a few complaints. These may just be the result of being awake 24 hours straight but here goes ;)
1) frfun3b with settings (3,2,1) produces much better denoising on my anime TV capture than frfun7 with the default settings, albeit at half the speed of frfun7. (screenshots will be provided later)

2) I'm still not too certain of what lambda does except make the filter less useful. ;) (it has something to do with the smoothing I gather)

Regarding the problem Juan is having with discoloration, I've noticed that filters using FFT libraries have a similar issue of altering the color.

On the whole, I cannot express how excited I am about this filter. It is incredible, truly incredible. I haven't seen denoising this good for free, and even for cost I haven't seen many that meet or surpass this in quality/speed.

The "Iron Curtain" around the development of this filter makes me think that it is some kind of scholastic project (perhaps a masters thesis or some such).
However, satan himself could be making this filter and I wouldn't care; it's too incredible. :D
Keep up the good work, I hope there will be improvements, I could see where it needs a few.

Soulhunter
7th August 2006, 17:27
Thanks for the feedback, satan appreciates... ^^


Tia n' Bye

Soulhunter
12th August 2006, 17:02
Just for fun, a quality optimized (http://soulhunter.chronocrossdev.com/dcpart1.htm) version of FRFun3

- FRFun3d rev1 (http://soulhunter.chronocrossdev.com/data/frfun3d_r1.zip)


Bye

Suchy
12th August 2006, 17:20
thanks

unmei
23rd August 2006, 17:23
I get the impression it doesn't like body hair =)

Just tried this filter today, stacked beside FFT3Dfilter to compare. While FFT3Dfilter tends to smooth out stuff, this one is more likely to create what i'd call "facettes" or posterisation.

While i think this can be very helpful for anime, on the TV capture i played with it has very ugly side effects on mentioned hair but sometimes also on plain skin even below default values (and that is *way* less noise reduction that i tried to achieve, since the cap is pretty noisy).
At first i suspected the effect was caused by combination with peach further above in the script, but peach only slightly affects the result - the posterisation happens even if i leave peach away.

applies to frfun3b and frfun7, i don't know about frfun3d yet but i suspect it is inherent to concept of these filters

scilli
9th September 2006, 02:55
Very nice filter. I like the results better than fft3dfilter in some cases. Like DarkFoon i'm noticing a difference in quality on anime captures between FrFun3b and FrFun7. If there wasn't a GPU version for fft3dfilter I think I'd completely switch to this:). Keep up the good work.

Alain2
9th September 2006, 13:08
fft3d and frfun7 have both good points, and I often use both on anime, but frfun7 (maybe frfun3b as well, didnt try) has this bug of slightly changing the color, as mentionned by foxyshadis. It's not just a shift I think, I can't find a proper the offset, and it can be annoying sometimes, but on anime it often doesn't really matter

Suchy
25th September 2006, 23:41
How are default params values for simple: frfun3d()?

I Ask, because I used this and now my anime is blurred too much (not very very much, but it's possible to notice).

Generally, how values you recommend for anime sources encoded in typical XviD nice quality (i want reencode+filter it now).

superuser
20th June 2007, 04:22
just curious, in background are there any improvements going on this filter, esp multithreading support?

Soulhunter
20th June 2007, 11:54
There isnt much left to improve [the thing with the altered chroma aside...] or do you have some suggestions? And, no multithreading... Afaik the author doesnt even have a multi core processor! But, maybe we will see a new version of DCTFun one day... Probably after Tritical releases his DCTFilter!?


Bye

superuser
22nd June 2007, 05:50
^ thnxs for feedback ... no other suggestions as such

Serbianboss
20th September 2007, 13:25
This filter have color artifacts when using yuy2 sources.

Sources are Pal, DV avi, interlaced(VHS captures),capture via Canopus 110 and when using Panasonic dv codec or cedocida 0.20 and when using yuy2 colorspace, filter produce color artifacts.

Pictures:
This is original dv avi picture
http://img146.imageshack.us/img146/4787/originalmk4.jpg (http://imageshack.us)

This is frfun:
http://img146.imageshack.us/img146/2024/yuy2sourcexx0.jpg (http://imageshack.us)

As you can see second picture have a lot colors artifacts, it can be little fixed if we reduced "t" parametar but that is not solution.

Only if i use YV12 colorspace or if we write convertoyv12() everything is ok.

Script which i used:
AVISource("C:\Documents and Settings\tst\Desktop\test.avi")
converttoyuy2(interlaced=true)
frfun7(lambda=3,t=10,tuv=2)


I know that this script isnt good for interlaced sources, its test just to show artefacts.
I am using FRFun 7 revison 6

Archimedes
20th September 2007, 16:41
Only if i use YV12 colorspace or if we write convertoyv12() everything is ok.
So use the YV12 color space instead. :-)

With a little trick you can use the YV12 color space without loosing any chroma information.

LoadPlugin("plugins\FrFun7\frfun7.dll")

AviSource("video.avi")
ConvertToYUY2()

PointResize(last.Width, last.Height * 2)
ConvertToYV12()
ff7(1.1, 6.0, 0.0)
ConvertToYUY2()
PointResize(last.Width, last.Height / 2)

function ff7(clip input, float Lambda, float T, float Tuv) {
T == 0 ? input : input.PointResize(input.Width, input.Height / 2).\
frfun7(
\ Lambda = Lambda,
\ T = T,
\ Tuv = 0.0
\ ).\
PointResize(input.Width, input.Height).MergeChroma(input, 1)
Tuv == 0 ? last : last.\
frfun7(
\ Lambda = Lambda,
\ T = 0.0,
\ Tuv = Tuv
\ )
}

This is an example for progressive video.

The trick is, blow up your YUY2 source with PointResize(last.Width, last.Height * 2), before you convert it to the YV12 color space. After that, all chroma informations are available. Only the luma informations are doubled. Therefore, luma and chroma has to be filtered separately. After filtering, ConvertToYUY2() and PointResize(last.Width, last.Height / 2) will bring you back to the "roots".

Soulhunter
20th September 2007, 18:30
Yeah, good chance it only works correctly with YV12 input... Just like the other plugins by pruned... Should add a "Needs YV12 input" to the readme, heh!? ;]


Thx n' Bye

Serbianboss
20th September 2007, 19:04
it just work with yv12

Does frfun is spatial or spatial-temporal filter

Archimedes
21st September 2007, 12:03
Here is a script for interlaced sources.

LoadPlugin("plugins\FrFun7\frfun7.dll")
LoadCPlugin("plugins\Yadif\yadif.dll")

AviSource("video.avi")
Yadif(mode = 1)
ConvertToYUY2()

PointResize(last.Width, last.Height * 2)
ConvertToYV12()
ff7(1.1, 6.0, 0.0)
ConvertToYUY2()
PointResize(last.Width, last.Height / 2)

# field order
AssumeBFF()
SeparateFields().SelectEvery(4, 0, 3).Weave()

function ff7(clip input, float Lambda, float T, float Tuv) {
T == 0 ? input : input.PointResize(input.Width, input.Height / 2).\
frfun7(
\ Lambda = Lambda,
\ T = T,
\ Tuv = 0.0
\ ).\
PointResize(input.Width, input.Height).MergeChroma(input, 1)
Tuv == 0 ? last : last.\
frfun7(
\ Lambda = Lambda,
\ T = 0.0,
\ Tuv = Tuv
\ )
}
Compared to other options like "interlaced denoising" and "SeparateFields" the output looks good to me (tested with a short dv video sequence).

Soulhunter
21st September 2007, 13:05
Does frfun is spatial or spatial-temporal filter
Link! (http://forum.doom9.org/showthread.php?p=825369#post825369)


Bye

Serbianboss
22nd September 2007, 13:44
thanks for interlaced script.

Because frfun is spatial filter could we just use on interlaced content this script:


AVISource("C:\kaseta2.avi")
converttoyv12(interlaced=true) ##for frfun7

separatefields()
frfun7(1.1, 6.0, 0.0)
weave()
converttoyuy2(interlaced=true) ##for CCE

squid_80
22nd September 2007, 15:59
If it's not a temporal filter why is it pulling the previous and next frames from the filter chain?

Soulhunter
22nd September 2007, 20:34
Temporal filtering was added to the code for testing, but as it was too destructive, pruned disabled by default... The first/last frame thing is just something he forgot to fix/remove... Consider it as bug! ;]


Bye

foxyshadis
23rd September 2007, 00:17
:rolleyes: All of which could have been fixed in 20-30 minutes a year or so ago, with the code. Oh well. (You'd think posting the code would be the perfect way to abandon a once-closed project.)

Serbianboss
23rd September 2007, 17:40
any comment on my script, 3 post above

AVIL
23rd September 2007, 23:44
@Serbianboss

A field separated from an interlaced frame has many high frequency components (due to interline steps). So a spatial filter could be fooled easily. IMHO bobbing is preferable to separating fileds. After filtering you can reinterlace with selectevery/weave.

Serbianboss
24th September 2007, 12:11
i know for bobbing, but i interested when using just spatial filters can be used with separate fields/weave. I read doom9 guide when said that if using just spatial filter that can be used separate fields/weave.

Vesi
23rd October 2007, 23:14
thank you very much Soulhunter for this awesome filter.
I tried the default setting, FRFun7(Lambda=1.1,T=6.0,Tuv=0)
for my new dvd and the result locks awesome, hope i did the right setting?
@ i checked some script you made for tests and i found you set tuv in all =0 why?
could you give some hints on how to set it for light and strong filtering?