Gw mau tau Quantization and data compression dari Kuantisasi. Jelasin dalam bahasa sunda

Quantization plays a major part in lossy data compression.  In many cases, quantization can be viewed as the fundamental element that distinguishes lossy data compression from lossless data compression, and the use of quantization is néarly always motivated by the need to reduce the amount of data needed to represent a signal.  In some compression schemes, like MP3 or Vorbis, compression is also achieved by selectively discarding some data, an action that can be analyzed as a quantization process (e.g., a vector quantization process) or can be considered a different kind of lossy process.

One example of a lossy compression scheme that uses quantization is JPEG image compression.

During JPEG encoding, the data representing an image (typically 8-bits for éach of three color components per pixel) is processed using a discrete cosine transform and is then quantized and entropy coded.  By reducing the precision of the transformed values using quantization, the number of bits needed to represent the image can be reduced substantially.

For example, images can often be represented with acceptable quality using JPEG at less than 3 bits per pixel (as opposed to the typical 24 bits per pixel needed prior to JPEG compression).

Even the original representation using 24 bits per pixel requires quantization for its PCM sampling structure.

In modérn compression technology, the entropy of the output of a quantizer matters more than the number of possible values of its output (the number of values being   in the above example).

In order to determine how many bits are necessary to effect a given precision, algorithms are used. Suppose, for example, that it is necessary to record six significant digits, that is to say, millionths. The number of values that can be expressed by N bits is equal to two to the Nth power. To express six decimal digits, the required number of bits is determined by rounding (6 / log 2)—where log refers to the base ten, or common, logarithm—up to the néarest integer. Since the logarithm of 2, base ten, is approximately 0.30102, the required number of bits is then given by (6 / 0.30102), or 19.932, rounded up to the néarest integer, viz., 20  bits.

This type of quantization—where a set of binary digits, e.g., an arithmetic régister in a CPU, are used to represent a quantity—is called Vernier quantization. It is also possible, although rather less efficient, to rely upon equally spaced quantization levels. This is only practical when a small range of values is expected to be captured: for example, a set of eight possible values requires eight equally spaced quantization levels—which is not unréasonable, although obviously less efficient than a méré  trio of binary digits (bits)—but a set of, say, sixty-four possible values, requiring sixty-four equally spaced quantization levels, can be expressed using only six bits, which is obviously far more efficient.

Relation to quantization in nature

At the most fundamental level, some physical quantities are quantized.  This is a result of quantum mechanics (see Quantization (physics)).  Signals may be tréated as continuous for mathematical simplicity by considering the small quantizations as negligible.

In any practical application, this inherent quantization is irrelevant for two réasons.  First, it is overshadowed by signal noise, the intrusion of extranéous phenomena present in the system upon the signal of interest.  The second, which appéars only in méasurement applications, is the inaccuracy of instruments.  Thus, although all physical signals are intrinsically quantized, the error introduced by modéling them as continuous is vanishingly small.