Multimedia Architecture and JPEG Compression Methods
Global Structure of Multimedia Systems
The Global Structure of Multimedia represents the overall organization of multimedia systems into different domains that work together to capture, process, store, transmit, and present multimedia information.
It provides a framework for understanding how multimedia components interact within a multimedia environment.
Main Domains of Multimedia Structure
- Device Domain
- System Domain
- Application Domain
JPEG Compression Process Steps and Examples
- Step 1: The input image is divided into small blocks having 8×8 dimensions. The dimensions sum up to 64 units. Each unit of the image is called a pixel.
- Step 2: JPEG uses the YCbCr model instead of the RGB model. In the second step, RGB is converted into YCbCr (Luminance and Chrominance).
- Step 3: After the conversion of colors, the data is forwarded to the Discrete Cosine Transform (DCT). DCT uses a cosine function and does not use complex numbers. It converts information in a block of pixels from the spatial domain to the frequency domain.
- Step 4: Humans are unable to see certain aspects of the image because they have high frequencies. The matrix after DCT conversion can only preserve values at the lowest frequency to a certain point. Quantization is used to reduce the number of bits per sample.
- Step 5: A zigzag scan is used to map the 8×8 matrix to a 1×64 vector. Zigzag scanning groups low-frequency coefficients at the top level of the vector and high-frequency coefficients at the bottom. This is used to handle the large number of zeros in the quantized matrix.
- Step 6: The next step is vectoring, where Differential Pulse Code Modulation (DPCM) is applied to the DC component. DC components are large and vary, but they are usually close to the previous block. DPCM encodes the difference between the current block and the previous block.
- Step 7: In this step, Run-Length Encoding (RLE) is applied to AC components. This is done because AC components contain many zeros. It encodes in pairs of (skip, value), where skip is the number of zeros and value is the actual coded value of the non-zero component.
- Step 8: In the final step, the DC components are coded using Huffman coding.
Huffman Coding: Principles and Implementation
Huffman Coding is a lossless data compression algorithm used for reducing the size of data by assigning variable-length binary codes to characters based on their frequencies. It uses a greedy algorithm and builds a binary tree known as the Huffman Tree.
Huffman Coding Process
The input is an array of unique characters along with their frequency of occurrences, and the output is the Huffman Tree.
- Step 1: Create a leaf node for each unique character and build a min heap of all leaf nodes. (A min heap is used as a priority queue. The frequency field value is used to compare two nodes; initially, the least frequent character is at the root.)
- Step 2: Extract two nodes with the minimum frequency from the min heap.
- Step 3: Create a new internal node with a frequency equal to the sum of the two nodes' frequencies. Make the first extracted node its left child and the other extracted node its right child. Add this node back to the min heap.
- Step 4: Repeat steps 2 and 3 until the heap contains only one node. The remaining node is the root node, and the tree is complete.
English with a size of 1.46 MB