SlideShare a Scribd company logo
1 of 26
KALASALINGAM UNIVERSITY
Image Compression
Under the guidance of
B.Perumal Presented by
H.Murugan(9915107001)
ECE(DCN)
Image:
• An image is a two dimensional signal. It is
defined by the mathematical function f(x,y)
• where x and y are the two coordinates
horizontally and vertically.
Pixel:
• The value of f(x,y) at any point is gives the
pixel value at that point of an image.
Image Resolution:
• It refers to number of pixels in an image
Types of image
Binary image:
it contain only two pixel value o or 1
Gray scale image:
it has 256 different shades of colors in it, and
ranges from 0 to 255
RGB Image/color image:
for 8 bit format – it ranges from 0 to 255
For 16 bit format – it ranges from 0 to 65535
What is Compression
 Reduce the size of data.
 Compression is a way to reduce the number of bits in a
frame but retaining its meaning.
 Image compression can benefit users by having pictures
load faster and web pages use up less space on a Web
host.
 Image compression does not reduce the physical size of
an image but instead compresses the data that makes up
the image into a smaller size.
Need for compression
• To understand the need for compact image
representation, consider the amount of data
required to represent a 2 hour Standard
Definition (SD) using 720 x 480 x 24 bit pixel
arrays.
• A video is a sequence of video frames where each
frame is a full color still image.
• Because video player must display the frames
sequentially at rates near 30fps, SD video data
must be accessed at
• 30fps x (720x480)ppf x 3bpp = 31,104,000 bps
• Thus a 2 hour movie consists of
• 31,104,000 bps x (602) sph x 2 hrs ≈ 2.24 x 1011
bytes.
OR
224GB of data
• sph = second per hour
• Twenty seven 8.5GB dual layer DVDs are needed to
store it.
• To put a 2hr movie on a single DVD, each frame
must be compressed by a factor of around 26.3.
• The compression must be even higher for HD,
where image resolution reach 1920 x 1080 x 24
bits/image
• Web page images & High-resolution digital camera
photos also are also compressed to save storage
space & reduce transmission time.
• Residential Internet connection delivers data at
speeds ranging from 56kbps (conventional phone
line) to more than 12mbps (broadband).
• Time required to transmit a small 128 x 128 x 24 bit
full color image over this range of speed is from 7.0
to 0.03 sec.
• Compression can reduce the transmission time by a
factor of around 2 to 10 or more.
• Similarly, number of uncompressed full color images
that an 8 Megapixel digital camera can store on a
1GB Memory card can be increased.
formats
Compression Methods
Lossless Compression:
When a file that has been compressed can be
decoded back into its original form with zero loss of
information, the compression is said to be a Lossless
Compression
Lossy Compression:
If, after compression, the original file cannot be
brought back again then the compression is said to
be Lossy
Method 1:Run-length encoding
• Simplest method of compression.
• How: replace consecutive repeating occurrences of a symbol
by 1 occurrence of the symbol itself, then followed by the
number of occurrences.
• The method can be more efficient if the data uses only 2
symbols (0s and 1s) in bit patterns and 1 symbol is more
frequent than another.
Method 2:Huffman Coding
 Assign fewer bits to symbols that occur more frequently and
more bits to symbols appear less often.
 There’s no unique Huffman code and every Huffman code has
the same average code length.
 Algorithm:
① Make a leaf node for each code symbol
Add the generation probability of each symbol to the leaf node
② Take the two leaf nodes with the smallest probability and connect them into
a new node
Add 1 or 0 to each of the two branches
The probability of the new node is the sum of the probabilities of the
two connecting nodes
③ If there is only one node left, the code construction is completed. If not, go
back to (2)
Huffman Coding:
Original Source Source reduction
Symbol Probability Code 1 2 3 4
a2 0.4 1 0.4 1 0.4 1 0.4 1 0.6 0
a6 0.3 00 0.3 00 0.3 00 0.3 00 0.4 1
a1 0.1 011 0.1 011 0.2 010 0.3 01
a4 0.1 0100 0.1 0100 0.1 011
a3 0.06 01010 0.1 0101
a5 0.04 01011
How the encoding and decoding process
takes place?
• Encoding:
• Decoding:
Method 3:Lempel Ziv Encoding
• It is dictionary-based encoding
• Basic idea:
 Create a dictionary(a table) of strings used during
communication.
 If both sender and receiver have a copy of the
dictionary, then previously-encountered strings can be
substituted by their index in the dictionary.
Contd...,
This compression has 2 phases:
 Building an indexed dictionary
 Compressing a string of symbols
• Algorithm for lempel ziv encoding:
 Extract the smallest substring that cannot be found in the
remaining uncompressed string.
 Store that substring in the dictionary as a new entry and
assign it an index value
 Substring is replaced with the index found in the
dictionary
 Insert the index and the last character of the substring
into the compressed string
Lossy Compression
• Lossy compression is the converse of lossless data
compression.
• It is Used for compressing images and video files.
• Methods of lossy compression:
 JPEG: compress pictures and graphics
 MPEG:compress video
 MP3: compress audio
Method 1:JPEG Encoding
• Used to compress pictures and graphics.
• In JPEG, a grayscale picture is divided into 8x8 pixel
blocks to decrease the number of calculations.
• Basic idea:
 Change the picture into a linear (vector) sets of numbers that
reveals the redundancies.
 The redundancies is then removed by one of lossless.
JPEG Encoding- DCT
• DCT: Discrete Concise Transform
• DCT transforms the 64 values in 8x8 pixel block in a way that
the relative relationships between pixels are kept but the
redundancies are revealed.
• Example:
A gradient grayscale
Quantization & Compression
 Quantization:
 After T table is created, the values are quantized to
reduce the number of bits needed for encoding.
 Quantization divides the number of bits by a constant,
then drops the fraction. This is done to optimize the
number of bits and the number of 0s for each particular
application.
• Compression:
 Quantized values are read from the table and redundant
0s are removed.
 To cluster the 0s together, the table is read diagonally in
an zigzag fashion. The reason is if the table doesn’t have
fine changes, the bottom right corner of the table is all 0s.
 JPEG usually uses lossless run-length encoding at the
compression phase.
JPEG Encoding
Method 2:MPEG Encoding
• Used to compress video.
• Basic idea:
 Each video is a rapid sequence of a set of frames. Each
frame is a spatial combination of pixels, or a picture.
 Compressing video =
spatially compressing each frame
+
temporally compressing a set of frames.
Types of MPEG compression
• Spatial Compression
 Each frame is spatially compressed by JPEG.
• Temporal Compression
 Redundant frames are removed.
 For example, in a static scene in which someone is talking, most
frames are the same except for the segment around the speaker’s
lips, which changes from one frame to the next.
Advantages
• Used in remote sensing
• In space exploration
• Geological surveys for detecting mineral
resources
 In industries
Applications
• Medical field
• Internet
• Astronomy
• Defense
• Machine/robot vision
• Face recognition
• Biometrics
Thank you

More Related Content

What's hot

Predictive coding
Predictive codingPredictive coding
Predictive codingp_ayal
 
Spatial filtering using image processing
Spatial filtering using image processingSpatial filtering using image processing
Spatial filtering using image processingAnuj Arora
 
ImageProcessing10-Segmentation(Thresholding) (1).ppt
ImageProcessing10-Segmentation(Thresholding) (1).pptImageProcessing10-Segmentation(Thresholding) (1).ppt
ImageProcessing10-Segmentation(Thresholding) (1).pptVikramBarapatre2
 
Image processing fundamentals
Image processing fundamentalsImage processing fundamentals
Image processing fundamentalsA B Shinde
 
Lect 02 second portion
Lect 02  second portionLect 02  second portion
Lect 02 second portionMoe Moe Myint
 
Color fundamentals and color models - Digital Image Processing
Color fundamentals and color models - Digital Image ProcessingColor fundamentals and color models - Digital Image Processing
Color fundamentals and color models - Digital Image ProcessingAmna
 
Color image processing Presentation
Color image processing PresentationColor image processing Presentation
Color image processing PresentationRevanth Chimmani
 
Transform coding
Transform codingTransform coding
Transform codingNancy K
 
Image enhancement
Image enhancementImage enhancement
Image enhancementjuhi mishra
 
Wavelet based image compression technique
Wavelet based image compression techniqueWavelet based image compression technique
Wavelet based image compression techniquePriyanka Pachori
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniquessakshij91
 

What's hot (20)

