Java Color Quantizers Quality Measurements and Benchmark Testing by Gif4J Software
Gif4J gif animation software logotype
Home Page for Gif4J Software java gif image processing products, solutions and services Products Page for java GIF image processing software Purchase java GIF image managing products Download Gif4J GIF image processing products Java imaging FAQs and Gif4J solutions support Contact Page Customer Area
Java-based quantizers quality measurements and benchmark testing

Java Color Quantizers Quality Measurements and Benchmark Testing

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

    Quantizer+Mode Result Image
     MEMORY_LOW_FAST (the fastest) 19 ms result
     MEMORY_LOW_FAST_DITHER 43 ms result
     MEMORY_LOW_OPTIMIZED 97 ms result
     MEMORY_LOW_OPTIMIZED_DITHER 113 ms result
     MEMORY_NORMAL_FAST 31 ms result
     MEMORY_NORMAL_FAST_DITHER 54 ms result
     MEMORY_NORMAL_OPTIMIZED 105 ms result
     MEMORY_NORMAL_OPTIMIZED_DITHER (the best quality) 141 ms result
     Median-cut 67 ms result
     NewQuant 125 ms result
     Octree 301 ms result
     Octree+DITHER 511 ms result

    Test 2

    Source Image (click to view the full-size image)


    size 640x424

    Quantizer+Mode Result Image
     MEMORY_LOW_FAST (the fastest) 23 ms result
     MEMORY_LOW_FAST_DITHER 54 ms result
     MEMORY_LOW_OPTIMIZED 101 ms result
     MEMORY_LOW_OPTIMIZED_DITHER 129 ms result
     MEMORY_NORMAL_FAST 39 ms result
     MEMORY_NORMAL_FAST_DITHER 82 ms result
     MEMORY_NORMAL_OPTIMIZED 109 ms result
     MEMORY_NORMAL_OPTIMIZED_DITHER (the best quality) 137 ms result
     Median-cut 117 ms result
     NewQuant 245 ms result
     Octree 379 ms result
     Octree+DITHER 691 ms result

    Test 3

    Source Image (click to view the full-size image)


    size 640x452

    Quantizer+Mode Result Image
     MEMORY_LOW_FAST (the fastest) 27 ms result
     MEMORY_LOW_FAST_DITHER 62 ms result
     MEMORY_LOW_OPTIMIZED 105 ms result
     MEMORY_LOW_OPTIMIZED_DITHER 136 ms result
     MEMORY_NORMAL_FAST 31 ms result
     MEMORY_NORMAL_FAST_DITHER 70 ms result
     MEMORY_NORMAL_OPTIMIZED 117 ms result
     MEMORY_NORMAL_OPTIMIZED_DITHER (the best quality) 140 ms result
     Median-cut 97 ms result
     NewQuant 273 ms result
     Octree 394 ms result
     Octree+DITHER 722 ms result

    Test 4

    Source Image (click to view the full-size image)


    size 325x480

    Quantizer+Mode Result Image
     MEMORY_LOW_FAST (the fastest) 19 ms result
     MEMORY_LOW_FAST_DITHER 31 ms result
     MEMORY_LOW_OPTIMIZED 93 ms result
     MEMORY_LOW_OPTIMIZED_DITHER 109 ms result
     MEMORY_NORMAL_FAST 38 ms result
     MEMORY_NORMAL_FAST_DITHER 54 ms result
     MEMORY_NORMAL_OPTIMIZED 102 ms result
     MEMORY_NORMAL_OPTIMIZED_DITHER (the best quality) 128 ms result
     Median-cut 89 ms result
     NewQuant 199 ms result
     Octree 242 ms result
     Octree+DITHER 410 ms result

    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.


    Gif4J java gif imaging lib (professional)
    Gif4J PRO
    Overview
     
    Gif4J Java Color Quantizer
    Overview
    Quality Measurements & Benchmark Testing
    Test Online
     
    Gif4J PRO Tutorial
    Loading GIF Images
    Creating GIF Images
    Creating GIF Frames
    Transform GIF Images
    Saving GIF Images
    Watermarking
    Morphing Filters
    Text Rendering
     
    Gif4J java gif imaging lib (light)
    Gif4J LIGHT
    Overview
     
    Gif4J LIGHT Tutorial
    Creating GIF Images
    Creating GIF Frames
    Saving GIF Images
     
    Home |  Privacy Policy |  Legal Information 
    © Gif4J Software 2004-2017