SlideShare a Scribd company logo
IMAGE PROCESSING AND
    COMPRESSION
     TECHNIQUES




             By T. Spandana
                094D1A0426
                         E.C.E
             SSIET,Vadiyampeta.
                                  1
Objective
 The objective of image processing is to sharpen, minimize the


effect of degradation, reduce the amount of memory to store the image

information (image compression).




                                                                        2
Introduction
Image processing pertains to the alteration and analysis

of pictorial information.

     Common case of image processing is the adjustment

of brightness and contrast controls on a television set by

doing this we enhance the image until its subjective

appearing to us is most appealing.
                                                             3
Terminology
What is the Digital Image Processing?

 Digital:
        Operating by the use of discrete signals to represent data in the
  form of numbers.
 Image:
        An image (from Latin imago) or picture is an artefact, usually
  two-dimensional.
 Processing:
        To perform operations on data according to programmed
  instructions.

                                                                            4
Definition
 Thus the definition of the digital image processing may be given
 as:


 “Digital image processing is the use of
 computer algorithms to perform image
 processing on digital images ”


                                                                    5
Digital image:
 An image may be defined as a two-
  dimensional function, f(x, y).

 A digital image is composed of a finite
  number of elements.

 These elements are referred to as picture
  elements, image elements, pels, and pixels.



                                                6
Digital image processing sequence




                                    7
Key Stages in Digital Image Processing
                   Image        Morphological
                 Restoration     Processing



    Image
                                                Segmentation
 Enhancement


    Image                                          Object
  Acquisition                                    Recognition


                                                Representation
Problem Domain
                                                & Description
                 Colour Image     Image
                  Processing    Compression
                                                                 8
Key Stages in Digital Image Processing:
Image acquisition
                   Image        Morphological
                 Restoration     Processing



    Image
                                                Segmentation
 Enhancement


    Image                                          Object
  Acquisition                                    Recognition


                                                Representation
Problem Domain
                                                & Description
                 Colour Image     Image
                  Processing    Compression
                                                                 9
Key Stages in Digital Image Processing:
Image Enhancement
                   Image        Morphological
                 Restoration     Processing



    Image
                                                Segmentation
 Enhancement


    Image                                          Object
  Acquisition                                    Recognition


                                                Representation
Problem Domain
                                                & Description
                 Colour Image     Image
                  Processing    Compression
                                                                 10
Key Stages in Digital Image Processing:
Image Restoration
                   Image        Morphological
                 Restoration     Processing



    Image
                                                Segmentation
 Enhancement


    Image                                          Object
  Acquisition                                    Recognition


                                                Representation
Problem Domain
                                                & Description
                 Colour Image     Image
                  Processing    Compression
                                                                 11
Key Stages in Digital Image Processing:
Morphological Processing
                   Image        Morphological
                 Restoration     Processing



    Image
                                                Segmentation
 Enhancement


    Image                                          Object
  Acquisition                                    Recognition


                                                Representation
Problem Domain
                                                & Description
                 Colour Image     Image
                  Processing    Compression
                                                                 12
Key Stages in Digital Image Processing:
Segmentation
                   Image        Morphological
                 Restoration     Processing



    Image
                                                Segmentation
 Enhancement


    Image                                          Object
  Acquisition                                    Recognition


                                                Representation
Problem Domain
                                                & Description
                 Colour Image     Image
                  Processing    Compression
                                                                 13
Key Stages in Digital Image Processing:
Object Recognition
                   Image        Morphological
                 Restoration     Processing



    Image
                                                Segmentation
 Enhancement


    Image                                          Object
  Acquisition                                    Recognition


                                                Representation
Problem Domain
                                                & Description
                 Colour Image     Image
                  Processing    Compression
                                                                 14
Key Stages in Digital Image Processing:
Representation & Description
                   Image        Morphological
                 Restoration     Processing



    Image
                                                Segmentation
 Enhancement


    Image                                          Object
  Acquisition                                    Recognition


                                                Representation
Problem Domain
                                                & Description
                 Colour Image     Image
                  Processing    Compression
                                                                 15
Key Stages in Digital Image Processing:
Image Compression
                   Image        Morphological
                 Restoration     Processing



    Image
                                                Segmentation
 Enhancement


    Image                                          Object
  Acquisition                                    Recognition


                                                Representation
Problem Domain
                                                & Description
                 Colour Image     Image
                  Processing    Compression
                                                                 16
Key Stages in Digital Image Processing:
Colour Image Processing
                   Image        Morphological
                 Restoration     Processing



    Image
                                                Segmentation
 Enhancement


    Image                                          Object
  Acquisition                                    Recognition


                                                Representation
Problem Domain
                                                & Description
                 Colour Image     Image
                  Processing    Compression
                                                                 17
Image Compression
 Image compression addresses the problem of reducing the

  amount of data required to represent a digital image.

 It is the sub areas of image processing.

 The underlying basis of the reduction process is the removal of

  the redundant data.



                                                                    18