Predictive coding
Predictive codingPredictive coding
Predictive coding
 
Jpeg standards
Jpeg   standardsJpeg   standards
Jpeg standards
 
IMAGE SEGMENTATION.
IMAGE SEGMENTATION.IMAGE SEGMENTATION.
IMAGE SEGMENTATION.
 
Spatial filtering using image processing
Spatial filtering using image processingSpatial filtering using image processing
Spatial filtering using image processing
 
ImageProcessing10-Segmentation(Thresholding) (1).ppt
ImageProcessing10-Segmentation(Thresholding) (1).pptImageProcessing10-Segmentation(Thresholding) (1).ppt
ImageProcessing10-Segmentation(Thresholding) (1).ppt
 
Psuedo color
Psuedo colorPsuedo color
Psuedo color
 
NOISE FILTERS IN IMAGE PROCESSING
NOISE FILTERS IN IMAGE PROCESSINGNOISE FILTERS IN IMAGE PROCESSING
NOISE FILTERS IN IMAGE PROCESSING
 
Image processing fundamentals
Image processing fundamentalsImage processing fundamentals
Image processing fundamentals
 
Lect 02 second portion
Lect 02  second portionLect 02  second portion
Lect 02 second portion
 
Color fundamentals and color models - Digital Image Processing
Color fundamentals and color models - Digital Image ProcessingColor fundamentals and color models - Digital Image Processing
Color fundamentals and color models - Digital Image Processing
 
Color image processing Presentation
Color image processing PresentationColor image processing Presentation
Color image processing Presentation
 
Image compression .
Image compression .Image compression .
Image compression .
 
JPEG Image Compression
JPEG Image CompressionJPEG Image Compression
JPEG Image Compression
 
Hit and-miss transform
Hit and-miss transformHit and-miss transform
Hit and-miss transform
 
image compression ppt
image compression pptimage compression ppt
image compression ppt
 
Transform coding
Transform codingTransform coding
Transform coding
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Wavelet based image compression technique
Wavelet based image compression techniqueWavelet based image compression technique
Wavelet based image compression technique
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
 
Digital image processing
Digital image processing  Digital image processing
Digital image processing
 

Similar to image basics and image compression

Fundamentals of Data compression
Fundamentals of Data compressionFundamentals of Data compression
Fundamentals of Data compressionM.k. Praveen
 
Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)Joel P
 
notes_Image Compression_edited.ppt
notes_Image Compression_edited.pptnotes_Image Compression_edited.ppt
notes_Image Compression_edited.pptHarisMasood20
 
Image_Compression_Slide_Set_1.pptx
Image_Compression_Slide_Set_1.pptxImage_Compression_Slide_Set_1.pptx
Image_Compression_Slide_Set_1.pptxssuserd546c51
 
06 cie552 image_manipulation
06 cie552 image_manipulation06 cie552 image_manipulation
06 cie552 image_manipulationElsayed Hemayed
 
2019188026 Data Compression (1) (1).pdf
2019188026 Data Compression  (1) (1).pdf2019188026 Data Compression  (1) (1).pdf
2019188026 Data Compression (1) (1).pdfAbinayaC11
 
Compression of digital voice and video
Compression of digital voice and videoCompression of digital voice and video
Compression of digital voice and videosangusajjan
 
chapter-8imagecompression-170804060146.pdf
chapter-8imagecompression-170804060146.pdfchapter-8imagecompression-170804060146.pdf
chapter-8imagecompression-170804060146.pdfssuser6d1fca
 
Data compression techniques
Data compression techniquesData compression techniques
Data compression techniquesDeep Bhatt
 
notes_Image Compression.ppt
notes_Image Compression.pptnotes_Image Compression.ppt
notes_Image Compression.pptHarisMasood20
 
notes_Image Compression.ppt
notes_Image Compression.pptnotes_Image Compression.ppt
notes_Image Compression.pptHarisMasood20
 

Similar to image basics and image compression (20)

Fundamentals of Data compression
Fundamentals of Data compressionFundamentals of Data compression
Fundamentals of Data compression
 
Data compression
Data compressionData compression
Data compression
 
Image compression
Image compressionImage compression
Image compression
 
Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)
 
Data Compression
Data CompressionData Compression
Data Compression
 
notes_Image Compression_edited.ppt
notes_Image Compression_edited.pptnotes_Image Compression_edited.ppt
notes_Image Compression_edited.ppt
 
