6 ms·
Dithering trades sample resolution for sample frequency to convey the same information. For images, the underlying sample frequency usually doesn't change but t
by dreamcompiler 9y ago
Dithering trades sample resolution for sample frequency to convey the same information. For images, the underlying sample frequency usually doesn't change but the apparent spatial sample frequency becomes lower in order to achieve more than one effective bit per (coarser) sample.
For one-dimensional signals like audio, the underlying sample frequency is usually increased while decreasing the sample resolution (often to 1 bit per sample). This keeps the effective Nyquist frequency where it needs to be while pushing noise much higher in frequency where it's very easy to remove with an analog filter. Delta-sigma modulation is perhaps the most common method of audio dithering (although the delta-sigma literature rarely uses the D word).
The reason images and audio usually use dithering in opposite ways is that images are usually post-processed for lower true sample resolution (and higher effective sample resolution) after sampling, while audio is often sampled initially at much higher than the Nyquist frequency because dithering is a planned part of the audio processing chain. But not always! Those are merely common use cases.
- starmole 9y agoI'm not sure I follow. To me dithering comes from quantization. I don't think you should think of dithering in frequency space. https://bjango.com/images/articles/gradients/dithering-extreme.png https://bjango.com/images/articles/gradients/dithering-extre... Illustrates the same signal dithered or not. No sampling rate involved. And please correct me if i'm wrong, but you can not trade sample accuracy for sampling rate.
- gugagore 9y agoYou can trade sample accuracy for sample rate. This is how I directly interpret ordered dithering. The following line on the wikipedia article communicates (maybe) this: "The size of the map selected should be equal to or larger than the ratio of source colors to target colors. For example, when quantizing a 24bpp image to 15bpp (256 colors per channel to 32 colors per channel), the smallest map one would choose would be 4x2, for the ratio of 8 (256:32). This allows expressing each distinct tone of the input with different dithering patterns." Same idea applies to 1D signals (from https://www.wikiwand.com/en/Delta-sigma_modulation https://www.wikiwand.com/en/Delta-sigma_modulation : " used to convert high bit-count, low-frequency digital signals into lower bit-count, higher-frequency digital signals") same idea: https://www.wikiwand.com/en/Class-D_amplifier https://www.wikiwand.com/en/Class-D_amplifier https://www.wikiwand.com/en/Pulse-density_modulation https://www.wikiwand.com/en/Pulse-density_modulation
- HelloNurse 9y agoDithering noise, i.e. the difference between the original signal and the dithered signal, needs to be considered in "frequency space" like any other kind of noise. Dithering noise has the special feature of depending very strongly on the sampling rate and (statistically) very weakly on the input signal being dithered. Dithering allows replacing high-accuracy sampling (typically constrained by computer word lengths) with high-sample rate sampling (typically cheap): without using more accurate arithmetic, analog and often completely free lowpass filtering (such as looking at a dithered image from far enough) makes N samples, with M bits of accuracy each, equivalent to one sample with M+log N bits of accuracy.
- dreamcompiler 9y agoYou can indeed trade sample accuracy for sample rate as long as information is not lost -- and in dithering, information is preserved by diffusing the quantization error spatially. Look at the image you posted; on the right, the effective "pixels" have become larger while each has acquired more gray levels. That's a lower sample frequency traded for higher quantization resolution.
- dahart 9y agoYou're thinking of error diffusion, not the dithering itself, they are two separate things. Error diffusion is what spreads samples out spatially. Audio and image dithering are the same thing, they only become different when you add error diffusion. The modern image dithering that you use when going from an HDR image down to an 8-bits per pixel PNG or JPG uses exactly the same (very simple) algorithm you'd use to dither an audio file during mastering.
- dreamcompiler 9y agoFair enough. I forgot about noise dithering, which only preserves error information statistically rather than exactly. I don't understand your point about audio and image dithering being different when error diffusion is present. You can use error diffusion on both; in delta-sigma audio modulation, the error is diffused in only one dimension but it's still error diffusion.
- dahart 9y ago> You can use error diffusion on both Yes, absolutely right. Just making clear the distinction between dither and diffuse. Dither is always a local operation on a sample, diffuse is the spatial spreading to make the neighborhood more pleasant for humans. I was reacting to the statement "images and audio usually use dithering in opposite ways". The article here is about error diffusion, but it's pretty hard to say whether adding error diffusion to the dither process is the 'usual' choice, for either images or audio. It's very very common to not use error diffusion in both cases. Diffuse is more much important when the destination resolution is well above human perceptible just-noticeable differences. For example, going from 8 bits per channel to 1 bit per pixel, or for audio when going from 16 bit samples down to 8 bit samples.
- dreamcompiler 9y agoAgreed. I understand your point now. Thanks.