Goal of Image Compression
 Digital images require huge amounts of space for storage and large
  bandwidths for transmission.

 The goal of image compression is to reduce the amount of data
  required to represent a digital image.




                                                                       19
The Flow of Image Compression

   To store the image into bit-stream as compact as possible
      and to display the decoded image in the monitor as exact
      as possible
 Original Image                                               Decoded Image
                                    Bitstream

                    Encoder       0101100111...     Decoder



                          Figure: Flow of compression


                                                                              20
Different Compression Techniques

 Mainly two types of data Compression techniques are

  there.

    Loss less Compression.

    Lossy Compression.




                                                        21
Figure : Data compression methods

                                    22
23
Lossless Compression




                       24
25
Run-length:
•Simplest method of compression.
• It can be used to compress data made of any combination of symbols.
•It does not need to know the frequency of occurrence of symbols and
can be very efficient if data is represented as 0s and 1s.
•The general idea behind this method is to replace consecutive
repeating occurrences of a symbol by one occurrence of the symbol
followed by the number of occurrences.


                                                                        26
For instance,




           Figure : Run-length encoding example



                                                  27
28
Huffman coding
Huffman coding assigns shorter codes to symbols that occur more
frequently and longer codes to those that occur less frequently.




                                                                   29
Figure Huffman coding
                        30
A character’s code is found by starting at the root and following the
branches that lead to that character. The code itself is the bit value of each
branch on the path, taken in sequence.




                        Figure Final tree and code

                                                                           31
Encoding
Let us see how to encode text using the code for our five

characters. Figure shows the original and the encoded text.




                   Figure Huffman encoding
                                                              32
Decoding
The recipient has a very easy job in decoding the data it receives.
Figure shows how decoding takes place.




                   Figure : Huffman decoding
                                                                      33
34
Lempel Ziv encoding
Lempel Ziv (LZ) encoding is an example of a category of algorithms

called dictionary-based encoding.

The idea is to create a dictionary (a table) of strings used during the

communication session.




                                                                      35
The LZW Algorithm (Compression)
Flow Chart                  START


                           W= NULL

                                         YES
                           IS EOF              STOP
                              ?    N
                                   O
                        K=NEXT INPUT

               YES
                           IS WK
        W=WK
                          FOUND?
                              N
                              O
                     OUTPUT INDEX OF W

                ADD WK TO DICTIONARY

                           W=K

                                                      36
The LZW Algorithm (Compression)
Example
 Input string is
                             a b d c a d a c
 The Initial Dictionary
  contains symbols like
  a, b, c, d with their
  index values as 1, 2, 3,
  4 respectively.
                                   a   1
 Now the input string             b   2
  is read from left to             c   3
  right. Starting from a.
                                   d   4
                                               37
The LZW Algorithm (Compression)
Example
 W = Null           a b d c a d a   c
 K=a
 WK = a
                     K
In the dictionary.


                         a 1
                         b 2
                         c 3
                         d 4

                                         38
The LZW Algorithm (Compression)
Example
 K = b.                    a b d c a d a c
 WK = ab
is not in the dictionary.
                                K
 Add WK to
   dictionary               1
 Output code for a.
                            a 1     ab   5
 Set W = b
                            b 2
                            c 3
                            d 4

                                              39
The LZW Algorithm (Compression)
Example
 K=d                    a b d c a d a c
 WK = bd
Not in the dictionary.
                               K
Add bd to dictionary.
 Output code b          1 2
 Set W = d
                         a 1 ab    5
                         b 2 bd    6
                         c 3
                         d 4

                                           40
The LZW Algorithm (Compression)
Example
 K=a                     a b d a b d a c
 WK = da
not in the dictionary.                K
 Add it to dictionary.
 Output code d
                          1   2   4
 Set W = a
                          a 1 ab          5
                          b 2 bd          6
                          c 3 da          7
                          d 4

                                              41
The LZW Algorithm (Compression)
Example
 K=b                      a b d a b d a c
 WK = ab
It is in the dictionary.                   K

                           1   2   4

                           a 1 ab      5
                           b 2 bd      6
                           c 3 da      7
                           d 4

                                               42
The LZW Algorithm (Compression)
Example
 K=d                    a b d a b d a c
 WK = abd
Not in the dictionary.                   K
 Add W to the
  dictionary.            1   2   4   5
 Output code for W.
                         a 1 ab 5
 Set W = d
                         b 2 bd 6
                         c 3 da 7
                         d 4 abd 8

                                             43
The LZW Algorithm (Compression)
Example
• K=a                a b d a b d a c
• WK = da
In the dictionary.                   K

                     1   2   4   5

                     a 1 ab 5
                     b 2 bd 6
                     c 3 da 7
                     d 4 abd 8

                                         44
The LZW Algorithm (Compression) Example

