SlideShare a Scribd company logo
1 of 15
Introduction to JPEG
Alireza Shafaei (79136107)
Fall 2005
Bitmap Images
 RGB Color Model (Red, Green & Blue)
 3 bytes of Information for each Pixel:
 1 byte for Red, 1 byte for Green & 1 byte for Blue
 Memory space of a 640 × 480 24-bit RGB
color image:
 640 × 480 = 307,200 pixels
 307,200 × 3 = 921,600 bytes = 900 kilobytes
 Image Compression Methods (like JPEG)
What is JPEG?
 “Joint Photographic Expert Group”, A joint effort by
the CCITT and the ISO. (1991)
 An Image Compression Method for continuous-
tone still images, both grayscale and color.
 Facts on Human Visual System used in JPEG:
1. The eye seems to be more sensitive at the luminance of a
colour than at the nuance of that colour. (Y & CbCr)
2. The eye is much more sensitive to lower spatial
frequencies than to higher frequencies
JPEG Encoding Steps
 JPEG Baseline Sequential Mode:
1. Color Space Transformation & Sampling
2. DCT
3. Quantization
4. Zig-Zag Scan
5. DPCM & RLE
6. Entropy Coding
Color Space Transformation
 RGB to YCbCr
 Y is Luminance (Brightness).
 CbCr is the Chrominance.
 Sampling:
RGB
RGB
Y
Cb Cr
+ (Down Sampling)
RGB to YCbCr
 First the image is divided into 8x8 blocks.
RGB RGB
RGB RGB
Y Y
Y Y
Cb
Cr
+
8
8
8 8
8
8
8 8
8
8
8
4 x 64 x 3 byte 4 x 64 x 1 byte 2 x 64 x 1 byte
Y = 0.299 R + 0.587 G + 0.114 B
Cb = - 0.169 R - 0.331 G + 0.500 B
Cr = 0.500 R - 0.419 G - 0.081 B
Discrete Cosine Transform (DCT)
DCT
Coefficients
sxy DCT
8
8 8
8
DCT (cont’d)
 Why we apply DCT?
 To move from Spatial Domain to Frequency
Domain.
 Why not FFT?
 DCT is like FFT, but can approximate linear
signals well with few [real] coefficients.
 DCT is slow
 1024 multiplications and 896 additions.
 JPEG 2000: Wavelet Transforms.
Quantization
 DCT Coefficients are 12 bits per sample.
 Why Quantization?
 To reduce number of bits per sample.
 F'[u, v] = round ( F[u, v] / Q[u, v] )
 Two Quantization Tables are used in JPEG
Header File (QY & QCbCr).
 Quantization error is the main source of the
Lossy Compression.
Zig Zag Scan
 8x8 Blocks to a 1x64
Vector.
 Why Zig Zag Scan?
 To sort 8x8 DCT
coefficients based on the
spatial frequencies (low
frequency coefficients in
top of vector).
0 1 2 . . . 63
DC Component
(No Frequency)
Highest Frequency
1x64 Vector:
DPCM & RLE
1. DPCM on DC Component
 Differential Pulse Code Modulation.
 DC component is large and varied, but often
close to previous value.
2. RLE on AC Components
 Zero Run Length Encoding.
 1 x 64 vector has lots of zeros in it.
 57,45,0,0,0,0,23,0,-30,-16,0,0,1,0,0,0, 0 , 0 ,0 , only 0,..,0
RLC: (0,57); (0,45); (4,23); (1,-30); (0,-16); (2,1); EOB
EOB = (0,0)
Entropy Coding
 Entropy Coding is a form of compression that
relies on developing "code" words in a library
for the input values or "symbols".
 Huffman Coding in JPEG.
 4 Huffman Tables are stored in JPEG Header
File:
 2 tables for DC Component (Y & CbCr)
 2 tables for AC Components (Y & CbCr)
JPEG Encoding Diagram
JPEG Decoding
 Inverse of Encoding.
 Steps:
1. Decode Huffman Bit Stream
2. Decode DC Component (DPCM) and AC
Components (RLE)
3. Unpack Anti-ZigZag
4. Multiply by Quantization
5. Apply Inverse DCT
6. YCbCr to RGB
JPEG Decoding (cont’d)
 Inverse DCT:
 YCbCr to RGB:

More Related Content

Similar to introduction to jpeg for image proce.ppt

Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...
Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...
Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...VLSICS Design
 
PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...
PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...
PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...VLSICS Design
 
