/ Friday, 24 February 2017 / No comments /

Sampling and Quantization the basic concept with examples


Sampling and Quantization Theory concept with Examples

Contents:

  1. Introduction 
  2. Introduction to sampling and Quantization
  3. Concept of sampling
  4. Concept of Quantization
  5. Comparison and difference between sampling and quantizing
  6. Practical Examples  

Introduction:

In this section we will see one of the two techniques of digital image processing.Why there is need to sample or quantize a signal and what are the purposes of these two techniques in digital systems and image processing.
Why to use sampling and quantzing?
When we have an analog output or analog signal it will have infinte values we can not figure out all these values.In other words if we have to measure or save or store these values  somewhere this could not be an easy task.if we take an example from image processing.the value of image sensor will be an analog signal.we can not store it.
So we have to convert an analog signal into a digital signal.
Analog signal is a continous form of information we have to convert this data into digital form.for example for a digital image from a sensor value we have to convert this signal into digital.

For this purpose we have two techniques:
  1. Sampling
  2. Quantization

Introduction to sampling and Quantization:

The process of digitizing the domain is called sampling and the process of digitizing the range is called quantization.If we take an example of sound signal or any image it has coordinates along x axis and amplitude in y axis.So the sampling deals with the digitization of coordinates and quantization deals with the digitization of amplitude.
Most devices we encounter deal with both analog and digital signals. Digital
signals are particularly robust to noise, and extremely efficient and versatile
means for processing digital signals have been developed.
On the other hand, in certain situations analog signals are sometimes more appropriate or even
necessary. For example, most underlying physical processes are analog (or atleast most conveniently modeled as analog), including the human sensorimotor systems. Hence, analog signals are typically necessary to interface with sensors and actuators.


Concept of Sampling:

In sampling X axis is digituzed
It is done on independent variable
In case of equation y = sin(x), it is done on x variable
It is further divided into two parts , up sampling and down sampling.
Recording of an analog signal at regular discrete moments of time in sampling. The sampling rate fis the number of samples per second. The time interval between samples is called the sampling interval Ts=1/fs

shows an analog signal together with some samples of the signal.
If we let T denote the time
interval between samples, then the times at which we obtain samples are given
by nT where n = . . . ,−2,−1, 0, 1, 2, . . .. Thus, the discrete-time (sampled)
signal x[n] is related to the continuous-time signal by
x[n] = x(nT).


There are 3 sampling methods:

  1. Ideal - an impulse at each sampling instant
  2. Natural - a pulse of short width with varying amplitude
  3. Flattop - sample and hold, like natural but with single amplitude value



The concept of sampling is directly related to zooming. The more samples you take, the more pixels, you get. Oversampling can also be called as zooming. 

What is Quantization:

Quantization is opposite to sampling. It is done on y axis.
Quantization makes the range of a signal discrete, so that the quantized signal
takes on only a discrete, usually finite, set of values.
One of the basic choices in quantization is the number of discrete quantization
levels to use.
an analog signal and quantized
versions for several different numbers of quantization levels. With L levels, we
need N = log2 L bits to represent the different levels, or conversely, with N bits
we can represent L = 2N levels.



The simplest type of quantizers are called zero memory quantizers in which
quantizing a sample is independent of other samples. The signal amplitude is
simply represented using some finite number of bits independent of the sample
time (or location for images) and independent of the values of neighboring
samples. Zero memory quantizers can be represented by a mapping from the
amplitude variable x to a discrete set of quantization levels {r1, r2..., rL}.


Difference between Sampling and Quantization?

  1. In sampling, the time axis is discretized 
  2. In quantization, y axis or the amplitude is discretized.
  3. In sampling a single amplitude value is selected from the time interval to represent
  4. In quantization, the values representing the time intervals are rounded off, to create a finite set of possible amplitude values.
  5. Sampling is done prior to the quantization process.

Practical Examples:

Examples of Sampling:

  1. Telephone companies digitize voice by assuming a maximum frequency of 4000 Hz. The sampling rate therefore is 8000 samples per second.
  2. A complex low-pass signal has a bandwidth of 200 kHz. What is the minimum sampling rate for this signal?

Solution

The bandwidth of a low-pass signal is between 0 and f, where f is the maximum frequency in the signal. Therefore, we can sample this signal at 2 times the highest frequency (200 kHz). The sampling rate is therefore 400,000 samples per second.

3. A complex bandpass signal has a bandwidth of 200 kHz. What is the minimum sampling rate for    this signal?

Solution

We cannot find the minimum sampling rate in this case because we do not know where the bandwidth starts or ends. We do not know the maximum frequency in the signal.

Examples of Quantization:

  1. We want to digitize the human voice. What is the bit rate, assuming 8 bits per sample?

Solution

The human voice normally contains frequencies from 0 to 4000 Hz. So the sampling rate and bit rate are calculated as follows:


2. We have a low-pass analog signal of 4 kHz. If we send the analog signal, we need a channel with a    minimum bandwidth of 4 kHz. If we digitize the signal and send 8 bits per sample, we need a      
  channel with a minimum bandwidth of 8 × 4 kHz = 32 kHz.


I hope you understand the basic concepts behind the theory of Sampling and Quantizing.We will see some of the concepts in details related to sampling and Quantization and the Sampling in Quantization in digital image processing in coming posts.

Share This Post :
Tags :
Related Posts

No comments:

Post a Comment

Social Media

Popular Posts