• K=c                    a b d a b d a c
• WK = dac
Not in the dictionary.                             K
• Add WK to the
  dictionary.            1   2   4   5   7
• Output code for W.
                         a 1 ab 5        dac   9
• Set W = c
                         b 2 bd 6
• No input left so
  output code for W.     c 3 da 7
                         d 4 abd 8

                                                       45
The LZW Algorithm (Compression)
Example
• The final output   a b d a b d a c
  string is
    124573
                                                     K
• Stop.
                     1       2   4 5       7 3
                         a   1   ab    5   dac   9
                         b   2   bd    6
                         c   3   da    7
                         d   4   abd   8


                                                         46
LZW Decompression Algorithm Flow Chart
                           START

                         K=INPUT

                         Output K

                           W=K

                                           YES
                          IS EOF                 STOP
                            ?
                                NO

                      K=NEXT INPUT

              ENTRY=DICTIONARY INDEX (K)

                     Output ENTRY

              ADD W+ENTRY[0] TO DICTIONARY


                       W=ENTRY
                                                        47
The LZW Algorithm (Decompression) Example

                       1           2   4 5   7   3
• K=1
• Out put K (i.e. a)
                           K
• W=K
                       a

                       a       1
                       b       2
                       c       3
                       d       4


                                                     48
The LZW Algorithm (Decompression) Example

                          1       2    4 5     7   3
• K=2
• entry = b
                                  K
• Output entry
• Add W + entry[0] to     a b
  dictionary
• W = entry[0] (i.e. b)
                          a   1       ab   5
                          b   2
                          c   3
                          d   4


                                                       49
The LZW Algorithm (Decompression) Example
                          1       2    4 5         7   3
• K=4
• entry = d
                                           K
• Output entry
• Add W + entry[0] to     a b d
  dictionary
• W = entry[0] (i.e. d)
                          a   1       ab       5
                          b   2       bd       6
                          c   3
                          d   4


                                                           50
The LZW Algorithm (Decompression) Example
                          1       2    4 5     7   3
• K=5
• entry = ab
                                           K
• Output entry
• Add W + entry[0] to     a b d a b
  dictionary
• W = entry[0] (i.e. a)
                          a   1       ab   5
                          b   2       bd   6
                          c   3       da   7
                          d   4


                                                       51
The LZW Algorithm (Decompression) Example
                          1       2    4 5      7   3
• K=7
• entry = da
                                                K
• Output entry
• Add W + entry[0] to     a b d a b d a
  dictionary
• W = entry[0] (i.e. d)
                          a   1       ab    5
                          b   2       bd    6
                          c   3       da    7
                          d   4       abd   8


                                                        52
The LZW Algorithm (Decompression) Example
                          1       2    4 5      7     3
• K=3
• entry = c
                                                      K
• Output entry
• Add W + entry[0] to     a b d a b d a c
  dictionary
• W = entry[0] (i.e. c)
                          a   1       ab    5   dac   9
                          b   2       bd    6
                          c   3       da    7
                          d   4       abd   8


                                                          53
54
LOSSY COMPRESSION
METHODS


 Information loss is tolerable.



 Many-to-1 mapping in compression eg. Quantization




                                                      55
LOSSY COMPRESSION
METHODS
Several methods have been developed using lossy compression
techniques.
JPEG (Joint Photographic Experts Group) encoding is used to
compress pictures and graphics.
 MPEG (Moving Picture Experts Group) encoding is used to compress
video.
MP3 (MPEG audio layer 3) for audio compression.


                                                                56
57
JPEG Compression




  image, ~150KB    JPEG compressed, ~14KB




                                            58
Image compression – JPEG encoding

JPEG encoding is done in four steps:

1. Image preparation

2. Discrete Cosine Transform (DCT)

3. Quantization

4. Entropy Encoding


                                       59
Figure : JPEG grayscale example, 640 × 480 pixels

                                                    60
Block diagram for JPEG encoder.




            The JPEG compression process




                                           61
Discrete cosine transform (DCT)
In this step, each block of 64 pixels goes through a transformation
called the discrete cosine transform (DCT).
The transformation changes the 64 values so that the relative
relationships between pixels are kept but the redundancies are
revealed.
P(x, y) defines one value in the block, while T(m, n) defines the
value in the transformed block.



                                                                   62
63
Quantization

After the 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 and then drops

the fraction. This reduces the required number of bits even more.

.


                                                                     64
Zig zag recording




                Reading the table

                                    65
Block diagram for JPEG Decoder.




                                  66
Examples of varying JPEG compression
   ratios




500KB image, minimum   40KB image, half   11KB image, max
compression            compression        compression




                                                            67
68
Video compression – MPEG encoding
The Moving Picture Experts Group (MPEG) method is used to
compress video.
Principle, a motion picture is a rapid sequence of a set of frames in
which each frame is a picture.
Compressing video, then, means spatially compressing each frame
and temporally compressing a set of frames.




                                                                     69
