Dithering Quantization Error
Contents |
noise used to randomize quantization error, preventing large-scale patterns such as color banding in images. Dither is routinely used in processing of both digital audio and video data, and is often one of the last stages of what is dithering audio mastering audio to a CD. A typical use of dither is converting a greyscale
Dithering Image
image to black and white, such that the density of black dots in the new image approximates the average grey level what is dithering in computer graphics in the original. Contents 1 Etymology 2 In digital processing and waveform analysis 3 Digital audio 3.1 Usage 3.2 Different types 3.2.1 Which types to use 4 Digital photography and image processing 4.1 Examples 4.2
Dithering Algorithm
Applications 4.3 Algorithms 5 Other applications 6 See also 7 References 8 External links Etymology[edit] …[O]ne of the earliest [applications] of dither came in World War II. Airplane bombers used mechanical computers to perform navigation and bomb trajectory calculations. Curiously, these computers (boxes filled with hundreds of gears and cogs) performed more accurately when flying on board the aircraft, and less well on ground. Engineers realized that the vibration from ordered dithering the aircraft reduced the error from sticky moving parts. Instead of moving in short jerks, they moved more continuously. Small vibrating motors were built into the computers, and their vibration was called dither from the Middle English verb "didderen," meaning "to tremble." Today, when you tap a mechanical meter to increase its accuracy, you are applying dither, and modern dictionaries define dither as a highly nervous, confused, or agitated state. In minute quantities, dither successfully makes a digitization system a little more analog in the good sense of the word. — Ken Pohlmann, Principles of Digital Audio[1] The term "dither" was published in books on analog computation and hydraulically controlled guns shortly after the war.[2][3] The concept of dithering to reduce quantization patterns was first applied by Lawrence G. Roberts[4] in his 1961 MIT master's thesis[5] and 1962 article[6] though he did not use the term dither. By 1964 dither was being used in the modern sense described in this article.[7] In digital processing and waveform analysis[edit] Dither is often used in digital audio and video processing, where it is applied to bit-depth transitions; it is utilized in many different fields where digital processing and analysis are used – especially waveform analysis. These uses include systems using digital sig
on purpose, and it is a good thing. How can adding noise be a good thing??!!! We add noise to make a trade. We trade a little low-level hiss for a big reduction in distortion. It's a good trade, and one
Floyd Steinberg Dithering
that our ears like. The problem The problem results from something Nyquist didn't mention about a
Ordered Dithering Matrix Example
real-world implementation—the shortcoming of using a fixed number of bits (16, for instance) to accurately represent our sample points. The technical term for this is dithering in multimedia "finite wordlength effects". At first blush, 16 bits sounds pretty good—96 dB dynamic range, we're told. And it is pretty good—if you use all of it all of the time. We can't. We don't listen to full-amplitude ("full code") sine https://en.wikipedia.org/wiki/Dither waves, for instance. If you adjust the recording to allow for peaks that hit the full sixteen bits, that means much of the music is recorded at a much lower volume—using fewer bits. In fact, if you think about the quietest sine wave you can play back this way, you'll realize it's one bit in amplitude—and therefore plays back as a square wave. Yikes! Talk about distortion. It's easy to see that the lower the signal levels, the higher the http://www.earlevel.com/main/1996/10/20/what-is-dither/ relative distortion. Equally disturbing, components smaller than the level of one bit simply won't be recorded at all. This is where dither comes in. If we add a little noise to the recording process… well, first, an analogy… An analogy Try this experiment yourself, right now. Spread your fingers and hold them up a few inches in front of one eye, and close the other. Try to read this text. Your fingers will certainly block portions of the text (the smaller the text, the more you'll be missing), making reading difficult. Wag your hand back and forth (to and fro!) quickly. You'll be able to read all of the text easily. You'll see the blur of your hand in front of the text, but definitely an improvement over what we had before. The blur is analogous to the noise we add in dithering. We trade off a little added noise for a much better picture of what's underneath. Back to audio For audio, dithering is done by adding noise of a level less than the least-significant bit before rounding to 16 bits. The added noise has the effect of spreading the many short-term errors across the audio spectrum as broadband noise. We can make small improvements to this dithering algorithm (such as shaping the noise to areas where it's less objectionable), but the process remains simply one of adding the minimal amount of noise necessary to do the job.
However, the CD standard remains at 16-bit/44.1kHz. Somehow, the DAW user has to get the 24-bit file into a 16-bit file. So what are the options available http://www.pcrecording.com/dither.htm to the DAW user? Bit Resolution: Bit resolution refers to the number of bits a soundcard can use to express the amplitude of an audio sample. Each bit can resolve 6dB of amplitude information - - the addition of each bit results in 6dB more amplitude range. The total number of bits available is referred to as bit depth. The total of the amplitude what is information is known as dynamic range. Dynamic range: Dynamic range is the difference between the quietest and the loudest amplitude a soundcard can record. Dynamic range is determined by the number bits the soundcard can use to resolve the amplitude of the signal. As bit depth increases so does the dynamic range. This means the threshold for the quietest signal that can be recorded what is dithering goes down and the threshold for the loudest signal that can be recorded goes up. A 16-bit signal has a 96dB dynamic range. A 20-bit signal dynamic range is 120dB. A 24-bit signal dynamic range is 144dB. What does this have to do with noise? All analog systems have inherent system noise. Digital systems have no system noise but do introduce quantization errors which sound like noise. So, in terms of digital noise, each additional bit reduces the audible level of quantization error by 6dB. Quantization error: Each bit represents a quantization interval - - with a discrete threshold for its amplitude range. In an analog waveform, there is an equivalent dynamic range that exists between each digital 0 and 1. When the analog signal amplitude being sampled falls between a quantization interval (each bit), the system cannot resolve the analog amplitude of the input signal and simply truncates it. The result is a square wave for each instance where the digital device cannot reconcile the difference. These square waves leave digital artifacts that do not represent any frequency in the analog waveform. This is known as quantization error. The