Image_Compression_Slide_Set_1.pptx
Image_Compression_Slide_Set_1.pptxImage_Compression_Slide_Set_1.pptx
Image_Compression_Slide_Set_1.pptx
 
06 cie552 image_manipulation
06 cie552 image_manipulation06 cie552 image_manipulation
06 cie552 image_manipulation
 
WT in IP.ppt
WT in IP.pptWT in IP.ppt
WT in IP.ppt
 
Data compression
Data compressionData compression
Data compression
 
2019188026 Data Compression (1) (1).pdf
2019188026 Data Compression  (1) (1).pdf2019188026 Data Compression  (1) (1).pdf
2019188026 Data Compression (1) (1).pdf
 
Data compression
Data compressionData compression
Data compression
 
Source coding
Source codingSource coding
Source coding
 
Image compression and jpeg
Image compression and jpegImage compression and jpeg
Image compression and jpeg
 
Compression of digital voice and video
Compression of digital voice and videoCompression of digital voice and video
Compression of digital voice and video
 
chapter-8imagecompression-170804060146.pdf
chapter-8imagecompression-170804060146.pdfchapter-8imagecompression-170804060146.pdf
chapter-8imagecompression-170804060146.pdf
 
Data compression techniques
Data compression techniquesData compression techniques
Data compression techniques
 
Jpeg
JpegJpeg
Jpeg
 
notes_Image Compression.ppt
notes_Image Compression.pptnotes_Image Compression.ppt
notes_Image Compression.ppt
 
notes_Image Compression.ppt
notes_Image Compression.pptnotes_Image Compression.ppt
notes_Image Compression.ppt
 

Recently uploaded

OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 

Recently uploaded (20)

OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 

