The power of despeckle-median filters: Image examples
Wilhelm Sanke
sanke at hrz.uni-kassel.de
Fri Aug 27 19:30:37 EDT 2010
From the logs of my website I see that there has been really a
substantial interest in this subject. I will answer some of the
questions I received on this list and also offlist in this post.
The webpage containing the despeckle-median filters mage examples was
originally intended only for internal communication with a participant
in a joint project. It then came to my mind that especially the achieved
effects on the "Steve Jobs + Medwedew" images could be of interest to
the use-list, too.
Actually, there is nothing new about these filter effects. They have
been described in detail and with image examples already three years ago
as you can see here
<http://www.sanke.org/MetaMedia/PreviewToolkit3.htm>.
And all the necessary tools to achieve such effects are already
available in my stack of 2006 and its update in 2007
<http://www.sanke.org/Software/ImagedataToolkitPreview3.zip>
which I have referred to a couple of times in various discussions on
this list.
I quote from "Read "What's new"" and option "Version Preview 3" of this
stack
"While the focus of the "imagedata toolkit 2" was on "hues", toolkit 3
concentrates both on median-despeckle filters and the distortion and
deformation of images to achieve various kinds of "painting" effects.
Both filter categories have to be used in conjunction to produce such
effects.
A recommended sequence to achieve painting-like effects is to first use
a despeckle-median filter once or twice and then apply a matrix filter,
especially one of the lithography or smear filters.
Another sequence would be to first use one of the noise or distortion
filters and then smooth the resulting image with despeckle-median
filters before applying any matrix filter.
There are 13 such median-despeckle filters, the most powerful of them is
"despeckle extreme", which does not only remove noise, but also minor
details, thus achieving larger color areas in an image. The two "simple"
despeckle filters work with only four pixels, but they safely remove
one-pixel noise, as do all other median filters. You can easily test
this: 1. Choose a sample image; 2. Apply "add noise" from button "jitter
and noise"; 3. Remove the one-pixel noise using one of the "simple"
despeckle filters.
The script button "cross-type median 5X5" contains a description of the
structure and algorithms of this filter as a comment. This description,
which I found in the net, was the basis and starting point for my
experiments with median filters.
I have discarded the "Kuwahara" filter of "Imagedata Toolkit 2". While
it was a fine exercise to port this known filter to Revolution, it was
really the slowest of my adapted scripted filters and much less powerful
than my "despeckle extreme" filter, which is also 3 times faster."
Now to some questions I was asked in this context:
- "Have you posted a stack with this to RevOnline?"
No, I didn't, mainly because the size of the stack is about 12 MB. But
you can get it from my website
<http://www.sanke.org/Software/ImagedataToolkitPreview3.zip>
- "Is your filter library available for sale?"
No, it is not. But I have declared all unencrypted scripts of my stack
to be open-source, which could be freely used in other Rev applications
- a reference to the author would of course be welcome. The free scripts
comprise all despeckle and also the convolve-matrix scripts. Of the
about 300 filter scripts in my stack the half is freely accessible.
- "And how did you implement convolution"
I have explained that in the "Readme" fields of my above stack and you
can see it in the Rev scripts and the source code of Derek Bump's
Windows external DLL for 3x3 convolve matrices.
My Rev convolve scripts are based on a prototype by Chipp Walters, and
were developed and improved with about a 15 times-increased execution
speed. Later Mark Waddingham contributed an idea for another speed
boost, but this is only implemented in other of my various
image-processing stacks and not yet in the "ImageData Toolkit 3"
Despeckle filters are also widely used in my "Kaleidoscope Tools" stack,
which has not yet been publicly released because of the number of
workarounds I had to find for the multitude of groups bugs. I have never
experienced so many crashes as with this Kaleidoscope stack.
But the results of the Kaleidoscope Tool can be inspected in 4
galleries. From
<http://www.sanke.org/MetaMedia/GradientKaleidoscopeGallery1>
you can access the other 3 galleries.
I have to mention a number fo deficiencies of the ImageData Toolkit:
It is restricted to be used only with images of a size of 640x480.
Imported images of a different size will be scaled to that format.
In the meantime I have developed a suite of newer image-processing
stacks which do not have such restrictions, but can be used with images
of any size.
However, we face a number of problems here, namely the speed problem
with larger images - as manipulating imagedata in Revolution is really
comparatively slow. What we need for faster image processing in
Revolution would be a new conception maybe along the lines of the Lua
language, which is for example used as an add-on of the GIMP application
and in many other image-processing tools. See the text of my post to
this list "Language comparisons: "Lua" - simpler and faster than
RevTalk" of March 3, 2010.--
Another restriction of my "Imagedata Toolkit" stack has to be mentioned
here as a warning to potential users. This stack had been singled out as
a paradigm for bad layout and color use by a speaker during one of the
last Rev Developer conferences (I think it was in Las Vegas). Although I
cannot fully comply with his argumentation there was some truth in his
deliberations, as with this "preview" stack I had concentrated more on
contents and functionality than on surface design. Happily this speaker
did not argue about the contents and later even asked me if he could use
one of my filters in his own applications.
Kind regards,
Wilhelm Sanke
More information about the use-livecode
mailing list