This is part 2 of the 3 part blog posts documenting the features of our first project.
Part 1 can be found here.
Part 3 can be found here.
Section 3.3: Quantization and Dithering
1. Quantization
Usage: image -quantize < nbits >
This command quantizes an image to use nbits per color channel, where nbits is a value from 1 to 8. Lower values will increase the level of quantization, and make countours more stark and visible.
Here is an example on a Windows 10 sample image with a lot of colors.
2. Random Dithering
Usage: image -randomDither <nbits>
This command quantizes the image, but adds a random amount of noise to the image before dithering. This is to help reduce contouring by introducing a random element into the process.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuRmqD9J6B18P2pC1pUjrmpThaO0E-cJQbPJchF9sJ2oRODWiG9laKLPLaWsfyynVKTkUITB939FQ2le6t7RDdEQc5EsO2hIWXQBi_ua0CD_sbdss4_a1Fz2swRuJG5tBjhnSY75U41rc/s640/r1+-+Copy.bmp)
3. Floyd-Steinberg Dithering
Usage: image -FloydSteinbergDither < nbits >
This is the most advanced dithering algorithm, that essentially distributes the error in quantization at a pixel, onto its neighboring pixels. On the image as a whole, it helps break up contouring by diffusing it throughout the image. Even at lower quantization levels, contouring is visibly reduced when compared to random dithering or simple quantization. Due to an unknown bug, however, doing Floyd-Steinberg dithering with 1 bit causes the image brightness levels to increase, while for higher bit values, this is not an issue.
Here are some examples:
Part 1 can be found here.
Part 3 can be found here.
Section 3.3: Quantization and Dithering
1. Quantization
Usage: image -quantize < nbits >
This command quantizes an image to use nbits per color channel, where nbits is a value from 1 to 8. Lower values will increase the level of quantization, and make countours more stark and visible.
Here is an example on a Windows 10 sample image with a lot of colors.
Usage: image -randomDither <nbits>
This command quantizes the image, but adds a random amount of noise to the image before dithering. This is to help reduce contouring by introducing a random element into the process.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuRmqD9J6B18P2pC1pUjrmpThaO0E-cJQbPJchF9sJ2oRODWiG9laKLPLaWsfyynVKTkUITB939FQ2le6t7RDdEQc5EsO2hIWXQBi_ua0CD_sbdss4_a1Fz2swRuJG5tBjhnSY75U41rc/s640/r1+-+Copy.bmp)
3. Floyd-Steinberg Dithering
Usage: image -FloydSteinbergDither < nbits >
This is the most advanced dithering algorithm, that essentially distributes the error in quantization at a pixel, onto its neighboring pixels. On the image as a whole, it helps break up contouring by diffusing it throughout the image. Even at lower quantization levels, contouring is visibly reduced when compared to random dithering or simple quantization. Due to an unknown bug, however, doing Floyd-Steinberg dithering with 1 bit causes the image brightness levels to increase, while for higher bit values, this is not an issue.
Here are some examples:
No comments:
Post a Comment