Spatial compression
The spatial compression of each frame is done with JPEG, or a
modification of it. Each frame is a picture that can be independently
compressed.

Temporal compression
In temporal compression, redundant frames are removed. When we
watch television, for example, we receive 30 frames per second.
However, most of the consecutive frames are almost the same.



                                                                  70
Figure MPEG frames


                     71
72
Audio compression
Audio compression can be used for speech or music. For speech

we need to compress a 64 kHz digitized signal, while for music we

need to compress a 1.411 MHz signal.

Two categories of techniques are used for audio compression:

predictive encoding and perceptual encoding.




                                                                73
Predictive encoding

In predictive encoding, the differences between samples are

encoded instead of encoding all the sampled values.

 This type of compression is normally used for speech. Several

standards have been defined such as GSM (13 kbps), G.729 (8 kbps),

and G.723.3 (6.4 or 5.3 kbps).


                                                                 74
Perceptual encoding: MP3

The most common compression technique used to create CD-

quality audio is based on the perceptual encoding technique.

This type of audio needs at least 1.411 Mbps, which cannot be sent

over the Internet without compression. MP3 (MPEG audio layer 3)

uses this technique.



                                                                      75
Advantages:
 In medicine
 Vision Systems are flexible, inexpensive, powerful tools that can
    be used with ease.
   In Space Exploration the robots play vital role which in turn use
    the image processing techniques
    Astronomical Observations.
   Used in Remote Sensing, Geological Surveys for detecting
    mineral resources etc.
   Also used for character recognizing techniques, inspection for
    abnormalities in industries.


                                                                        76
Disadvantages:
 A Person needs knowledge in many fields to develop an application /
  or part of an application using image processing.

 Calculations and computations are difficult and complicated so needs
  an expert in the field related. Hence it’s unsuitable and unbeneficial to
  ordinary programmers with mediocre knowledge




                                                                          77
Applications
One of the most common uses of DIP techniques: improve quality,
remove noise etc




                                                                   78
The Hubble Telescope
Launched in 1990 the Hubble
telescope can take images of
very distant objects
However, an incorrect mirror
made many of Hubble’s
images useless
Image processing
techniques were
used to fix this


                                79
Medicine
Take slice from MRI scan of canine heart, and find boundaries
between types of tissues




     Original MRI Image of a Dog Heart      Edge Detection Image



                                                                   80
GIS
 Geographic Information Systems
    Digital image processing techniques are used extensively to
     manipulate satellite imagery
    Terrain classification
    Meteorology




                                                                   81
PCB Inspection
 Printed Circuit Board (PCB) inspection
    Machine inspection is used to determine that all components are
     present and that all solder joints are acceptable
    Both conventional imaging and x-ray imaging are used




                                                                       82
HCI
Try to make human computer interfaces

    more natural

    Face recognition


    Gesture recognition




                                         83
Inserting Artificial Objects into a Scene




                                            84
Human Activity Recognition




                             85
CONCLUSION:
 Image processing plays a vital role in many applications such
as
            Fingerprint Identification System
            Medicine
            Geographic Information Systems
            Printed Circuit Board (PCB) inspection
            human computer interfaces
            Inserting Artificial Objects into a Scene
            Human Activity Recognition
            soon…….

                                                                 86
Future scope
 The digital Image Processing is now finding wide range of uses in
  different modern applications. Few of them (in which researcher are
  trying developments)include:

 Expert Systems

 Parallel Processing

 Neural Networks



                                                                        87
88
89

More Related Content

PPTX
Image Processing Using MATLAB
PDF
Basics of Image Processing using MATLAB
PPTX
DIGITAL IMAGE PROCESSING
PPTX
DCT image compression
PPT
Lec 07 image enhancement in frequency domain i
PPT
Chapter 6 Image Processing: Image Enhancement
PPTX
Multimedia System & Design Ch 5 video
PPTX
Dip unit-i-ppt academic year(2016-17)
Image Processing Using MATLAB
Basics of Image Processing using MATLAB
DIGITAL IMAGE PROCESSING
DCT image compression
Lec 07 image enhancement in frequency domain i
Chapter 6 Image Processing: Image Enhancement
Multimedia System & Design Ch 5 video
Dip unit-i-ppt academic year(2016-17)

What's hot (20)

