This chapter discusses the various JPEG image compression standards, including JPEG, JPEG2000, JPEG-LS, and JBIG. The JPEG standard, established by the Joint Photographic Experts Group in 1992, uses a lossy compression method involving Discrete Cosine Transform (DCT). Observations highlight how visual acuity varies with content type and how spatial redundancy can be effectively managed. The chapter outlines key steps in JPEG compression such as subsampling, DCT, quantization, and entropy coding, presenting methods for efficient image data representation.
01 / 67Overview of JPEG Image Compression Standards
1 / 17
Télécharger la présentation
Overview of JPEG Image Compression Standards
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation
Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement.Téléchargez la présentation en cliquant sur ce lien.Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.
outline • 9.1 The JPEG Standard • Appendix • 9.2 The JPEG2000 Standard • 9.3 The JPEG-LS Standard • 9.4 The JBIG Standard
9.1 The JPEG Standard • JPEG “Joint Photographic Experts Group". • Formally accepted as an international standard in 1992. • lossy image compression method. • Transform coding method using the DCT (Discrete CosineTransform). • For each 8x8 (Y,U,V) or (Y,I,Q) plane, • Transform f(i,j) F(u,v) • look choppy (“blocky") when a high compression ratio is specified by the user.
Observations for JPEG Image Compression • Observation 1: • Visual acuity is much greater for gray than for color. • Chroma sub-sampling (4:2:0) is used in JPEG. • Observation 2: • Useful contents change relatively slowly across the image. • It is unusual for intensity values to vary widely several times in a small area, • Observation 3: • Loss of high spatial frequency components is much less noticed then lower frequency components. • Spatial redundancy can be reduced by reducing the high spatial frequency contents.
Observation 2. Useful image contents change relatively slowly across the image. Observation 3. reducing the high spatial frequency contents Observation 1. sub-sampling (4:2:0)
Encoder 內部開兩座工廠 (1) DC encoder (2) AC encoder Encoder 每個 8x8 block 的 F^ DC先進 DC encoder output bit stream AC's 隨後進 AC encoder • output bit stream Decoder 讀取 bit stream 次序不亂 block by block 正確 分送到 DC/AC decoder 即可還原!! Block by block
DPCM on DC coefficients • The DC coefficients are coded • Separately from the AC ones. • Block by block (DC0,DC1,.. Goes to DC encoder) • Differential Pulse Code Modulation (DPCM) is the coding method. • Example: DC coeff. for the first 5 blocks • 150,155, 149, 152, 144 150, 5,-6, 3, -8 • Assuming d i= DC i +1– DC i and d 0=DC 0.
DPCM on DC Coefficients (cont.) • Step 1: DCi (Size, Amplitude) • Step 2: Encoding • size: • indicating size of VLI of amplitude, • VLC (huffman coding): input to encoder, application specific • amplitude • VLI (Variable Length Integer): hardwired into proposal
In the example we're using, • codes 150, 5, -6, 3, -8 will be turned into • (8, 10010110), (3, 101), (3, 001), (2, 11), (4, 0111) . • SIZE is Huffman coded • since smaller SIZEs occur much more often. • AMPLITUDE is not Human coded, • its value can change widely so Human coding has no appreciable benefit. (VLI)
Encoder 內部開兩座工廠 (1) DC encoder (2) AC encoder Encoder 每個 8x8 block 的 F^ DC先進 DC encoder output bit stream AC's 隨後進 AC encoder • output bit stream Decoder 讀取 bit stream 次序不亂 block by block 正確 分送到 DC/AC decoder 即可還原!! Block by block
Run-length Coding (RLC) on AC coefficients • Zig-Zag Scan turns 8x8 Matrix to 64-Vector • RLC turns the F (u, v) values into sets {#-zeros-to-skip , next non-zero value} ^
RLC on AC Coefficients • 1 x 64 vector has lots of zeros in it • RLE: Run Length Encoding • Processing Steps • Step 1: AC (RunLength, Size), (Amplitude) • Step 2 • (RunLength, Size): VLC (Huffman coding) • Amplitude: VLI
Entropy Coding • The DC and AC coefficients • finally undergo an entropy coding step to gain a possible further compression. • DC: (SIZE, AMPLITUDE) • each DPCM coded DC coefficient is represented • SIZE indicates how many bits are needed for representing the coefficient • AMPLITUDE contains the actual bits. • AC: ((Runlength, SIZE), AMPLITUDE) • (Runlength, Size) is the Symbol for VLC Coding. • Zig-Zag Ordering: Matrix-to-Vector • DC … DPCM (SIZE, AMP) • AC …使用 Runlength 不用DPCM ((Runlength, SIZE), AMP)
Example: AC: (0, 3) (4) Insert 0 zeros before using 3 bits to represent a 4 (Note: Shift 只對 DC有作用) (Note: AC 不使用 DPCM) DC: 61=(111101) needs 6 bits VLC(110)是碰巧
Observation 2. Useful image contents change relatively slowly across the image. Observation 3. reducing the high spatial frequency contents Block by block Observation 1. sub-sampling (4:2:0) DC encoder DC0, DC1, DC2… AC's AC's AC encoder
9.1.2 Four Commonly Used JPEG Modes • Lossless Mode -- discussed in Ch 7, and • Sect 9.3 JPEG-LS • Sequential Mode -- the default JPEG mode, implicitly assumed • Each gray level image or color image component is encoded in a single left-to-right, top-to-bottom scan. • Progressive Mode. • Hierarchical Mode. DC sequence 嵌在每個 8x8 Block串列, 第一次出現時,要記得以DPCM解碼。
Progressive Mode (I) • Progressive JPEG delivers low quality versions of the image quickly, followed by higher quality passes. • 1. Spectral selection: Takes advantage of the “spectral" (spatial frequency spectrum) characteristics of the DCT coefficients: --- -- higher AC components provide detail information. Note: (1) 表頭都先傳送過去 or 載入 (2) 利用DCT的線性,先還原部份基頻
Spectrum selection • Scan 1: • Encode DC and first few AC components, • e.g., AC1, AC2. • Scan 2: • Encode a few more AC components, • e.g., AC3, AC4, AC5. • ... • Scan k: • Encode the last few ACs, • e.g., AC61, AC62, AC63. 以RLC解出ACk, if k≧K, then切換下一個 8x8 block
Progressive Mode (II) • 2. Successive approximation: Instead of gradually encoding spectral bands, all DCT coefficients are encoded simultaneously but with their most significant bits (MSBs) first. Note: (1) 表頭都先傳送過去 or 載入 (2) 利用DCT的線性,先還原整數之部份高位元 (8+4+2+1)
Successive approximation • Scan 1: • Encode the first few MSBs, • e.g., Bits 7, 6, 5, 4. • Scan 2: • Encode a few more less significant bits, • e.g., Bit 3. • ... • Scan m: • Encode the least significant bit (LSB), Bit 0. 以2r為乘數優先編高位元組合, 這樣在使用Runlength 時,亦時常 可以壓縮大量 “0”的記錄而達到效果
Hierarchical Mode • The encoded image at the lowest resolution is basically a compressed low-pass filtered image, whereas the images at • successively higher resolutions provide additional details (differences from the lower resolution images). • Similar to Progressive JPEG, the Hierarchical JPEG images can be transmitted in multiple passes progressively improving quality.
Encoder for a Three-level Hierarchical JPEG • 1. Reduction of image resolution: • Reduce resolution of the input image • by a factor of 2 in each dimension • f (512 x 512) f 2 (e.g., 256 x256). • Repeat this f 4 (e.g., 128 x128). • 2. Compress low-resolution image f 4: • Encode f 4 using any other JPEG method (e.g., Sequential, Progressive) to obtain F 4.
3. Compress difference image d 2: (a) Decode F 4 to obtain f 4. • Use any interpolation method • to expand f 4 to E(f4) ≈ f2 • of the same resolution as f 2 (b) Encode difference d 2 = f 2– E (f 4) • using any other JPEG method • (e.g., Sequential, Progressive) to generate D2. (c) Repeat this to generate f2, d1, D1 ~ ~ ~ ~ ~