image processing for jpeg presentati.ppt
image processing for jpeg presentati.pptimage processing for jpeg presentati.ppt
image processing for jpeg presentati.pptnaghamallella
 
Video Compression Basics
Video Compression BasicsVideo Compression Basics
Video Compression BasicsSanjiv Malik
 
lossy compression JPEG
lossy compression JPEGlossy compression JPEG
lossy compression JPEGMahmoud Hikmet
 
SQUASHED JPEG IMAGE COMPRESSION VIA SPARSE MATRIX
SQUASHED JPEG IMAGE COMPRESSION VIA SPARSE MATRIXSQUASHED JPEG IMAGE COMPRESSION VIA SPARSE MATRIX
SQUASHED JPEG IMAGE COMPRESSION VIA SPARSE MATRIXijcsit
 
Compression presentation 415 (1)
Compression presentation 415 (1)Compression presentation 415 (1)
Compression presentation 415 (1)Godo Dodo
 
Rate Distortion Performance for Joint Source Channel Coding of JPEG image Ove...
Rate Distortion Performance for Joint Source Channel Coding of JPEG image Ove...Rate Distortion Performance for Joint Source Channel Coding of JPEG image Ove...
Rate Distortion Performance for Joint Source Channel Coding of JPEG image Ove...CSCJournals
 
Compression: Images (JPEG)
Compression: Images (JPEG)Compression: Images (JPEG)
Compression: Images (JPEG)danishrafiq
 
Multimedia image compression standards
Multimedia image compression standardsMultimedia image compression standards
Multimedia image compression standardsMazin Alwaaly
 
Jpeg image compression using discrete cosine transform a survey
Jpeg image compression using discrete cosine transform   a surveyJpeg image compression using discrete cosine transform   a survey
Jpeg image compression using discrete cosine transform a surveyIJCSES Journal
 

Similar to introduction to jpeg for image proce.ppt (20)

Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...
Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...
Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...
 
PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...
PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...
PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...
 
image processing for jpeg presentati.ppt
image processing for jpeg presentati.pptimage processing for jpeg presentati.ppt
image processing for jpeg presentati.ppt
 
Video Compression Basics
Video Compression BasicsVideo Compression Basics
Video Compression Basics
 
lossy compression JPEG
lossy compression JPEGlossy compression JPEG
lossy compression JPEG
 
Jpeg and mpeg ppt
Jpeg and mpeg pptJpeg and mpeg ppt
Jpeg and mpeg ppt
 
Squashed JPEG Image Compression via Sparse Matrix
Squashed JPEG Image Compression via Sparse MatrixSquashed JPEG Image Compression via Sparse Matrix
Squashed JPEG Image Compression via Sparse Matrix
 
SQUASHED JPEG IMAGE COMPRESSION VIA SPARSE MATRIX
SQUASHED JPEG IMAGE COMPRESSION VIA SPARSE MATRIXSQUASHED JPEG IMAGE COMPRESSION VIA SPARSE MATRIX
SQUASHED JPEG IMAGE COMPRESSION VIA SPARSE MATRIX
 
Squashed JPEG Image Compression via Sparse Matrix
Squashed JPEG Image Compression via Sparse MatrixSquashed JPEG Image Compression via Sparse Matrix
Squashed JPEG Image Compression via Sparse Matrix
 
Compression presentation 415 (1)
Compression presentation 415 (1)Compression presentation 415 (1)
Compression presentation 415 (1)
 
Source coding
Source codingSource coding
Source coding
 
Rate Distortion Performance for Joint Source Channel Coding of JPEG image Ove...
Rate Distortion Performance for Joint Source Channel Coding of JPEG image Ove...Rate Distortion Performance for Joint Source Channel Coding of JPEG image Ove...
Rate Distortion Performance for Joint Source Channel Coding of JPEG image Ove...
 
Data compression
Data compressionData compression
Data compression
 
Jpeg standards
Jpeg   standardsJpeg   standards
Jpeg standards
 
JPEG
JPEGJPEG
JPEG
 
Compression: Images (JPEG)
Compression: Images (JPEG)Compression: Images (JPEG)
Compression: Images (JPEG)
 
Jpeg compression
Jpeg compressionJpeg compression
Jpeg compression
 
Multimedia image compression standards
Multimedia image compression standardsMultimedia image compression standards
Multimedia image compression standards
 
Image compression Algorithms
Image compression AlgorithmsImage compression Algorithms
Image compression Algorithms
 
