Log in

View Full Version : Denoisers For "Fast-Action" Videos


EpheMeroN
23rd August 2004, 04:52
I capture lots of live wrestling evens off the analog cap card. I also have been capturing lots of The Olympics onto my pc.

I've read countless posts on how denoisers / smoothers work terribly on fast-moving video, i.e. sports. Not to mention, I like to keep my sports videos interlaced. Which filters can you guys recommend that will provide decent denoising?

Manao
23rd August 2004, 06:56
Afaik, no denoiser provides support to interlaced denoising. However, using separatefields(), you can make your clip progressive in order to denoise it, then weave() it back into an interlaced form. Since fields are unaligned spacially, I would also treat each fields separatly, in case of using temporal denoisers : fields = source.separatefields()
topfields = fields.selecteven()
bottomfields = fields.selectodd()

#[...filtering...]

return interleave(topfields, bottomfields).weave()Now, for the fast motion issue : spatial denoisers won't give you any problem with fast moving video. However, they tend to denoise with smoothing the clip, which you may not like. Basic temporal denoisers often have a threshold allowing them not to create ghost artefacts while processing fast moving clips. However, it usually makes them not denoising those parts of a movie.

If I were you, I'd give a try to FuPP's script ( HybridFupp ) which allows to combine spatial and temporal denoising accordingly to the motion of the clip.
In that thread (http://forum.doom9.org/showthread.php?s=&threadid=79706), E-male tested several denoisers on grainy materials, and singled out ttempsmooth. I never tried it, but I think you should.

A third good try would be DeGrainMedian, by Fizick, though, there again, I never gave it a try.

And finally, if you can accept both buggy behavior and slowliness, try MVDenoise ( from the MVTools ). Only if you're desperate.

WyldeF1r3
23rd August 2004, 08:10
peachsmoother can handle interlaced content, but it's an extremely powerful filter that can quickly turn beautiful detail to flat surfaces, so you've got to be careful if you use it. that's the only one I can remember off the top of my head

scharfis_brain
23rd August 2004, 14:58
I usually us the script below for denoising interlaced sources, especially the panning-clips like sports are in most cases.



function tmcbob(clip a)
{ ord = getparity(a) ? 1 : 0
f=a.tomsmocomp(-1,5,0)
e=a.doubleweave().selectodd().tomsmocomp(-1,5,0)
interleave(f,e).assumeframebased
}


avisource("cap.avi")
assumetff()
tmcbob()

i=converttoYV12()
mdata=i.DePanEstimate(zoommax=1,improve=false,pixaspect=1.094)
i.DePanInterleave(data=mdata,pixaspect=1.094)

#temporalsoften(1,10,13)
fluxsmoothT(14)
# or any other denoiser you like.
selectevery(3,1)
undot()

converttoyuy2()
separatefields().selectevery(4,1,2).weave()

EpheMeroN
23rd August 2004, 18:30
I'll test that script out for denoising today. Just one question, the script has TomsMoComp used in it. Isn't that for deinterlacing? I want to keep my videos interlaced. And is that for NTSC content I hope? :)

scharfis_brain
23rd August 2004, 18:47
tomsmocomp (in this script: tmcbob) will pre deinterlace the video (standard doesn't matter, so it is suited for PAL and NTSC)
then, depaninterleave will bring 3 consecutive frames into one spatial postion
then temporalsoften, fluxsmooth or any other denoiser can do its job.

after this, the two neighboring, spatial moved frames, obsolete frames get discharged by selectevery(3,1)

and finally

separatefields().selectevery(4,1,2).weave()

will RE-interlace the video, so you can encode interlaced.

to avoid questions:
this method does NOT lower the crispness, cause the script turns into a NULL-Transform immediatelly, if you remove the denoiser. the tmcbob() and depaninterleave are used to help the denoiser as much as we can without harming the interlaced structure.

Boulder
23rd August 2004, 21:32
So, would you recommend TMCBob over KernelBob when dealing with interlaced material? I capture quite a lot of pure interlaced video and naturally like to keep that stuff interlaced. Also, which one is generally faster?

Mug Funky
24th August 2004, 09:01
i think kernelbob will be faster when Leak finishes optimuzizing it. at the moment i think TMC is faster, but i'm not too sure (usually if i'm using smart bobs, i'm also doing some additional operations which are drastically slow, so i haven't really done a benchmark).

Leak
24th August 2004, 16:49
Originally posted by Mug Funky
i think kernelbob will be faster when Leak finishes optimuzizing it.

Opti-what?

But yeah, stick a fork in it, it's done (http://forum.doom9.org/showthread.php?threadid=81322) (modulo bugs, of course)... :D

np: Metamatics - Giant Sunflowers Swaying In The Wind (MAS Confusion comp.)

Dali Lama
24th August 2004, 18:30
Hi sharfis_brain,

You make it sound like smart bobbing is a perfect process? By deinterlacing it then filtering and reinterlacing, you must be opening up channels for artifiacts, not to mention speed reduction. Wouldn't what Manao suggested or something similar be better?

However, I probably don't understand what you are doing correctly. Is depaninterleave a motion-compensated interleave?

-Dali

scharfis_brain
24th August 2004, 20:08
assumetff()
tmcbob()
separatefields().selectevery(4,1,2).weave()

is completely transparent. it is a NOP

for BFF-video use this:

assumebff()
tmcbob()
separatefields().selectevery(4,0,3).weave()

now we can place all filters we like between tmcbob() and separatefields().selectevery(4,0,3).weave()

including

depaninterleave()
select(groupofframes,middleframe)

which is a NOP again.

but with a denoise between those lines you'll get a very good global motion compensated denoising.

I hope that I could make some things a bit more clearer

Leak
24th August 2004, 21:05
Originally posted by Dali Lama
You make it sound like smart bobbing is a perfect process? By deinterlacing it then filtering and reinterlacing, you must be opening up channels for artifiacts,


Well, as far as KernelDeint is concerned - every other line of the deinterlaced image comes straight from the source frame, so if you re-interlace it's result properly it really is a NOP. If you do some processing in between, it sure is a lot better than applying in on the fields, since a) the squished aspect ratio of the separated fields has been taken care of and b) you have more information to work from, even if it isn't totally accurate.

not to mention speed reduction.

Well, what filter doesn't bring a speed reduction with it?

np: nix

scharfis_brain
24th August 2004, 21:23
some months ago, I always said:
"Never deinterlace your video"

now I say:
"Always deinterlace your video" (properly)

:-P

the real nice effect of this bobbing - reinterlacing nesting is, that you can apply any filters between bobber and reinterlacer, like:

resizers, denoisers, cropping, smoothers, sharpeners, deshakers, framerateconvertors etc.

also you can go to YV12 after the bobber, if a filter strictly needs the YV12 colorspace, without much losses to the chroma at all. but don't forget to converttoyuy2 before reinterlacing.

ggyy
25th November 2004, 06:47
Can I still achieve the goal of filtering without using depan? The reason is because TMPGEnc refuses to display preview with selectevery(3,1). :(

scharfis_brain
27th November 2004, 01:27
yep, I know.
complex scripts aren't handled well by TMPGenc.

I also use to encode lossless to an intermediate file before encoding the MPEG

depan is the key-feature in this context.
it is needed for higher quality, because it follows the motion.