PDA

View Full Version : Smooth and Temp smooth


geepee
13th October 2002, 02:10
I'm wondering if there's a version of (VDUB smooth and temp smooth) for avisynth. With the exact same options, parameters, effect.

If not... what would be the better option for a "noise pre-filter" like the one in VDUB smooth.

Thx:)
geepee

SansGrip
13th October 2002, 08:31
You can use any VirtualDub filter from within Avisynth, but you'll need to convert your clip to RGB first using ConvertToRGB (http://www.avisynth.org/index.php?page=Convert) which slows things down and is lossy.

If you want to stick with native filters there's lots of options. The most popular is probably Convolution3D (http://hellninjacommando.com/con3d/, http://forum.doom9.org/showthread.php?s=&threadid=29829, http://forum.doom9.org/showthread.php?s=&threadid=32762), which does both spatial and temporal smoothing at the same time using a 3D matrix.

As far as spatial smoothing goes, Cnr2 (http://ziquash.chez.tiscali.fr/, http://forum.doom9.org/showthread.php?s=&threadid=29529) is good for chroma noise reduction and SmoothHiQ (http://cultact-server.novi.dk/kpo/avisynth/smooth_hiq_as.html, http://forum.doom9.org/showthread.php?s=&threadid=28386) seems to work well for noisy sources. MSmooth (http://forum.doom9.org/showthread.php?s=&threadid=31679) was designed for anime (it smooths only between edges), but it's currently in the repair shop and I don't know if its author, Donald Graft (aka neuron2), would recommend you use it. There's also the built-in SpatialSoften (http://www.avisynth.org/index.php?page=SpatialSoften).

For temporal smoothing I usually use the built-in TemporalSoften (http://www.avisynth.org/index.php?page=TemporalSoften), and another popular choice is TemporalSmoother which is in dividee's MPEG2DEC plugin (http://users.win.be/dividee/, http://forum.doom9.org/showthread.php?s=&threadid=21292).

Generally noise reduction should be done before resizing as this helps to reduce the visual impact of the pixel averaging. To this end it might be worth experimenting with the built-in Blur (http://www.avisynth.org/index.php?page=Blur) filter. I find that a gentle blur at 720x480 followed by a LanczosResize (http://forum.doom9.org/showthread.php?s=&threadid=33290, http://forum.doom9.org/showthread.php?s=&threadid=34616) to 352x240 results in a reasonably sharp image (similar to a neutral bicubic) that can be considerably more compressible than with more subtle smoothing. Of course if your final resolution is closer to the original then even a gentle blur will probably be too strong.

A popular and effective approach seems to be to apply temporal smoothing most strongly to the luma component and spatial most strongly to the chroma component. This technique is discussed at http://forum.doom9.org/showthread.php?s=&threadid=29359, which is an excellent thread with a host of sample scripts to chew on.

There are even more advanced noise reduction filters in the works from the likes of neuron2, Mark FD, -h and others (heck, I'm even playing with some code myself) which look to be very promising. They work by detecting motion within the frame and applying temporal smoothing to the low-motion areas (where ghosting won't be an issue) and spatial smoothing to the high-motion areas (where the blurring won't be noticible). This will offer the best of both worlds.

I'm sure there's much I've forgotten. Try the Doom9 search page (http://forum.doom9.org/search.php), e.g. http://forum.doom9.org/search.php?s=&action=showresults&searchid=357921&sortby=lastpost&sortorder=descending.

Good luck and happy reading ;)

geepee
13th October 2002, 21:29
thx a lot:)
this is more then i asked for:P
...i was just wondering if there was an exact replica of the VDUD smooth and temp smooth for avysynth :)

but thx again:) im gonna try those filter...might work even better than the ones i was looking for :)