Jpeg image compression using discrete cosine transform a survey
Jpeg image compression using discrete cosine transform   a surveyJpeg image compression using discrete cosine transform   a survey
Jpeg image compression using discrete cosine transform a survey
 

More from naghamallella

OS-20210426203801 introduction to os.ppt
OS-20210426203801 introduction to os.pptOS-20210426203801 introduction to os.ppt
OS-20210426203801 introduction to os.pptnaghamallella
 
basic logic gate presentation date23.ppt
basic logic gate presentation date23.pptbasic logic gate presentation date23.ppt
basic logic gate presentation date23.pptnaghamallella
 
logic gate presentation for and or n.ppt
logic gate presentation for and or n.pptlogic gate presentation for and or n.ppt
logic gate presentation for and or n.pptnaghamallella
 
6_2019_04_09!08_59_48_PM logic gate_.ppt
6_2019_04_09!08_59_48_PM logic gate_.ppt6_2019_04_09!08_59_48_PM logic gate_.ppt
6_2019_04_09!08_59_48_PM logic gate_.pptnaghamallella
 
bin packing 2 for real time scheduli.ppt
bin packing 2 for real time scheduli.pptbin packing 2 for real time scheduli.ppt
bin packing 2 for real time scheduli.pptnaghamallella
 
bin packing2 and scheduling for mul.pptx
bin packing2 and scheduling for mul.pptxbin packing2 and scheduling for mul.pptx
bin packing2 and scheduling for mul.pptxnaghamallella
 
BOOTP computer science for multiproc.ppt
BOOTP computer science for multiproc.pptBOOTP computer science for multiproc.ppt
BOOTP computer science for multiproc.pptnaghamallella
 
trusted computing platform alliancee.ppt
trusted computing platform alliancee.ppttrusted computing platform alliancee.ppt
trusted computing platform alliancee.pptnaghamallella
 
trusted computing for security confe.ppt
trusted computing for security confe.ppttrusted computing for security confe.ppt
trusted computing for security confe.pptnaghamallella
 
bin packing and scheduling multiproc.ppt
bin packing and scheduling multiproc.pptbin packing and scheduling multiproc.ppt
bin packing and scheduling multiproc.pptnaghamallella
 
multiprocessor _system _presentation.ppt
multiprocessor _system _presentation.pptmultiprocessor _system _presentation.ppt
multiprocessor _system _presentation.pptnaghamallella
 
jpg image processing nagham salim_as.ppt
jpg image processing nagham salim_as.pptjpg image processing nagham salim_as.ppt
jpg image processing nagham salim_as.pptnaghamallella
 
lips _reading_nagham _salim compute.pptx
lips _reading_nagham _salim compute.pptxlips _reading_nagham _salim compute.pptx
lips _reading_nagham _salim compute.pptxnaghamallella
 
electronic mail security for authent.ppt
electronic mail security for authent.pptelectronic mail security for authent.ppt
electronic mail security for authent.pptnaghamallella
 
web _security_ for _confedindality s.ppt
web _security_ for _confedindality s.pptweb _security_ for _confedindality s.ppt
web _security_ for _confedindality s.pptnaghamallella
 
lips _reading _in computer_ vision_n.ppt
lips _reading _in computer_ vision_n.pptlips _reading _in computer_ vision_n.ppt
lips _reading _in computer_ vision_n.pptnaghamallella
 
thread_ multiprocessor_ scheduling_a.ppt
thread_ multiprocessor_ scheduling_a.pptthread_ multiprocessor_ scheduling_a.ppt
thread_ multiprocessor_ scheduling_a.pptnaghamallella
 
distributed real time system schedul.ppt
distributed real time system schedul.pptdistributed real time system schedul.ppt
distributed real time system schedul.pptnaghamallella
 
Trusted Computing security _platform.ppt
Trusted Computing security _platform.pptTrusted Computing security _platform.ppt
Trusted Computing security _platform.pptnaghamallella
 
Trusted Computing _plate form_ model.ppt
Trusted Computing _plate form_ model.pptTrusted Computing _plate form_ model.ppt
Trusted Computing _plate form_ model.pptnaghamallella
 

More from naghamallella (20)

OS-20210426203801 introduction to os.ppt
OS-20210426203801 introduction to os.pptOS-20210426203801 introduction to os.ppt
OS-20210426203801 introduction to os.ppt
 
basic logic gate presentation date23.ppt
basic logic gate presentation date23.pptbasic logic gate presentation date23.ppt
basic logic gate presentation date23.ppt
 
