Pixeltweek is a very simple image filter which can be used as a moderately effective despeckler or as a pre-processor for images to remove noise and allow for more effective compression. It is only properly effective on images with areas of uniform color, which limits it's use to artwork and animation.
In more technical terms, it is similar in concept to a mode filter with a few alterations that greatly improve conservation of detail. Most importantly, it will only alter pixels in which the modal value is a majority - a condition that is typical of noise, or perhaps single-pixel boundries on complex shapes, but nowhere else. Imposing this condition diminishes noise removal significently, but diminishes degredation of signal component of an image to nearly nothing. Dithered colors excluded. It also has the option of looking for correlation in color channels - if a pixel is determined to be noise in two channels, it'll be assumed to be noise in the third as well. This can be disabled when all channels are truely independant, such as when removing CCD sensor noise.
Noise removal performance.
Pixeltweek compared to the commonly used median filter. While the median filter removes all noise, it does so at the expense of significent edge bluring. Pixeltweek removes much less noise, but causes no noticeable degredation at all.
Use in compression
The same algorithm used for this denoising also has another interesting property. When given a noise-free image, it will make subtle changes in the borders between colors or color bands. These are too small to be noticed, even by a viewer flicking back and forth between the before and after image, but do make the image more easily compressed. In testing I found a 10% reduction in the size of a PNG.
Size | Link |
---|---|
397926 | Before |
348436 | After |
This benefit in compression comes from a combination of the removal of very fine noise (On the order of one quantitisation level) and a 'tightening' of the boundries between quantisation bands, as can be seen in a highly chroma-enhanced enlargement.
An attempt at using this technique on video proved partially successful, but the benefits were too small to be of much practical use: From 19.419 to 19.647dB, most of which would be only and illusionary gain due to the manner in which lossy compression rejects single-pixel features.
A better approach to noise removal
As a noise removal filter, pixeltweek was a failure: It works, but not well enough to be of practical use for that purpose. Other means just serve far better - in particular, I found that the use of a median filter followed by a threshhold limiter, both iterated, does the job very well indeed. I keep it only as a curiosity - it's ability to improve PNG compression may me of some utility.
For noise removal, I found that the 'limited mode' approach of pixeltweek was inferior to other approaches using a threshhold to apply either a median filter or other filters of similar properties.
I'm perfectly aware that it's 'tweak' not 'tweek.' It just makes the project easier to find on google if it doesn't have a name used by quite so many art forum posters.