Jim
Casaburi
Main Page
Courses Taught
Personal
Music
Rants
Computers
Free
Downloads
Links
|
Jim
Casaburi's free software download page
Page last updated on 4/7/2004
[News] [2D
Cleaner] [Temporal
Cleaner] [Legal
Notes] [Other
Related Links] [Thanks]
8/20/2000
Good news for once. Temporal Cleaner has a
radical and much needed upgrade. Thanks to all of the suggestions
I have recieved for Temporal Cleaner the new build is MUCH more
effective
at reducing temporal noise than ever before. I am also finally
releasing
the source code to Temporal Cleaner. It still isn't pretty, but
it's
not quite as bad as it used to be. The changes in this beta are
very
extensive. Among other changes, I have implemented a YUV mode
(with
borrowed code from Ben Rudiak-Gould) as suggested by Erik Friend
whereby
you can threshold luminance and chrominance seperatly (allowing much
better
chroma noise reduction), a biased thresholding mechanism as suggested
by
Jouko Orava that is more sensitive to changes at either end of the
color
spectrum, a fix for the annoying "fade to black" problem inspired by
Sven
Tewens, and a slew of other bug fixes. The speed of the new beta
is about the same as the old one, though it seems to be slightly slower
when in YUV mode. As a note: The YUV calculations are NOT
used
for the output except when the luminance locking mode is enabled, and
thus
the colorspace conversion will not effect the output quality. In
the mean time, Steven Don (the author of the other Dynamic Noise
Reduction
filter and VirtualDub's built in temporal noise reduction capture
driver)
is working on optimizing Temporal Cleaner in MMX in order for us to
merge
our efforts. Bottom Line: I HIGHLY recommend anyone who uses
Temporal
Cleaner to download the new build.
7/23/2000
I am embarrased! Thank you to Donald Graft
for pointing out the STUPID bug I introduced in 2D Cleaner beta
0.5.
I guess the code would be faster when I only ran through the inner loop
of the averaging a single time per pixel. Or to use his words,
"This
is of course not going to do what you intended. And it will be quite a
bit faster at it..." And thank you to the person who emailed me
regarding
the bug with hitting cancel in the dialog (I can't quite seem to be
able
to find the email referring me to that bug right now). Beta .6 of
2d cleaner has this fixed along with a fix to the above bug, and
hopefully
the source-released Temporal Cleaner will also have this. If you
have noticed that no filtering occurs unless the radius is set to at
least
2 and then it is only vertical, please download the new version.
Much code to write, so this is a small update.
5/2/2000
My long promised optimizations to 2d cleaner and
the actual release of its source code has finally arrived. 2d
cleaner
is a good deal faster now and the source code is finally somewhat
decent
to look at. Many have kindly offered to optimize 2d cleaner with
assembler code and mmx optimizations, so I expect 2d cleaner to get
even
faster despite its computational complexity. Once I clean up
temporal
cleaner a bit, I will release its source as well, though I do not
expect
to get it much faster without assembler optimization. As a note:
I brought my big book of assembly programming up to school the last
time
I headed home, so I may also be doing a good deal of the assembly
coding
as well.
3/26/2000
I finally got the correct update to the page
uploaded
that includes beta 3 of 2d cleaner that I finished several days ago.
Beta
.3 of 2d cleaner adds in a user configurable averaging area so the
filter
is no longer limited to 3x3 averaging areas. Optimization is
probably
next for both filters.
Note: As I am stuck in Los Angeles for the
next few days with only my laptop, and my laptop stuck in Win98 so I
can
use my SCSI backup drive, I will probably not be able to do much
development
on either filter until Wednesday or so. I also want to thank all
of you who have been giving me this incredible amount of positive
feedback
on the filters. It is appreciated.
3/23/2000
Updated both 2d cleaner and temporal cleaner two
beta 0.2 with a few bug fixes, and added interlaced mode into 2d
cleaner
and "pixel lock" into temporal cleaner.
3/21/2000
Initial release of the filters. There is an awful
lot of work which needs to be done on the filters, and doubtlessly many
bugs. Please email me at casaburi @ earthlink.net if you have any
suggestions or bug reports.
A VirtualDub's filter that that only averages pixels
in a configurable radius around a source pixel that are within a
configurable
threshold of the central pixel. This has the effect of blending
low-level
video noise while retaining sharp details.
The options available for the filter are a
threshold
value, a "show sharp edges" option, an interlaced option, and a
configurable
radius around the source pixel.
Threshold can be anywhere from 0 to 255, and defines
the maximum difference between a source pixel and a surrounding pixel
in
which the program will attempt to average the source pixel with the
surrounding
pixels. Higher thresholds blend more. The default is 12,
which
seems to work well for most of my video sources, but I highly recommend
experimenting with different values to find the perfect match of
removing
noise and retaining details.
The "show sharp edges" option, inspired by Donald
Graft's equivalent feature in his Smart Deinterlacer, will turn any
pixel
where less than half of its surrounding pixels black. This is
useful
for being able to see what pixels are passing through the threshold
without
being blended (as much). Do NOT leave this option on when you are
actually converting your files! (note: this setting is NOT
saved for batch operations or when you save processing settings, since
this option is meant only for "debugging" ones settings)
The interlaced video option when checked processes
the video as if it were interlaced. This means there is no attempt made
to blend between even and odd scanlines. This keeps interlaced motion
intact
for those who are targeting full resolution interlaced video sources
such
as DV .AVIs or interlaced MPEG-2. If the video file you are dealing
with
is not interlaced, or under 288 pixels in height, it is recommended you
not enable this function.
The radius around source pixel option defines the
area around the source that will be considered by the filter. The
bigger the radius, the better the noise reduction can be, however, the
filter slows down geometrically the larger the radius is made. A
radius of 1 pixel means that the filter is doing 3x3 filtering for
every
pixel. A radius of 10 pixels means that the filter is doing 21x21
filtering for every pixel, or over 20 fold the number of operations.
Download
2D Cleaner Beta 0.6!
The Source Code
This source code is provided under the GPL
license.
This means you are free to use and distribute the software and program
code for no fee. This also means you are free and encouraged to
improve
and expand upon the source code, but only as long as you make your
modified
version also under the GPL, and thus free software with access to the
source
code for anyone. If you do improve the program, PLEASE do let me
know and pass on the changes so I may integrate them into 2d
cleaner.
You will be credited for your work. The source code compiles
under
Visual C++ 6.0 with fix-pack 3. I may attempt to convert the
program
to a Borland compiler later, but for now Visual C++ will have to do
(anyways,
that is what VirtualDub is written in). If there is a problem
with
the source code distribution, please do let me know.
Download
the source code to 2D Cleaner 0.6!
Temporal Cleaner Beta 0.5
A severely modified version of VirtualDub's internal
temporal smoother filter that only averages pixels between frames that
are within certain thresholds. This has the effect of blending
away
much of the random video noise that appears in one frame, but not
another,
but it does not blend motion leading to ghosting effects. It also has a
feature dubbed "pixel lock" whereby pixels that do not change much
between
multiple frames end up being set to the same value. This feature, can
substantially
reduce or remove video noise by ignoring tiny pixel changes, and should
aid MPEG-1, 2 or 4 compression, especially for moderately noisy video
sources.
The filter can operate either in YUV or RGB modes. In YUV mode it
can be more aggressive in blending and pixellocking situations where
the
luminance difference is small but the chrominance difference is
larger.
In addition, the values that are compared are now biased so that
differences
in very dark or very bright areas are increased to make Temporal
Cleaner
more sensitive to them. With this new version, MANY new settings
have been introduced, and the settings have new values.
The options available for the filter are a
scene
detection threshold value, YUV mode option, a luminance blending
threshold
value, a luminance pixellocking value, a chrominance blending value, a
chrominance pixellocking value, a "show motion" option, and a luminance
locking option. The default settings I programmed in seem to work
well with most of my video sources, but you should experiment with them
all to find your optimal settings.
The scene detection threshold defines the percent
of pixels in a frame that exceeds the threshold in order for the filter
to assume a new scene has begun. When a new scene is detected, all
locked
pixels are ignored and the filter passes the new frame untouched.
This was necessitated since "pixel lock" would often keep some pixels
from
previous scenes even after scene changes.
The YUV mode option decides whether or not to
process
the thresholding in YUV or RGB mode. RGB mode is the native mode
of VirtualDub and is thus quicker since there is no need to convert the
pixels. In YUV mode you can threshold the luminance and
chrominance
values seperatly. In RGB mode only the luminance thresholds are
used
to compare against the Red, Green and Blue color channels. (in
fact,
the filter will simply duplicate the luminance values into the
chrominance
values once you hit OK in RGB mode) The RGB->YUV colorspace
conversions
will not effect image quality in any way unless the luminance locking
option
is enabled.
The blending thresholds can be anywhere from 0 to
255, and defines the maximum difference between a pixel in the current
frame and the pixel in the previous frame in which the program will
blend
the two together. Higher thresholds blend more motion together,
but
will also blend more video noise away.
The "pixel lock" threshold values defines the
maximum
difference between pixels between frames where the pixel from the
previous
frame can replace the pixel in the current frame. It is
recommended
that the "pixel lock" thresholds be set to a value less than the main
threshold
values.
The "show motion" option, inspired by the equivalent
function in Donald Graft's Smart Deinterlacer, will turn any pixel in
the
current frame that exceeds the threshold black. It also turns any
pixels that are "pixel locked" blue and pixels that are being luminance
locked gray. This will show you the areas of the frame that the
filter
considers to be moving and the areas the filter considers static.
Do NOT leave this option on when you are actually converting your
files.
(note: this setting is NOT saved for batch operations or when you
save processing settings, since this option is meant only for
"debugging"
ones settings)
The "luminance locking" option decides whether or
not to allow yet another option for output for compared pixels.
If
a pixel's luminance is with the Luminance pixellocking threshold of the
previous pixel's luminance, but the chrominance difference is only
within
the chrominance blending threshold, Temporal Cleaner will keep the
luminance
of the previous pixel and blend the chrominance of the previous pixel
and
the current one. This option only works in YUV mode, and may or
may
not help noise reduction.
BTW: Since I cache the last frame internally within the filter
and do not rely on VirtualDub to keep track of it, this filter can (and
perhaps should) be run multiple times within a filter chain to further
blend out noise. (Thanks to Donald Graft for his great suggestion
to handle previous frames this way!)
Download
the Temporal Cleaner 0.5!
The Source Code
This source code is provided under the GPL
license.
This means you are free to use and distribute the software and program
code for no fee. This also means you are free and encouraged to
improve
and expand upon the source code, but only as long as you make your
modified
version also under the GPL, and thus free software with access to the
source
code for anyone. If you do improve the program, PLEASE do let me
know and pass on the changes so I may integrate them into 2d
cleaner.
You will be credited for your work. The source code compiles
under
Visual C++ 6.0 with fix-pack 3. I may attempt to convert the
program
to a Borland compiler later, but for now Visual C++ will have to do
(anyways,
that is what VirtualDub is written in). If there is a problem
with
the source code distribution, please do let me know.
Download
the source code to Temporal Cleaner
0.5!
At this point, ALL of these filters are probably
still buggy and not fully optimized. The code at this point is
entirely
C/C++ without a line of x86 assembler code. Do note that due to
the
nature of 2d Cleaner, I find it unlikely that they it will ever be
terribly
fast. I have released these filters under the GPL since I believe
in the idea of community software, and since I partially based my code
on other GPL covered source code.
As you may be able to surmise from my
release of
the code under the GPL, these filters are totally and completely free
to
download, distribute and use. Please check the GNU web page for
more
information about the specifics of the licensing model. I claim
no
liability for any use of these filters for any malicious or illegal
activities
nor any spontaneous combustion that may occur from use of the software,
you alone are responsible for your actions.
Also if you would like to add a link to my
filters,
PLEASE make the link to http://home.earthlink.net/~casaburi/download/
I cannot guarantee the links in this page will always work
VirtualDub Links
VirtualDub
- This is the mother of them all. Avery Lee's page for the
excellent
free video editing/capture package that is the video editing/processing
package that I use.
VirtualDub Filters
Donald
Graft - The home page for Donald Graft's filters, which just
happens to include the best deinterlacer available anywhere; a great
unsharp
mask filter, which despite what it sounds like, is a great sharpening
filter;
a color adjusting filter; and enough other advanced filters to keep you
busy for hours experimenting with improving your video.
Chris
LaRosa - Home page to an optimized 2:1 reduction filter and
frame tweaker filter for VirtualDub.
X-Bios
- Home page to a slew of filters including a very radical new color
stabilization
filter that promises to become one of the most effective temporal noise
reducers imaginable.
Gunnar
Thalin
- More great, free VirtualDub filters including another intelligent
deinterlacing
filter.
MPEG Encoder Links
bbMPEG
- The home page for one of the best Win32 MPEG encoders in existence,
that
also happens to be free. It may not be the fastest encoder, but
the
results are truly amazing. This is now the only MPEG encoder I
use.
Tsunami
MPEG
(English Page) - The home page of the English translation of
the terrific freeware Win32 Tsunami MPEG encoder. This encoder
boasts
terrific image quality, good performance and a great set of mpeg tools
allowing joining/cutting, demuliplexing and multiplexing of nearly any
MPEG1/2 stream.
Other Video Links
Ben-Rudiak
Gould - A great site which houses the incredible and free
HuffYUV
video codec that losslessly compresses video on the fly getting nearly
as much compression as some motion-JPEG codecs without any loss of
quality.
HIGHLY recommended!
Steven Don
-
The author of a slew of VirtualDub filters including a temporal noise
reducer
that predates Temporal Cleaner. There are tons of utils and other
cool stuff at this page.
CodecPage-
A terrific video processing/compression site explaining how to best
encode
MPEG1/2/4
DesktopVideoWorld
- A somewhat Matrox oriented site containing a great discussion forum
on
desktop video.
Thank you to Avery Lee for developing the
incredible program VirtualDub, and for releasing his source code under
the GPL (which I used to as a template for several of these filters),
and
to Donald Graft, Steven Don, and X-Bios for his unending help, support,
and useful suggestions.
[Return to my home page]
Copyright (C) 2004 Jim Casaburi
|