logic gate presentation for and or n.ppt
logic gate presentation for and or n.pptlogic gate presentation for and or n.ppt
logic gate presentation for and or n.ppt
 
6_2019_04_09!08_59_48_PM logic gate_.ppt
6_2019_04_09!08_59_48_PM logic gate_.ppt6_2019_04_09!08_59_48_PM logic gate_.ppt
6_2019_04_09!08_59_48_PM logic gate_.ppt
 
bin packing 2 for real time scheduli.ppt
bin packing 2 for real time scheduli.pptbin packing 2 for real time scheduli.ppt
bin packing 2 for real time scheduli.ppt
 
bin packing2 and scheduling for mul.pptx
bin packing2 and scheduling for mul.pptxbin packing2 and scheduling for mul.pptx
bin packing2 and scheduling for mul.pptx
 
BOOTP computer science for multiproc.ppt
BOOTP computer science for multiproc.pptBOOTP computer science for multiproc.ppt
BOOTP computer science for multiproc.ppt
 
trusted computing platform alliancee.ppt
trusted computing platform alliancee.ppttrusted computing platform alliancee.ppt
trusted computing platform alliancee.ppt
 
trusted computing for security confe.ppt
trusted computing for security confe.ppttrusted computing for security confe.ppt
trusted computing for security confe.ppt
 
bin packing and scheduling multiproc.ppt
bin packing and scheduling multiproc.pptbin packing and scheduling multiproc.ppt
bin packing and scheduling multiproc.ppt
 
multiprocessor _system _presentation.ppt
multiprocessor _system _presentation.pptmultiprocessor _system _presentation.ppt
multiprocessor _system _presentation.ppt
 
jpg image processing nagham salim_as.ppt
jpg image processing nagham salim_as.pptjpg image processing nagham salim_as.ppt
jpg image processing nagham salim_as.ppt
 
lips _reading_nagham _salim compute.pptx
lips _reading_nagham _salim compute.pptxlips _reading_nagham _salim compute.pptx
lips _reading_nagham _salim compute.pptx
 
electronic mail security for authent.ppt
electronic mail security for authent.pptelectronic mail security for authent.ppt
electronic mail security for authent.ppt
 
web _security_ for _confedindality s.ppt
web _security_ for _confedindality s.pptweb _security_ for _confedindality s.ppt
web _security_ for _confedindality s.ppt
 
lips _reading _in computer_ vision_n.ppt
lips _reading _in computer_ vision_n.pptlips _reading _in computer_ vision_n.ppt
lips _reading _in computer_ vision_n.ppt
 
thread_ multiprocessor_ scheduling_a.ppt
thread_ multiprocessor_ scheduling_a.pptthread_ multiprocessor_ scheduling_a.ppt
thread_ multiprocessor_ scheduling_a.ppt
 
distributed real time system schedul.ppt
distributed real time system schedul.pptdistributed real time system schedul.ppt
distributed real time system schedul.ppt
 
Trusted Computing security _platform.ppt
Trusted Computing security _platform.pptTrusted Computing security _platform.ppt
Trusted Computing security _platform.ppt
 
Trusted Computing _plate form_ model.ppt
Trusted Computing _plate form_ model.pptTrusted Computing _plate form_ model.ppt
Trusted Computing _plate form_ model.ppt
 

Recently uploaded

Analytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdfAnalytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdfSwapnil Therkar
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )aarthirajkumar25
 
Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Nistarini College, Purulia (W.B) India
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...Sérgio Sacani
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​kaibalyasahoo82800
 
GFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxGFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxAleenaTreesaSaji
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxUmerFayaz5
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real timeSatoshi NAKAHIRA
 
G9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.pptG9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.pptMAESTRELLAMesa2
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PPRINCE C P
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Patrick Diehl
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTSérgio Sacani
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfSELF-EXPLANATORY
 
zoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistanzoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistanzohaibmir069
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Sérgio Sacani
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxAArockiyaNisha
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...RohitNehra6
 
Scheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxScheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxyaramohamed343013
 

Recently uploaded (20)

Analytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdfAnalytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdf
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )
 
Engler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomyEngler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomy
 
Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​
 
GFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxGFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptx
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptx
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real time
 
G9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.pptG9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.ppt
 
Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C P
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOST
 
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdfBehavioral Disorder: Schizophrenia & it's Case Study.pdf
Behavioral Disorder: Schizophrenia & it's Case Study.pdf
 
zoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistanzoogeography of pakistan.pptx fauna of Pakistan
zoogeography of pakistan.pptx fauna of Pakistan
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...
 
Scheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxScheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docx
 
The Philosophy of Science
The Philosophy of ScienceThe Philosophy of Science
The Philosophy of Science
 

introduction to jpeg for image proce.ppt

  • 1. Introduction to JPEG Alireza Shafaei (79136107) Fall 2005
  • 2. Bitmap Images  RGB Color Model (Red, Green & Blue)  3 bytes of Information for each Pixel:  1 byte for Red, 1 byte for Green & 1 byte for Blue  Memory space of a 640 × 480 24-bit RGB color image:  640 × 480 = 307,200 pixels  307,200 × 3 = 921,600 bytes = 900 kilobytes  Image Compression Methods (like JPEG)
  • 3. What is JPEG?  “Joint Photographic Expert Group”, A joint effort by the CCITT and the ISO. (1991)  An Image Compression Method for continuous- tone still images, both grayscale and color.  Facts on Human Visual System used in JPEG: 1. The eye seems to be more sensitive at the luminance of a colour than at the nuance of that colour. (Y & CbCr) 2. The eye is much more sensitive to lower spatial frequencies than to higher frequencies
  • 4. JPEG Encoding Steps  JPEG Baseline Sequential Mode: 1. Color Space Transformation & Sampling 2. DCT 3. Quantization 4. Zig-Zag Scan 5. DPCM & RLE 6. Entropy Coding
  • 5. Color Space Transformation  RGB to YCbCr  Y is Luminance (Brightness).  CbCr is the Chrominance.  Sampling: RGB RGB Y Cb Cr + (Down Sampling)
  • 6. RGB to YCbCr  First the image is divided into 8x8 blocks. RGB RGB RGB RGB Y Y Y Y Cb Cr + 8 8 8 8 8 8 8 8 8 8 8 4 x 64 x 3 byte 4 x 64 x 1 byte 2 x 64 x 1 byte Y = 0.299 R + 0.587 G + 0.114 B Cb = - 0.169 R - 0.331 G + 0.500 B Cr = 0.500 R - 0.419 G - 0.081 B
  • 7. Discrete Cosine Transform (DCT) DCT Coefficients sxy DCT 8 8 8 8
  • 8. DCT (cont’d)  Why we apply DCT?  To move from Spatial Domain to Frequency Domain.  Why not FFT?  DCT is like FFT, but can approximate linear signals well with few [real] coefficients.  DCT is slow  1024 multiplications and 896 additions.  JPEG 2000: Wavelet Transforms.
  • 9. Quantization  DCT Coefficients are 12 bits per sample.  Why Quantization?  To reduce number of bits per sample.  F'[u, v] = round ( F[u, v] / Q[u, v] )  Two Quantization Tables are used in JPEG Header File (QY & QCbCr).  Quantization error is the main source of the Lossy Compression.
  • 10. Zig Zag Scan  8x8 Blocks to a 1x64 Vector.  Why Zig Zag Scan?  To sort 8x8 DCT coefficients based on the spatial frequencies (low frequency coefficients in top of vector). 0 1 2 . . . 63 DC Component (No Frequency) Highest Frequency 1x64 Vector:
  • 11. DPCM & RLE 1. DPCM on DC Component  Differential Pulse Code Modulation.  DC component is large and varied, but often close to previous value. 2. RLE on AC Components  Zero Run Length Encoding.  1 x 64 vector has lots of zeros in it.  57,45,0,0,0,0,23,0,-30,-16,0,0,1,0,0,0, 0 , 0 ,0 , only 0,..,0 RLC: (0,57); (0,45); (4,23); (1,-30); (0,-16); (2,1); EOB EOB = (0,0)
  • 12. Entropy Coding  Entropy Coding is a form of compression that relies on developing "code" words in a library for the input values or "symbols".  Huffman Coding in JPEG.  4 Huffman Tables are stored in JPEG Header File:  2 tables for DC Component (Y & CbCr)  2 tables for AC Components (Y & CbCr)
  • 14. JPEG Decoding  Inverse of Encoding.  Steps: 1. Decode Huffman Bit Stream 2. Decode DC Component (DPCM) and AC Components (RLE) 3. Unpack Anti-ZigZag 4. Multiply by Quantization 5. Apply Inverse DCT 6. YCbCr to RGB
  • 15. JPEG Decoding (cont’d)  Inverse DCT:  YCbCr to RGB: