Log in

View Full Version : New smoothing plugin: Curvature Flow Approximation


AMSS0815
6th March 2007, 21:08
Hi everybody,

recently I created a new smoothing plugin. This is the abstract from the help file:
Curvature flow equations smoothen images by smoothing their level lines. In contrast to linear smoothing filters, they do not only conserve sharp edges, but also have some remarkable properties like contrast invariance, or affine invariance. This filter resembles some recently discovered approximation schemes that (more or less) inherit many of those properties.
Common smoothing algorithms are often approximations of the heat equation applied to an image — in most cases realized by convolution with some smartly choosen kernel. This kind of smoothing removes (or "smears out") noise, but originally sharp edges become unlocatable. Moreover there are kinds of noise like impulse noise (also called Salt'n'Pepper noise) where the heat equation fails. Nonlinear filters like the well-known Median filter usually give better results. Sharp edges are untouched, but even nasty impuls noise can be removed satisfyingly. The Median filter is an approximation of the mean curvature flow — a mathematical object which smoothes the level lines of an image.
This filter collection provides several approximations of curvature flow filters, including the Median. These filters are realized by combining discrete erosions and dilations (operators that replace pixels with neighbor pixels that are darker or brighter, resp.) with several (nonlinear convolution) kernels, and resemble not only the mean curvature flow, but also the affine curvature flow, which gives usually even better results. The user may choose between a pure morphological approach, where no new color values are created, and an "almost-morphological" approach where the average value of erosions and dilations will be returned.

To put it in a nutshell, this plugin is a little collection of morphological smoothing filters. Morphological filters (especially the median) have been implemented quite often, so now I put myself in the list of morphological developers:). I still hope this filter might have some nice applications, especially the erosion-/dilation-only-modes.

I recommend you to have Shubin's NoiseGenerator plugin (find it in WarpEnterprises' Filter Collection (http://www.avisynth.org/warpenterprises)) installed if you want to try the Demo.avs script (a home made low-entropy noise generator will be used otherwise).
The filter is attached to this thread (as zip-file), I hope this works out...
Go ahead and try it - if you have some comments on this plugin, please don't hesitate and post them here - every comment is wellcome!:thanks:

Regards,
AMSS

Edit: Added version 2008.02.23 as announced here. AMSS

Mug Funky
7th March 2007, 01:36
gives a nice sort of look. little slow though :)

i think it would be good for animation - it tended to strip a lot out of the live action i gave it. i'll have to try it on my home machine that has a wider variety of samples on it.

Pookie
7th March 2007, 06:35
Wow, this thing is strong - makes Deen look like a sharpener :D Great demo script. Thanks.

DarkNite
9th March 2007, 11:04
I'll have to try this on some older anime sources. In my first impression it's results look like TBilateral on anabolic steroids, or more like that NL-means look.

Scintilla
18th March 2007, 14:25
Can make animé look pretty soft at times (like a combination of TBilateral and WarpSharp without the sharp), but it does clean up dot crawl. Could be useful in conjunction with a good sharpener.

AMSS0815
23rd February 2008, 15:48
Hi everybody,

I updated AVSCurveFlow to version 2008.02.23. Main change is the removal of AviSynth_C.dll. Thanks to Fizick, this file isn't necessary anymore (Plugin is still loaded with LoadCPlugin). Further (minor) changes are listed in the help file. The file is attached to the original post of this thread.

Have fun,
AMSS

vcmohan
24th February 2008, 04:15
Hi everybody,

Moreover there are kinds of noise like impulse noise (also called Salt'n'Pepper noise)

....... especially the erosion-/dilation-only-modes.

Edit: Added version 2008.02.23 as announced here. AMSS

In the colorit plugin, morphology filters like desaltpepper, erosion and dilations are available.