2 ms·
Consider the case of a 1-bit image. Let's say the "signal" is a smooth gradient of black to white from one side of the image to the other. If you simply quantiz
by dTal 11y ago
Consider the case of a 1-bit image. Let's say the "signal" is a smooth gradient of black to white from one side of the image to the other. If you simply quantize to the nearest value, one half of the image ends up solid black and the other half, solid white. No amount of after-the-fact "dithering" of this image will recover the original gradient - it is lost forever.
Now supposing we add noise to our signal before we quantize. A given pixel at 25% gray (which under the previous scheme would always end up solid black) now has a 25% chance of ending up white. A contiguous block of such pixels will have an average value of 25% gray, even though an individual pixel can only be black or white. Thus, by flip-flopping between the two closest values ("dithering") in statistical proportion to the original signal, information is preserved.
https://en.wikipedia.org/wiki/File:1_bit.png https://en.wikipedia.org/wiki/File:1_bit.png
- lmm 11y agoSure, I know how it works. But it sacrifices resolution (spatial in this example, temporal in the case of audio) and compresses poorly. Rather than dithering, you should use a higher bit depth so that you can represent your original gradient (with the desired smoothness) directly.