image basics and image compression

  • 1. KALASALINGAM UNIVERSITY Image Compression Under the guidance of B.Perumal Presented by H.Murugan(9915107001) ECE(DCN)
  • 2. Image: • An image is a two dimensional signal. It is defined by the mathematical function f(x,y) • where x and y are the two coordinates horizontally and vertically. Pixel: • The value of f(x,y) at any point is gives the pixel value at that point of an image. Image Resolution: • It refers to number of pixels in an image
  • 3. Types of image Binary image: it contain only two pixel value o or 1 Gray scale image: it has 256 different shades of colors in it, and ranges from 0 to 255 RGB Image/color image: for 8 bit format – it ranges from 0 to 255 For 16 bit format – it ranges from 0 to 65535
  • 4. What is Compression  Reduce the size of data.  Compression is a way to reduce the number of bits in a frame but retaining its meaning.  Image compression can benefit users by having pictures load faster and web pages use up less space on a Web host.  Image compression does not reduce the physical size of an image but instead compresses the data that makes up the image into a smaller size.
  • 5. Need for compression • To understand the need for compact image representation, consider the amount of data required to represent a 2 hour Standard Definition (SD) using 720 x 480 x 24 bit pixel arrays. • A video is a sequence of video frames where each frame is a full color still image. • Because video player must display the frames sequentially at rates near 30fps, SD video data must be accessed at • 30fps x (720x480)ppf x 3bpp = 31,104,000 bps
  • 6. • Thus a 2 hour movie consists of • 31,104,000 bps x (602) sph x 2 hrs ≈ 2.24 x 1011 bytes. OR 224GB of data • sph = second per hour • Twenty seven 8.5GB dual layer DVDs are needed to store it. • To put a 2hr movie on a single DVD, each frame must be compressed by a factor of around 26.3. • The compression must be even higher for HD, where image resolution reach 1920 x 1080 x 24 bits/image
  • 7. • Web page images & High-resolution digital camera photos also are also compressed to save storage space & reduce transmission time. • Residential Internet connection delivers data at speeds ranging from 56kbps (conventional phone line) to more than 12mbps (broadband). • Time required to transmit a small 128 x 128 x 24 bit full color image over this range of speed is from 7.0 to 0.03 sec. • Compression can reduce the transmission time by a factor of around 2 to 10 or more. • Similarly, number of uncompressed full color images that an 8 Megapixel digital camera can store on a 1GB Memory card can be increased.
  • 10. Lossless Compression: When a file that has been compressed can be decoded back into its original form with zero loss of information, the compression is said to be a Lossless Compression Lossy Compression: If, after compression, the original file cannot be brought back again then the compression is said to be Lossy
  • 11. Method 1:Run-length encoding • Simplest method of compression. • How: replace consecutive repeating occurrences of a symbol by 1 occurrence of the symbol itself, then followed by the number of occurrences. • The method can be more efficient if the data uses only 2 symbols (0s and 1s) in bit patterns and 1 symbol is more frequent than another.
  • 12. Method 2:Huffman Coding  Assign fewer bits to symbols that occur more frequently and more bits to symbols appear less often.  There’s no unique Huffman code and every Huffman code has the same average code length.  Algorithm: ① Make a leaf node for each code symbol Add the generation probability of each symbol to the leaf node ② Take the two leaf nodes with the smallest probability and connect them into a new node Add 1 or 0 to each of the two branches The probability of the new node is the sum of the probabilities of the two connecting nodes ③ If there is only one node left, the code construction is completed. If not, go back to (2)
  • 13. Huffman Coding: Original Source Source reduction Symbol Probability Code 1 2 3 4 a2 0.4 1 0.4 1 0.4 1 0.4 1 0.6 0 a6 0.3 00 0.3 00 0.3 00 0.3 00 0.4 1 a1 0.1 011 0.1 011 0.2 010 0.3 01 a4 0.1 0100 0.1 0100 0.1 011 a3 0.06 01010 0.1 0101 a5 0.04 01011
  • 14. How the encoding and decoding process takes place? • Encoding: • Decoding:
  • 15. Method 3:Lempel Ziv Encoding • It is dictionary-based encoding • Basic idea:  Create a dictionary(a table) of strings used during communication.  If both sender and receiver have a copy of the dictionary, then previously-encountered strings can be substituted by their index in the dictionary.
  • 16. Contd..., This compression has 2 phases:  Building an indexed dictionary  Compressing a string of symbols • Algorithm for lempel ziv encoding:  Extract the smallest substring that cannot be found in the remaining uncompressed string.  Store that substring in the dictionary as a new entry and assign it an index value  Substring is replaced with the index found in the dictionary  Insert the index and the last character of the substring into the compressed string
  • 17. Lossy Compression • Lossy compression is the converse of lossless data compression. • It is Used for compressing images and video files. • Methods of lossy compression:  JPEG: compress pictures and graphics  MPEG:compress video  MP3: compress audio
  • 18. Method 1:JPEG Encoding • Used to compress pictures and graphics. • In JPEG, a grayscale picture is divided into 8x8 pixel blocks to decrease the number of calculations. • Basic idea:  Change the picture into a linear (vector) sets of numbers that reveals the redundancies.  The redundancies is then removed by one of lossless.
  • 19. JPEG Encoding- DCT • DCT: Discrete Concise Transform • DCT transforms the 64 values in 8x8 pixel block in a way that the relative relationships between pixels are kept but the redundancies are revealed. • Example: A gradient grayscale
  • 20. Quantization & Compression  Quantization:  After T table is created, the values are quantized to reduce the number of bits needed for encoding.  Quantization divides the number of bits by a constant, then drops the fraction. This is done to optimize the number of bits and the number of 0s for each particular application. • Compression:  Quantized values are read from the table and redundant 0s are removed.  To cluster the 0s together, the table is read diagonally in an zigzag fashion. The reason is if the table doesn’t have fine changes, the bottom right corner of the table is all 0s.  JPEG usually uses lossless run-length encoding at the compression phase.
  • 22. Method 2:MPEG Encoding • Used to compress video. • Basic idea:  Each video is a rapid sequence of a set of frames. Each frame is a spatial combination of pixels, or a picture.  Compressing video = spatially compressing each frame + temporally compressing a set of frames.
  • 23. Types of MPEG compression • Spatial Compression  Each frame is spatially compressed by JPEG. • Temporal Compression  Redundant frames are removed.  For example, in a static scene in which someone is talking, most frames are the same except for the segment around the speaker’s lips, which changes from one frame to the next.
  • 24. Advantages • Used in remote sensing • In space exploration • Geological surveys for detecting mineral resources  In industries
  • 25. Applications • Medical field • Internet • Astronomy • Defense • Machine/robot vision • Face recognition • Biometrics