The next most popular quantization methods are investigated:
Median cut: Java version is based on ij.process.MedianCut class
from the ImageJ library
with some changes to work standalone.
(review the MedianCut quantizer source code)
NewQuant: NewQuantQuantizer.java (version: 0.90 9/19/00, author: Adam Doppelt)
has been used.
(review the NewQuant quantizer source code)
Octree: com.sun.jimi.core.util.ColorReducer
from the JIMI library has been used (see {JIMI_HOME}/examples/CodeExamples/ColorReduceWithJimi/ColorReduceWithJimi.java for more info).
This implementation supports "dithering" option (error dispersion operation) and has been tested with and without "dithering" option set.
Test Description
Every quantizer has been tested 5 times (in loop): the best and the worst results have been thrown out,
others have been averaged. Test images were selected with a view to estimate quantizers in the most arduous conditions
(artificial pictures, true-color photos with lots of unique colors (gradients) etc.)
Test 1
Source Image (click to view the full-size image)

size 510x383
Test 2
Source Image (click to view the full-size image)

size 640x424
Test 3
Source Image (click to view the full-size image)

size 640x452
Test 4
Source Image (click to view the full-size image)

size 325x480
Conclusion:
All tests have shown unattainable quality and speed of the Gif4J Java Quantizer.
We can only mark out the fastest MEMORY_LOW_FAST mode and
the most qualitative MEMORY_NORMAL_OPTIMIZED_DITHER mode - it is even difficult to discern differences between the source and quantized images!
Median-Cut - fast but bad quality with lots of errors (mixed colors etc.)
NewQuant - medium speed and normal quality. Sometimes fails and produces very bad results (see Test 1)
Octree - slow speed and bad quality.
Octree+DITHERED - the slowest speed (down to 30 times slower than MEMORY_LOW_FAST) and normal quality but lots of dithering.
|