PPTX
The MIDI Protocol - Musical Instrument Digital Interface
PPTX
Digital Audio in Multimedia
PDF
Chapter 6 - Multimedia Over Ip
PPTX
Introduction to Digital Image Processing
PPT
Image enhancement techniques
PPTX
Frequency domain methods
PPTX
Image enhancement
PPT
Image segmentation
PPSX
Image processing on matlab presentation
PPTX
Image proccessing and its application
PPTX
Digital image processing
PPT
image enhancement
PPTX
Video signal-ppt
PPT
Enhancement in spatial domain
PPT
Image processing
PPT
Enhancement in frequency domain
PPT
multimedia image.ppt
PPT
Image processing
PPTX
Introduction to Image Processing with MATLAB
The MIDI Protocol - Musical Instrument Digital Interface
Digital Audio in Multimedia
Chapter 6 - Multimedia Over Ip
Introduction to Digital Image Processing
Image enhancement techniques
Frequency domain methods
Image enhancement
Image segmentation
Image processing on matlab presentation
Image proccessing and its application
Digital image processing
image enhancement
Video signal-ppt
Enhancement in spatial domain
Image processing
Enhancement in frequency domain
multimedia image.ppt
Image processing
Introduction to Image Processing with MATLAB
Ad

Viewers also liked (20)

ODP
image compression ppt
PPTX
Image Compression
PPTX
Image processing and compression techniques
PPTX
Image compression
PPT
Data compression
PPTX
Image processing ppt
PPT
Image compression
PPT
Digital Image Processing
DOC
Seminar Report on image compression
PPT
Image Processing (General Topic)
PDF
Compression: Images (JPEG)
PPS
Image Processing Basics
PPT
Compression
PPTX
Fundamentals of Data compression
PPTX
Image compression: Techniques and Application
PPTX
Data compression
PDF
JPEG Image Compression
PPT
Compression techniques
PPTX
Data compression
PDF
Data compression introduction
image compression ppt
Image Compression
Image processing and compression techniques
Image compression
Data compression
Image processing ppt
Image compression
Digital Image Processing
Seminar Report on image compression
Image Processing (General Topic)
Compression: Images (JPEG)
Image Processing Basics
Compression
Fundamentals of Data compression
Image compression: Techniques and Application
Data compression
JPEG Image Compression
Compression techniques
Data compression
Data compression introduction
Ad

Similar to Spandana image processing and compression techniques (7840228) (20)

PPTX
Digital image processing
PPTX
Digital image processing
PDF
Digital image processing
PPTX
Stages of image processing
PPTX
Fundamental steps in image processing
PPTX
Digital image processing
PPT
Fundamentals of Image Processing & Components.ppt
PPTX
Fundamental steps in Digital Image Processing
PPTX
image processing using matlab in faculty 1
PPTX
Digital image processing
PDF
Image restoration and enhancement #2
PPTX
Imagine camp, Developing Image Processing app for windows phone platform
PPTX
ARKA RAJ SAHA-27332020003..pptx
PPTX
Dip fundamentals 2
PPT
1 dip introduction
PPTX
DIGITAL IMAGE PROCESSING slides in pptx.
PPTX
Digital image processing
PPTX
Introduction to Medical Imaging Applications
PPTX
2.FUNDAMENTALS OF DIGITAL IMAGE PROCESSING.pptx
Digital image processing
Digital image processing
Digital image processing
Stages of image processing
Fundamental steps in image processing
Digital image processing
Fundamentals of Image Processing & Components.ppt
Fundamental steps in Digital Image Processing
image processing using matlab in faculty 1
Digital image processing
Image restoration and enhancement #2
Imagine camp, Developing Image Processing app for windows phone platform
ARKA RAJ SAHA-27332020003..pptx
Dip fundamentals 2
1 dip introduction
DIGITAL IMAGE PROCESSING slides in pptx.
Digital image processing
Introduction to Medical Imaging Applications
2.FUNDAMENTALS OF DIGITAL IMAGE PROCESSING.pptx

Recently uploaded (20)

PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Cell Structure & Organelles in detailed.
PDF
Insiders guide to clinical Medicine.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
102 student loan defaulters named and shamed – Is someone you know on the list?
Pharmacology of Heart Failure /Pharmacotherapy of CHF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
VCE English Exam - Section C Student Revision Booklet
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Abdominal Access Techniques with Prof. Dr. R K Mishra
Cell Structure & Organelles in detailed.
Insiders guide to clinical Medicine.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Microbial diseases, their pathogenesis and prophylaxis
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
O7-L3 Supply Chain Operations - ICLT Program
Supply Chain Operations Speaking Notes -ICLT Program
Anesthesia in Laparoscopic Surgery in India
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES

