Digitization

Why do we need it?

Analog signals, such as sound, are continuously variable, both in the number of possible values of the signal at a given time, as well as in the number of points in the signal in a given period of time. However, digital signals (the way things are send/stored in computers) are discrete in both of those respects – generally a finite sequence of integers – therefore a digitization can, in practical terms, only ever be an approximation of the signal it represents.

How it Works?

Digitalization occurs in two parts:

Digitization

The reading of an analog signal A, and, at regular time intervals (frequency), sampling the value of the signal at the point. Each such reading is called a sample and may be considered to have infinite precision at this stage;

Quantization

Samples are rounded to a fixed set of numbers (such as integers), a process known as quantization.

Now that we have seen about digitization we know that it is important to represent continuous signals with discrete variables but, how do we use it in practice?

The 3 Phases of Digitization:

Sampling

Quantization

Codification

Sampling

Sound Sampling

Sound sampling is a way of converting real sounds into a form that a computer can store, and replay. Natural sound is in analogue form this means it is a sound wave and sound waves have a frequency. This frequency is measured in Hertz (Hz). If the sound oscillates at 50 times a second, then its frequency is 50Hz, and so on. The higher the frequency, the higher the pitch of the sound.
A computer is a digital device. This means that it needs definite values (0s and 1s in the case of a computer) so we need a converter. A converter works by "sampling" the wave at regular intervals (in this case the sound wave). At each sampling it samples the wave and turns it into a number for the computer. It does this a fixed number of times per second. This is called the sample rate.
This method of conversion is called "successive approximation", because it keeps taking approximations of the wave. ...

Image Sampling

A typical approach of storing an image digitally on a computer, is by sampling the image at a rectangular grid. The color, or intensity, at each of these points is converted into a numeric value and stored in the computer. Apart from the color/intensity at those specific points, everything else is discarded when the image is stored in the computer.
When displaying this digital image, we again form a continuous image by interpolating between the stored samples.

...

Now that we defined the needed samples we must defined how to quantify them

Quantization

Image Quantization

the process of converting a continuous range of values into a finite range of discreet values.[1]
As number of bits to represent a pixel intensity (assume Gray scale image for convenience) is limited, quantization is needed. Suppose 8 bit is used for a pixel, it’s equivalent value ranges from 0 to 255 (discrete values). 0 is assigned to pure Black, and 255 is assigned to pure White. Intermediate values are assigned to gray scales as shown in this image. This process is quantization. For 8 bit pixels, quantization level is 256.


Sound Quantization

Every sample is represented by an approximation of its real value. This is where the conversion into digital of an analogue signal introduces a degradation. The voltage-value gets picked up by an appropriate circuit and must then be stored on a digital support system, therefore it needs to be first converted into binary form. To do this we need to add a quantization operation which identifies a binary number as an approximation of the real value introducing an error called: quantization noise. The latter's maximum amplitude is identified with the amplitude of the quantization-interval.


Nyquist frequency

The Nyquist frequency is the bandwidth of a sampled signal, and is equal to half the sampling frequency of that signal. If the sampled signal should represent a continuous spectral range starting at 0 Hz (which is the most common case for speech recordings), the Nyquist frequency is the highest frequency that the sampled signal can unambiguously represent.

Example

If a speech signal is sampled at 22050 Hz, the highest frequency that we can expect to be present in the sampled signal is 11025 Hz. This means that to heed this expectation, we should run the continuous signal through a low-pass filter with a cut-off frequency below 11025 Hz; otherwise, we would experience the phenomenon of aliasing.