JPEG is a lossy compression method for color or grayscale images. It works best on continuous-tone images where adjacent pixels have similar colors. The JPEG standard defines several modes of operation and uses various techniques like color space transformation, discrete cosine transformation (DCT), quantization, differential pulse-code modulation, run length encoding, and Huffman coding to achieve high compression ratios while maintaining good image quality. Key aspects of the JPEG process include converting images to luminance and chrominance color space, applying DCT, quantizing coefficients, encoding DC values with DPCM, and entropy coding remaining coefficients.
2. WHAT IS JPEG
STANDARDS???
• JPEG is sophisticated lossless compression
method for color or grey-scale still images.
• It works best on continuous tone images where
adjacent pixels have similar colors.
• One advantage of JPEG is the use of many
parameters, allowing the use to adjust the
amount of data lost over a wide variety range.
4. Differential coding of DC coefficient: DPCM
using previous quantized DC coefficient as
predictor
Zig-zag scan of AC coefficients
5. Main Goals of JPEG:
• High Compression Ratio in such cases where images
quality is judged as very good to excellent.
• The use of many parameters allowing user to
experiment and achieve the desired level of
compression.
• Obtaining good results any kind of continuous tone
images.
• Sophisticated but not too complex compression
method, allowing software and hardware
implementation on many platform . Several modes of
operations.
6. Modes of JPEG:
• Sequential Mode: each image component is
compressed in a single left to right, top to bottom
scan.
• Progressive Mode: the images is compressed in
multiple blocks to be viewed from coarse to final
detail.
• Lossless Mode: important for cases where the user
decides no pixel should be lost.
• Hierarchical Mode: the image is compressed at
multiple resolution allowing lower resolution blocks
to be viewed without first having to decompressed the
following higher-resolution blocks.
7. Basic JPEG
Compression
• JPEG compression involves the following:
• Color Space Transform and sub sampling
(YIQ)
• DCT (Discrete Cosine Transformation)
• Quantization Zigzag Scan DPCM on DC
component
• RLE on AC Components Entropy Coding —
Huffman or Arithmetic
8. JPEG Encoding
• Colour Space Transform and sub-sampling (YIQ):
• The images values are transformed from RGB to
luminance/chrominance color space.
• The eye is sensitive to small changes in luminance but not in
chrominance. So chrominance values can be used to compress
the data.
• This step is optional but important since the remainder of the
algorithm works on each color component seperately.
• Without transforming the color space, none of the three color
components will tolerate the much loss leading to worse
compression.
9. DCT (Discrete Cosine
Transformation)
• The DCT is applied to each data unit to
create an 8x8 map of frequency
component.
• They represent the average pixel value
and successive higher frequency changes
within the group.
• This prepares the images data for the
crucial step of losing information.
10. Quantization Tables
• In JPEG, each F[u,v] is divided by a constant
q(u,v).Table of q(u,v) is called quantization
table.
• Eye is most sensitive to low frequencies (upper
left corner), less sensitive to high frequencies
(lower right corner)JPEG Standard defines 2
default quantization tables, one for luminance
(below), one for chrominance. E.g Table below
11. Quantization Table
• Zig-zag Scan What is the purpose of the
Zig-zag Scan:
• To group low frequency coefficients in top of
vector.• Maps 8 x 8 to a 1 x 64 vector
12. Quantization
• Each of the 64 frequency component in a data
unit is divided by a separate number called its
quantization coefficient (QC) and then
rounded to an integer.
• This is the step where the information is lost.
• Large QCs cause more loss.
• So high frequency components typically have
larger QCs.
13. Quantization Why do we need to
quantise: To throw out bits from
DCT.
• Example:
• 45 (6 bits).
• Truncate to 4 bits: 1011 = 11.Truncate to 3 bits:
101 = 5.
• Quantization error is the main source of Lossy
Compression.
• DCT itself is not lossy
• How we throw away bits in Quantization Step is
lossy
14. Quantization Methods Uniform
quantization
• Divide by constant N and round result (N
= 4 or 8 in examples on previous page).
• Non powers-of-two gives fine
control(e.g., N = 6 loses 2.5 bits)
15. Differential Pulse Code Modulation
(DPCM) on DC Component
• Another encoding method is employed•
• DPCM on the DC component at least.•
• Why is this strategy adopted : DC component
is large and varies, but often close to previous
value (like lossless JPEG)
• .Encode the difference from previous 8x8
blocks – DPCM
16. Run Length Encode (RLE) on AC
Components
• Yet another simple compression technique is
applied to the AC component:1x64 vector has
lots of zeros in it Encode as (skip, value) pairs,
where skip is the number of zeros and value is
the next non-zero component.• Send (0,0) as
end-of-block sentinel value.
17. Huffman (Entropy) Coding
• DC and AC components finally need to be
represented by a smaller number of bits
(Arithmetic coding also supported in place
of Huffman coding)
• Huffman coding: Each DPCM-coded DC
coefficient is represented by a pair of
symbols : (Size, Amplitude) where Size
indicates number of bits needed to
represent coefficient and Amplitude
contains actual bits.
18. UNIVERSITY QUESTIONS:
1.EXPLAIN JPEG STANDARDS?(4 MARKS)
2.WHAT IS JPEG? WHAT IS ITS
STANDARDS?
3. EXPLAIN THE DCT IMAGE
COMPRESSION SCHEME?(8 MARKS)