Spandana image processing and compression techniques (7840228)

  • 1. IMAGE PROCESSING AND COMPRESSION TECHNIQUES By T. Spandana 094D1A0426 E.C.E SSIET,Vadiyampeta. 1
  • 2. Objective  The objective of image processing is to sharpen, minimize the effect of degradation, reduce the amount of memory to store the image information (image compression). 2
  • 3. Introduction Image processing pertains to the alteration and analysis of pictorial information. Common case of image processing is the adjustment of brightness and contrast controls on a television set by doing this we enhance the image until its subjective appearing to us is most appealing. 3
  • 4. Terminology What is the Digital Image Processing?  Digital: Operating by the use of discrete signals to represent data in the form of numbers.  Image: An image (from Latin imago) or picture is an artefact, usually two-dimensional.  Processing: To perform operations on data according to programmed instructions. 4
  • 5. Definition Thus the definition of the digital image processing may be given as: “Digital image processing is the use of computer algorithms to perform image processing on digital images ” 5
  • 6. Digital image:  An image may be defined as a two- dimensional function, f(x, y).  A digital image is composed of a finite number of elements.  These elements are referred to as picture elements, image elements, pels, and pixels. 6
  • 8. Key Stages in Digital Image Processing Image Morphological Restoration Processing Image Segmentation Enhancement Image Object Acquisition Recognition Representation Problem Domain & Description Colour Image Image Processing Compression 8
  • 9. Key Stages in Digital Image Processing: Image acquisition Image Morphological Restoration Processing Image Segmentation Enhancement Image Object Acquisition Recognition Representation Problem Domain & Description Colour Image Image Processing Compression 9
  • 10. Key Stages in Digital Image Processing: Image Enhancement Image Morphological Restoration Processing Image Segmentation Enhancement Image Object Acquisition Recognition Representation Problem Domain & Description Colour Image Image Processing Compression 10
  • 11. Key Stages in Digital Image Processing: Image Restoration Image Morphological Restoration Processing Image Segmentation Enhancement Image Object Acquisition Recognition Representation Problem Domain & Description Colour Image Image Processing Compression 11
  • 12. Key Stages in Digital Image Processing: Morphological Processing Image Morphological Restoration Processing Image Segmentation Enhancement Image Object Acquisition Recognition Representation Problem Domain & Description Colour Image Image Processing Compression 12
  • 13. Key Stages in Digital Image Processing: Segmentation Image Morphological Restoration Processing Image Segmentation Enhancement Image Object Acquisition Recognition Representation Problem Domain & Description Colour Image Image Processing Compression 13
  • 14. Key Stages in Digital Image Processing: Object Recognition Image Morphological Restoration Processing Image Segmentation Enhancement Image Object Acquisition Recognition Representation Problem Domain & Description Colour Image Image Processing Compression 14
  • 15. Key Stages in Digital Image Processing: Representation & Description Image Morphological Restoration Processing Image Segmentation Enhancement Image Object Acquisition Recognition Representation Problem Domain & Description Colour Image Image Processing Compression 15
  • 16. Key Stages in Digital Image Processing: Image Compression Image Morphological Restoration Processing Image Segmentation Enhancement Image Object Acquisition Recognition Representation Problem Domain & Description Colour Image Image Processing Compression 16
  • 17. Key Stages in Digital Image Processing: Colour Image Processing Image Morphological Restoration Processing Image Segmentation Enhancement Image Object Acquisition Recognition Representation Problem Domain & Description Colour Image Image Processing Compression 17
  • 18. Image Compression  Image compression addresses the problem of reducing the amount of data required to represent a digital image.  It is the sub areas of image processing.  The underlying basis of the reduction process is the removal of the redundant data. 18
  • 19. Goal of Image Compression  Digital images require huge amounts of space for storage and large bandwidths for transmission.  The goal of image compression is to reduce the amount of data required to represent a digital image. 19
  • 20. The Flow of Image Compression To store the image into bit-stream as compact as possible and to display the decoded image in the monitor as exact as possible Original Image Decoded Image Bitstream Encoder 0101100111... Decoder Figure: Flow of compression 20
  • 21. Different Compression Techniques Mainly two types of data Compression techniques are there.  Loss less Compression.  Lossy Compression. 21
  • 22. Figure : Data compression methods 22
  • 23. 23
  • 25. 25
  • 26. Run-length: •Simplest method of compression. • It can be used to compress data made of any combination of symbols. •It does not need to know the frequency of occurrence of symbols and can be very efficient if data is represented as 0s and 1s. •The general idea behind this method is to replace consecutive repeating occurrences of a symbol by one occurrence of the symbol followed by the number of occurrences. 26
  • 27. For instance, Figure : Run-length encoding example 27
  • 28. 28
  • 29. Huffman coding Huffman coding assigns shorter codes to symbols that occur more frequently and longer codes to those that occur less frequently. 29
  • 31. A character’s code is found by starting at the root and following the branches that lead to that character. The code itself is the bit value of each branch on the path, taken in sequence. Figure Final tree and code 31
  • 32. Encoding Let us see how to encode text using the code for our five characters. Figure shows the original and the encoded text. Figure Huffman encoding 32
  • 33. Decoding The recipient has a very easy job in decoding the data it receives. Figure shows how decoding takes place. Figure : Huffman decoding 33
  • 34. 34
  • 35. Lempel Ziv encoding Lempel Ziv (LZ) encoding is an example of a category of algorithms called dictionary-based encoding. The idea is to create a dictionary (a table) of strings used during the communication session. 35
  • 36. The LZW Algorithm (Compression) Flow Chart START W= NULL YES IS EOF STOP ? N O K=NEXT INPUT YES IS WK W=WK FOUND? N O OUTPUT INDEX OF W ADD WK TO DICTIONARY W=K 36
  • 37. The LZW Algorithm (Compression) Example  Input string is a b d c a d a c  The Initial Dictionary contains symbols like a, b, c, d with their index values as 1, 2, 3, 4 respectively. a 1  Now the input string b 2 is read from left to c 3 right. Starting from a. d 4 37
  • 38. The LZW Algorithm (Compression) Example  W = Null a b d c a d a c  K=a  WK = a K In the dictionary. a 1 b 2 c 3 d 4 38
  • 39. The LZW Algorithm (Compression) Example  K = b. a b d c a d a c  WK = ab is not in the dictionary. K  Add WK to dictionary 1  Output code for a. a 1 ab 5  Set W = b b 2 c 3 d 4 39
  • 40. The LZW Algorithm (Compression) Example  K=d a b d c a d a c  WK = bd Not in the dictionary. K Add bd to dictionary.  Output code b 1 2  Set W = d a 1 ab 5 b 2 bd 6 c 3 d 4 40
  • 41. The LZW Algorithm (Compression) Example  K=a a b d a b d a c  WK = da not in the dictionary. K  Add it to dictionary.  Output code d 1 2 4  Set W = a a 1 ab 5 b 2 bd 6 c 3 da 7 d 4 41
  • 42. The LZW Algorithm (Compression) Example  K=b a b d a b d a c  WK = ab It is in the dictionary. K 1 2 4 a 1 ab 5 b 2 bd 6 c 3 da 7 d 4 42
  • 43. The LZW Algorithm (Compression) Example  K=d a b d a b d a c  WK = abd Not in the dictionary. K  Add W to the dictionary. 1 2 4 5  Output code for W. a 1 ab 5  Set W = d b 2 bd 6 c 3 da 7 d 4 abd 8 43
  • 44. The LZW Algorithm (Compression) Example • K=a a b d a b d a c • WK = da In the dictionary. K 1 2 4 5 a 1 ab 5 b 2 bd 6 c 3 da 7 d 4 abd 8 44
  • 45. The LZW Algorithm (Compression) Example • K=c a b d a b d a c • WK = dac Not in the dictionary. K • Add WK to the dictionary. 1 2 4 5 7 • Output code for W. a 1 ab 5 dac 9 • Set W = c b 2 bd 6 • No input left so output code for W. c 3 da 7 d 4 abd 8 45
  • 46. The LZW Algorithm (Compression) Example • The final output a b d a b d a c string is 124573 K • Stop. 1 2 4 5 7 3 a 1 ab 5 dac 9 b 2 bd 6 c 3 da 7 d 4 abd 8 46
  • 47. LZW Decompression Algorithm Flow Chart START K=INPUT Output K W=K YES IS EOF STOP ? NO K=NEXT INPUT ENTRY=DICTIONARY INDEX (K) Output ENTRY ADD W+ENTRY[0] TO DICTIONARY W=ENTRY 47
  • 48. The LZW Algorithm (Decompression) Example 1 2 4 5 7 3 • K=1 • Out put K (i.e. a) K • W=K a a 1 b 2 c 3 d 4 48
  • 49. The LZW Algorithm (Decompression) Example 1 2 4 5 7 3 • K=2 • entry = b K • Output entry • Add W + entry[0] to a b dictionary • W = entry[0] (i.e. b) a 1 ab 5 b 2 c 3 d 4 49
  • 50. The LZW Algorithm (Decompression) Example 1 2 4 5 7 3 • K=4 • entry = d K • Output entry • Add W + entry[0] to a b d dictionary • W = entry[0] (i.e. d) a 1 ab 5 b 2 bd 6 c 3 d 4 50
  • 51. The LZW Algorithm (Decompression) Example 1 2 4 5 7 3 • K=5 • entry = ab K • Output entry • Add W + entry[0] to a b d a b dictionary • W = entry[0] (i.e. a) a 1 ab 5 b 2 bd 6 c 3 da 7 d 4 51
  • 52. The LZW Algorithm (Decompression) Example 1 2 4 5 7 3 • K=7 • entry = da K • Output entry • Add W + entry[0] to a b d a b d a dictionary • W = entry[0] (i.e. d) a 1 ab 5 b 2 bd 6 c 3 da 7 d 4 abd 8 52
  • 53. The LZW Algorithm (Decompression) Example 1 2 4 5 7 3 • K=3 • entry = c K • Output entry • Add W + entry[0] to a b d a b d a c dictionary • W = entry[0] (i.e. c) a 1 ab 5 dac 9 b 2 bd 6 c 3 da 7 d 4 abd 8 53
  • 54. 54
  • 55. LOSSY COMPRESSION METHODS Information loss is tolerable. Many-to-1 mapping in compression eg. Quantization 55
  • 56. LOSSY COMPRESSION METHODS Several methods have been developed using lossy compression techniques. JPEG (Joint Photographic Experts Group) encoding is used to compress pictures and graphics.  MPEG (Moving Picture Experts Group) encoding is used to compress video. MP3 (MPEG audio layer 3) for audio compression. 56
  • 57. 57
  • 58. JPEG Compression image, ~150KB JPEG compressed, ~14KB 58
  • 59. Image compression – JPEG encoding JPEG encoding is done in four steps: 1. Image preparation 2. Discrete Cosine Transform (DCT) 3. Quantization 4. Entropy Encoding 59
  • 60. Figure : JPEG grayscale example, 640 × 480 pixels 60
  • 61. Block diagram for JPEG encoder. The JPEG compression process 61
  • 62. Discrete cosine transform (DCT) In this step, each block of 64 pixels goes through a transformation called the discrete cosine transform (DCT). The transformation changes the 64 values so that the relative relationships between pixels are kept but the redundancies are revealed. P(x, y) defines one value in the block, while T(m, n) defines the value in the transformed block. 62
  • 63. 63
  • 64. Quantization After the 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 and then drops the fraction. This reduces the required number of bits even more. . 64
  • 65. Zig zag recording Reading the table 65
  • 66. Block diagram for JPEG Decoder. 66
  • 67. Examples of varying JPEG compression ratios 500KB image, minimum 40KB image, half 11KB image, max compression compression compression 67
  • 68. 68
  • 69. Video compression – MPEG encoding The Moving Picture Experts Group (MPEG) method is used to compress video. Principle, a motion picture is a rapid sequence of a set of frames in which each frame is a picture. Compressing video, then, means spatially compressing each frame and temporally compressing a set of frames. 69
  • 70. Spatial compression The spatial compression of each frame is done with JPEG, or a modification of it. Each frame is a picture that can be independently compressed. Temporal compression In temporal compression, redundant frames are removed. When we watch television, for example, we receive 30 frames per second. However, most of the consecutive frames are almost the same. 70
  • 72. 72
  • 73. Audio compression Audio compression can be used for speech or music. For speech we need to compress a 64 kHz digitized signal, while for music we need to compress a 1.411 MHz signal. Two categories of techniques are used for audio compression: predictive encoding and perceptual encoding. 73
  • 74. Predictive encoding In predictive encoding, the differences between samples are encoded instead of encoding all the sampled values.  This type of compression is normally used for speech. Several standards have been defined such as GSM (13 kbps), G.729 (8 kbps), and G.723.3 (6.4 or 5.3 kbps). 74
  • 75. Perceptual encoding: MP3 The most common compression technique used to create CD- quality audio is based on the perceptual encoding technique. This type of audio needs at least 1.411 Mbps, which cannot be sent over the Internet without compression. MP3 (MPEG audio layer 3) uses this technique. 75
  • 76. Advantages:  In medicine  Vision Systems are flexible, inexpensive, powerful tools that can be used with ease.  In Space Exploration the robots play vital role which in turn use the image processing techniques  Astronomical Observations.  Used in Remote Sensing, Geological Surveys for detecting mineral resources etc.  Also used for character recognizing techniques, inspection for abnormalities in industries. 76
  • 77. Disadvantages:  A Person needs knowledge in many fields to develop an application / or part of an application using image processing.  Calculations and computations are difficult and complicated so needs an expert in the field related. Hence it’s unsuitable and unbeneficial to ordinary programmers with mediocre knowledge 77
  • 78. Applications One of the most common uses of DIP techniques: improve quality, remove noise etc 78
  • 79. The Hubble Telescope Launched in 1990 the Hubble telescope can take images of very distant objects However, an incorrect mirror made many of Hubble’s images useless Image processing techniques were used to fix this 79
  • 80. Medicine Take slice from MRI scan of canine heart, and find boundaries between types of tissues Original MRI Image of a Dog Heart Edge Detection Image 80
  • 81. GIS  Geographic Information Systems  Digital image processing techniques are used extensively to manipulate satellite imagery  Terrain classification  Meteorology 81
  • 82. PCB Inspection  Printed Circuit Board (PCB) inspection  Machine inspection is used to determine that all components are present and that all solder joints are acceptable  Both conventional imaging and x-ray imaging are used 82
  • 83. HCI Try to make human computer interfaces more natural  Face recognition  Gesture recognition 83
  • 84. Inserting Artificial Objects into a Scene 84
  • 86. CONCLUSION: Image processing plays a vital role in many applications such as Fingerprint Identification System Medicine Geographic Information Systems Printed Circuit Board (PCB) inspection human computer interfaces Inserting Artificial Objects into a Scene Human Activity Recognition soon……. 86
  • 87. Future scope  The digital Image Processing is now finding wide range of uses in different modern applications. Few of them (in which researcher are trying developments)include:  Expert Systems  Parallel Processing  Neural Networks 87
  • 88. 88
  • 89. 89