140 likes | 341 Views
JPEG. Standard approved in 1994 ISO 10918-1 . JPEG . Basis Vectors of DCT. RGB to Y Cb Cr. reduce the spatial resolution of the Cb and Cr components 4:4:4 (no downsampling ), 4:2:2 (reduce by factor of 2 in horizontal direction)
E N D
JPEG Standard approved in 1994 ISO 10918-1. JPEG
RGB to Y Cb Cr • reduce the spatial resolution of the Cb and Cr components • 4:4:4 (no downsampling), • 4:2:2 (reduce by factor of 2 in horizontal direction) • 4:2:0 (reduce by factor of 2 in horizontal and vertical directions)
8 × 8 Blocks • If the data for a channel does not represent an integer number of blocks then the encoder must fill the remaining area of the incomplete blocks with some form of dummy data. Filling the edge pixels with a fixed color creates ringing artifacts along the visible part of the border; repeating the edge pixels is a common technique that reduces the visible border, but it can still create artifacts.
DCT • for each block, each of the Y, Cb, and Cr data is converted to a frequency-domain representation, using a normalized, two-dimensional type-II discrete cosine transform (DCT). • The DCT temporarily increases the bit-depth of the image, since the DCT coefficients of an 8-bit/component image take up to 11 or more bits to store. The temporary increase in size at this stage is not a performance concern
Quantization • The amplitudes of the frequency components are quantized. Human vision is much more sensitive to small variations in color or brightness over large areas than to the strength of high-frequency brightness variations. This is done by dividing each component in the frequency domain by a constant for that component, and then rounding to the nearest integer.
Zigzag sequence • The zigzag sequence quantized coefficients are shown here. This encoding mode is called baseline sequential encoding. Baseline JPEG also supports progressive encoding. While sequential encoding encodes coefficients of a single block at a time (in a zigzag manner), progressive encoding encodes similar-positioned coefficients of all blocks in one go, followed by the next positioned coefficients of all blocks, and so on.
Huffman Coding • The resulting data for all 8×8 blocks is further compressed with a loss-less algorithm, a variant of Huffman encoding.
12 bit JPEG • There are also many medical imaging systems that create and process 12-bit JPEG images. The 12-bit JPEG format has been part of the JPEG specification for some time, but again, this format is not as widely supported.
Reordered SOI, SOF, DHT, DQT, COM , EOI 0xFFD8, 0xFFC0,