Content deleted Content added
Adding some rigor (the prior version was not, strictly speaking, correct) |
Copyeditting; quantization isn't an process on signals, per se, but the dimensions of the signal; added section on JPEG |
||
Line 1:
[[Image:FloorQuantizer.png|right|frame|Quantization of ''x'' using ''Q(x)'' = floor(''Lx'')/''L''.]]
In [[digital signal processing]], '''quantization''' is the process of approximating a continuous
More specifically, a [[signal (information theory)|signal]] can be multi-dimensional and quantization need not be applied to all dimensions.
A discrete signal need not necessarily be quantized (a pedantic point, but true nonetheless and can be a point of confusion). ''See [[ideal sampler]].''
A common use of quantization is in the conversion of a [[continuous signal]] into a [[discrete signal]] by [[sample (signal)|sampling]] and then quantizing.
Both of these steps are performed in [[analog-to-digital converter]]s with the quantization level specified by a number of [[bit]]s.
A specific example would be [[compact disc]] (CD) audio which is sampled at 44,100 [[Hz]] and quantized with 16 bits (2 [[byte]]s) which can be one of 65,536 (<math>2^16</math>) possible values per sample.
The simplest and best-known form of quantization is referred to as [[scalar]] quantization, since it operates on scalar (as opposed to multi-dimensional [[vector]]) input data.
In general, a scalar quantization operator can be represented as
:<math>Q(x) = g(\operatorname{round}(f(x)))</math>
where
The integer value The integer value In computer audio and most other applications, a method known as ''uniform quantization'' is the most common.
If :<math>Q(x) = \frac{\operatorname{round}(2^{M-1}x)}{2^{M-1}}</math>.
In this case the
The value <math>2^{-(M-1)}</math> is often referred to as the ''quantization step size''. Using this quantization law and assuming that quantization noise is approximately [[uniform distribution (continuous)|uniformly distributed]] over the quantization step size (an assumption typically accurate for rapidly varying :<math>
=
6.0206 M \operatorname{dB}</math>.
From this equation, it is often said that the SNR is approximately 6 [[decibel|dB]] per [[bit]].▼
▲:<math>\frac{S}{N_q} \approx 20 \operatorname{log}_{10}(2^M) = 6.0206M \operatorname{dB}</math>.
In digital [[telephone|telephony]], two popular quantization schemes are the '[[A-law algorithm|A-law]]' (dominant in [[Europe]]) and '[[Mu-law algorithm|µ-law]]' (dominant in [[North America]] and [[Japan]]).
▲From this equation, it is often said that the SNR is approximately 6 dB per bit.
These schemes map discrete analog values to an 8-bit scale that is nearly linear for small values and then increases logarithmically as amplitude grows.
Because the human ear's perception of [[loudness]] is roughly logarithmic, this provides a higher signal to noise ratio over the range of audible sound intensities for a given number of bits.
==Compression==
Quantization also plays a part in [[lossy data compression]].
One such lossy compression scheme is [[JPEG]].
During compression, the coefficients of the [[discrete cosine transform]] are quantized to facilitate the [[entropy encoding]] step.
So by reducing the set of values (the post-quantized step of JPEG typically yields many zero values which be exploited to reduce the number of bits needed) by quantization, higher compression ratios can be achieved.
==See also==
|