The document discusses differential coding and transform coding techniques for compressing digital images and signals. It explains that differential coding uses smaller codewords to encode the difference in amplitude between samples rather than the absolute amplitude. Transform coding decorrelates input signals using transforms like discrete cosine transform (DCT) or wavelet transform, allowing higher frequency components that the eye cannot detect to be removed, reducing file size. The document provides examples of 1D and 2D wavelet transforms and how they can be used to decompose and reconstruct signals.
The document discusses differential coding and transform coding techniques for compressing digital images and signals. It explains that differential coding uses smaller codewords to encode the difference in amplitude between samples rather than the absolute amplitude. Transform coding decorrelates input signals using transforms like discrete cosine transform (DCT) or wavelet transform, allowing higher frequency components that the eye cannot detect to be removed, reducing file size. The document provides examples of 1D and 2D wavelet transforms and how they can be used to decompose and reconstruct signals.
The document discusses differential coding and transform coding techniques for compressing digital images and signals. It explains that differential coding uses smaller codewords to encode the difference in amplitude between samples rather than the absolute amplitude. Transform coding decorrelates input signals using transforms like discrete cosine transform (DCT) or wavelet transform, allowing higher frequency components that the eye cannot detect to be removed, reducing file size. The document provides examples of 1D and 2D wavelet transforms and how they can be used to decompose and reconstruct signals.
codewords to represent the amplitude of each value/signal, a set of smaller codewords can be used each of which indicates only the difference in amplitude between the current value/signal being encoded • For example, 12 bits to obtain the required dynamic range but the maximum difference in amplitude between successive samples of the signal requires only 3-bits
13 January 2020 UST, YEMEN 2
• Let us consider differential coding in the context of digital images. In a sense, we move from signals with domain in one dimension to signals indexed by numbers in two dimensions (x, y)-the rows and columns of an image. • While the audio signals are encoded according to the time domain, the images signals are encoded according to the spatial domain.
13 January 2020 UST, YEMEN 3
A Typical Transform Coder
13 January 2020 UST, YEMEN 4
• As we scan across a set of pixel locations, the rate of change in magnitude is known as spatial frequency. • The spatial frequency will vary from zero (if all the pixel values remain the same) to high frequency (if each pixel magnitude changes from one location to the next). • There are two types: 1. Spatial horizontal frequency (Usually). 2. Spatial vertical frequency. 13 January 2020 UST, YEMEN 5 • The human eye is less sensitive to the higher spatial frequency components • If we can transform the original spatial form of representation into an equivalent representation involving spatial frequency components, then we can more readily identify and eliminate those higher frequency components which the eye cannot detect thereby reducing the volume of information
13 January 2020 UST, YEMEN 6
• The rationale behind transform coding is that if Y is the result of a linear transform T of the input vector X is such a way that the components of Y are much less correlated, then Y can be coded more efficiently than X • The transform T itself does not compress any data. The compression comes from the processing and quantization of the components of Y • DCT (Discrete Cosine Transformation) is a tool to decorrelated the input signal in a data-independent manner. • DCT is used in JPEG image.
13 January 2020 UST, YEMEN 7
• It is lossy compression coding. • Another method decomposing the input signal into its constitutes is the wavelet transform. It seeks to represent a signal with good resolution in both time and frequency domain, by using a set of basic functions called wavelets. • The approach provides us a multi-resolution analysis: the full-size image, the quarter-size image, the sixteen-size image, and so on, creates a pyramid. 13 January 2020 UST, YEMEN 8 • 1D Wavelet Transform: • For each level, the wavelet transform for a 1D sequence {𝑥𝑛,𝑖 } ; 𝑖 = 0, 1, 2, … , 𝑚 is defined by: • Averages: 𝑥𝑛,2𝑖 + 𝑥𝑛,2𝑖+1 𝑚−1 𝑥𝑛−1,𝑖 = ;𝑖= 0, 1, … , (1) 2 2 • Differences: 𝑥𝑛,2𝑖 − 𝑥𝑛,2𝑖+1 𝑚−1 𝑑𝑛−1,𝑖 = ;𝑖= 0, 1, … , (2) 2 2
13 January 2020 UST, YEMEN 9
• Arrangements of the wavelet transform are shown in the following figure (Next Slide). • The last level of the wavelet transform generates one element which is the average of the sequence {𝑥𝑛,𝑖 }. • In each level, the wavelet transform is only applied on 𝑥′𝑠 to get new 𝑥′𝑠, and new 𝑑′𝑠 by using equations 1, and 2.
13 January 2020 UST, YEMEN 10
13 January 2020 UST, YEMEN 11 • The original 1D sequence can be reconstructed (inverted) from the transformed sequence for many stages (from level [example 2nd level] to the lower level than it [example 1st level] considering only the average and the differences which are produced from the 𝑥′𝑠 values in the lower level) using the following relations: 𝑚−1 𝑥𝑛,2𝑖 = 𝑥𝑛−1,𝑖 + 𝑑𝑛−1,𝑖 ; 𝑖 = 0, 1, … , (3) 2 𝑚−1 𝑥𝑛,2𝑖+1 = 𝑥𝑛−1,𝑖 − 𝑑𝑛−1,𝑖 ; 𝑖 = 0, 1, … , (3 2
13 January 2020 UST, YEMEN 12
• The following figure shows example for 1D inverse wavelet transform:
13 January 2020 UST, YEMEN 13
2D Wavelet Transform: To find the 1st level of 2D Haar wavelet transform for 2D image, the following steps must be done: • Step 1: The wavelet transform is firstly applied on pixels of the 2D original image for each row alone using equations 1, and 2 to generate a new 2D matrix. This matrix is called intermediate image. • Step2: The wavelet transform is secondly applied on pixels of the intermediate image for each column alone using equations 1, and 2 to get the 1st level of 2D wavelet transform. • Example is given in the next three slides. • The inverse of the 2D Haar transform can be calculated by first inverting the columns, and then inverting the resulting rows using equation 3, and 4. 13 January 2020 UST, YEMEN 14 13 January 2020 UST, YEMEN 15 13 January 2020 UST, YEMEN 16 13 January 2020 UST, YEMEN 17 13 January 2020 UST, YEMEN 18