SlideShare a Scribd company logo
CIS 601

Image ENHANCEMENT
      in the
 SPATIAL DOMAIN
               Dr. Rolf Lakaemper
Most of these slides base on the
              book

  Digital Image Processing
        by Gonzales/Woods
            Chapter 3
Introduction


 Image Enhancement ?
 • enhance otherwise hidden information
 • Filter important image features
 • Discard unimportant image features


 Spatial Domain ?
 • Refers to the image plane (the ‘natural’
     image)
 •   Direct image manipulation
Remember ?


    A 2D grayvalue - image is a 2D -> 1D
                  function,

                  v = f(x,y)
Remember ?


    As we have a function, we can apply
        operators to this function, e.g.

              T(f(x,y)) = f(x,y) / 2



   Operator               Image (= function !)
Remember ?


  T transforms the given image f(x,y)
  into another image g(x,y)




         f(x,y)             g(x,y)
Spatial Domain


   The operator T can be defined over


   • The set of pixels (x,y) of the image
   • The set of ‘neighborhoods’ N(x,y) of
       each pixel
   •   A set of images f1,f2,f3,…
Spatial Domain


      Operation on the set of image-pixels




      6   8      2   0                        3   4   1    0

     12 200 20       10                       6   100 10   5



                      (Operator: Div. by 2)
Spatial Domain


   Operation on the set of ‘neighborhoods’
              N(x,y) of each pixel
                      6   8    (Operator: sum)

                      12 200

     6   8   2   0                 226

    12 200 20    10
Spatial Domain


        Operation on a set of images f1,f2,…

    6    8    2   0

    12 200 20 10

                      (Operator: sum)   11 13   3   0

                                        14 220 23   14

    5    5    1   0

    2    20   3   4
Spatial Domain


       Operation on the set of image-pixels
   Remark: these operations can also be seen as operations on the
      neighborhood of a pixel (x,y), by defining the neighborhood as the
      pixel itself.


   • The simplest case of operators
   • g(x,y) = T(f(x,y)) depends only on the value
       of f at (x,y)
   •   T is called a

         gray-level or intensity transformation
                          function
Transformations


      Basic Gray Level Transformations


  •   Image Negatives
  •   Log Transformations
  •   Power Law Transformations
  •   Piecewise-Linear Transformation
      Functions
  For the following slides L denotes the max. possible gray value of the
      image, i.e. f(x,y) ∈ [0,L]
Transformations


                      Image Negatives: T(f)= L-f


                      T(f)=L-f
  Output gray level




                      Input gray level
Transformations


              Log Transformations:
               T(f) = c * log (1+ f)
Transformations


              Log Transformations



         InvLog                Log
Transformations


              Log Transformations
Transformations


         Power Law Transformations
                  T(f) = c*f γ
Transformations


    • varying gamma (γ) obtains family
    of possible transformation curves
  ∀γ > 0
   • Compresses dark values
   • Expands bright values
  ∀γ < 0
   • Expands dark values
   • Compresses bright values
Transformations


        • Used for gamma-correction
Transformations

   • Used for general purpose contrast manipulation
Transformations

            Piecewise Linear Transformations
Piecewise Linear Transformations

                                Thresholding Function

g(x,y) =    L if f(x,y) > t,
            0 else
t = ‘threshold level’
Output gray level




                    Input gray level
Piecewise Linear Transformations

                  Gray Level Slicing

Purpose: Highlight a specific range of grayvalues

Two approaches:

7. Display high value for range of interest, low value
  else (‘discard background’)

9. Display high value for range of interest, original
  value else (‘preserve background’)
Piecewise Linear Transformations

                  Gray Level Slicing
Piecewise Linear Transformations


             Bitplane Slicing




 Extracts the information of a
        single bitplane
Piecewise Linear Transformations




                                          BP 0


                                   BP 5


                      BP 7
Piecewise Linear Transformations


                   Exercise:

• How does the transformation
  function look for bitplanes
  0,1,… ?

• What is the easiest way to filter a single bitplane
  (e.g. in MATLAB) ?
Histograms


                   Histogram Processing
  1   4   5                      0

  3   1   5                      1
              Number of Pixels




                                     gray level
Histograms


 Histogram Equalization:

 • Preprocessing technique to
     enhance contrast in ‘natural’
     images
 •   Target: find gray level
     transformation function T to
     transform image f such that the
     histogram of T(f) is ‘equalized’
Histogram Equalization


              Equalized Histogram:

       The image consists of an equal
        number of pixels for every gray-
       value, the histogram is constant !
Histogram Equalization


                          Example:


                                     T




 We are looking for
this transformation !
Histogram Equalization


   Target:
   Find a transformation T to transform the
     grayvalues g1∈[0..1] of an image I to
     grayvalues g2 = T(g1) such that the
     histogram is equalized, i.e. there’s an
     equal amount of pixels for each grayvalue.

   Observation (continous model !):
   Assumption: Total image area = 1 (normalized). Then:
   The area(!) of pixels of the transformed
     image in the gray-value range 0..g2 equals
     the gray-value g2.
Histogram Equalization

   The area(!) of pixels of the transformed image in the gray-
      value range 0..g2 equals the gray-value g2.


   ⇒ Every g1 is transformed to a grayvalue
      that equals the area (discrete: number of
      pixels) in the image covered by pixels
      having gray-values from 0 to g1.

   ⇒ The transformation T function t is the
      area- integral: T: g2 =       ∫   0..g1   I da
Histogram Equalization


   Discrete:

   g1 is mapped to the (normalized)
    number of pixels having
    grayvalues 0..g1 .
Histogram Equalization


     Mathematically the transformation
         is deducted by theorems in
      continous (not discrete) spaces.

     The results achieved do NOT hold
            for discrete spaces !
                         (Why ?)


              However, it’s visually close.
Histogram Equalization

                           Conclusion:

   • The transformation function that yields an image
       having an equalized histogram is the integral of
       the histogram of the source-image
   • The discrete integral is given by the cumulative sum,
       MATLAB function: cumsum()
   • The function transforms an image into an image,
       NOT a histogram into a histogram ! The
       histogram is just a control tool !
   •   In general the transformation does not create an
       image with an equalized histogram in the
       discrete case !
Operations on a set of images


        Operation on a set of images f1,f2,…

    6    8    2   0

    12 200 20 10

                      (Operator: sum)   11 13   3   0

                                        14 220 23   14

    5    5    1   0

    2    20   3   4
Operations on a set of images


         Logic (Bitwise) Operations



                            AND
                            OR
                            NOT
Operations on a set of images


    The operators AND,OR,NOT are
         functionally complete:

    Any logic operator can be implemented
          using only these 3 operators
Operations on a set of images


    Any logic operator can be implemented
          using only these 3 operators:


    A     B    Op
    0     0    1          Op=
                          NOT(A) AND NOT(B)
    0     1    1
                          OR
    1     0    0
                          NOT(A) AND B
    1     1    0
Operations on a set of images


                 Image 1 AND Image 2

    1    2   3   9

    7    3   6   4

                     (Operator: AND)   1   0   1   1

                                       2   2   2   0

    1    1   1   1

    2    2   2   2
Operations on a set of images


              Image 1 AND Image 2:
           Used for Bitplane-Slicing and
                     Masking
Operations on a set of images


     Exercise: Define the mask-image, that
      transforms image1 into image2 using
                 the OR operand
    1    2   3   9

    7    3   6   4

                     (Operator: OR)   255 2   7   255

                                      255 3   7   255
Operations


      Arithmetic Operations on a set of images


  1     2    3   9

  7     3    6   4

                     (Operator: +)   2   3   4   10

                                     9   5   8   6

  1     1    1   1

  2     2    2   2
Operations


              Exercise:




    What could the operators +
       and – be used for ?
Operations


         (MATLAB) Example: Operator –
        Foreground-Extraction
Operations


 (MATLAB)
 Example: Operator +
 Image Averaging
CIS 601

Image ENHANCEMENT
      in the
 SPATIAL DOMAIN
       Part 2
Histograms


 So far (part 1) :

 • Histogram definition
 • Histogram equalization
 Now:

 • Histogram statistics
Histograms


 Remember:
 The histogram shows the number of
   pixels having a certain gray-value
             number of pixels




                                grayvalue (0..1)
Histograms


 The NORMALIZED histogram is the
   histogram divided by the total number
   of pixels in the source image.

 The sum of all values in the normalized
   histogram is 1.

 The value given by the normalized
   histogram for a certain gray value can
   be read as the probability of randomly
   picking a pixel having that gray value
Histograms




  What can the (normalized)
   histogram tell about the
           image ?
Histograms




 • The MEAN VALUE (or average gray level)

                     M = Σ g h(g)
                             g




                     1*0.3+2*0.1+3*0.2+4*0.1+5*0.2+6*0.1=
 0.3
 0.2                                  2.6
 0.1
 0.0
       1 2 3 4 5 6
Histograms




    The MEAN value is the average gray
      value of the image, the ‘overall
             brightness appearance’.
Histograms


             2. The VARIANCE

              V = Σ (g-M)2 h(g)
                    g



                 (with M = mean)
                    or similar:


       The STANDARD DEVIATION
                 D = sqrt(V)
Histograms


 VARIANCE gives a measure about the
  distribution of the histogram values
  around the mean.

   0.3                0.3
   0.2                0.2
   0.1                0.1
   0.0                0.0


     V1          >              V2
Histograms


 The STANDARD DEVIATION is a value
   on the gray level axis, showing the
   average distance of all pixels to the
   mean

   0.3                 0.3
   0.2                 0.2
   0.1                 0.1
   0.0                 0.0



             D1   >          D2
Histograms


  VARIANCE and STANDARD DEVIATION
     of the histogram tell us about the
      average contrast of the image !

  The higher the VARIANCE (=the higher
      the STANDARD DEVIATION), the
        higher the image’s contrast !
Histograms


                     Example:

             Image and blurred version
Histograms



         Histograms with MEAN and
           STANDARD DEVIATION




     M=0.73 D=0.32        M=0.71 D=0.27
Histograms


 Exercise:


 Design an autofocus system for a digital
                 camera !


 The system should analyse an area in the middle of the picture and
    automatically adjust the lens such that this area is sharp.
Histograms


 In between the basics…



 …histograms can give us a first hint
  how to create image databases:
Feature Based Coding



  Feature Based Coding
  • Determine a feature-vector for a given image
  • Compare images by their feature-vectors
  Two operations need to be defined: a mapping of shape
  into the feature space and a similarity of feature vectors.

   Representation      Feature Extraction   Vector Comparison




  Where are the histograms ?
Feature Based Coding



  Feature Based Coding
  • Determine a feature-vector for a given image
  • Compare images by their feature-vectors
  Two operations need to be defined: a mapping of shape
  into the feature space and a similarity of feature vectors.

   Representation       HISTOGRAM           Histogram Comp.


  HERE !
  Question: how can we compare histograms (vectors) ?
Vector Comparison



              Vector Comparison



                ,
Vector Comparison
Vector Comparison
Vector Comparison




 What’s the meaning of the Cosine Distance with
             respect to histograms ?
  i.e.: what’s the consequence of eliminating the vector’s length information ?
Vector Comparison



 More Vector Distances:


 • Quadratic Form Distance
 • Earth Movers Distance
 • Proportional Transportation Distance
 •…
Vector Comparison



 Histogram Intersection
 (non symmetric):


 d(h1,h2) = 1 - ∑ min(h1 ,h2 )
                    i   i   i
                                 / ∑i h1i
 Ex.: What could be a huge drawback of image
 comparison using histogram intersection ?
Histograms


Exercise:




Outline an image database system,
     using statistical (histogram)
              information
Histograms


 Discussion:




 Which problems could occur if the
  database consists of the following
             images ?
Histograms
Spatial Filtering


   End of histograms.




   And now to something completely
    different …

More Related Content

What's hot

Histogram equalization
Histogram equalizationHistogram equalization
Histogram equalization
11mr11mahesh
 
SPATIAL FILTER
SPATIAL FILTERSPATIAL FILTER
Morphological image processing
Morphological image processingMorphological image processing
Morphological image processing
Raghu Kumar
 
6 spatial filtering p2
6 spatial filtering p26 spatial filtering p2
6 spatial filtering p2
Gichelle Amon
 
Image noise reduction
Image noise reductionImage noise reduction
Image noise reduction
Jksuryawanshi
 
4.intensity transformations
4.intensity transformations4.intensity transformations
4.intensity transformations
Yahya Alkhaldi
 
Image compression .
Image compression .Image compression .
Image compression .
Payal Vishwakarma
 
Histogram Equalization
Histogram EqualizationHistogram Equalization
Histogram Equalization
Kalyan Acharjya
 
04 image enhancement edge detection
04 image enhancement edge detection04 image enhancement edge detection
04 image enhancement edge detection
Rumah Belajar
 
Removal of Salt and Pepper Noise in images
Removal of Salt and Pepper Noise in imagesRemoval of Salt and Pepper Noise in images
Removal of Salt and Pepper Noise in images
Murali Siva
 
Image segmentation ppt
Image segmentation pptImage segmentation ppt
Image segmentation ppt
Gichelle Amon
 
Point processing
Point processingPoint processing
Point processing
panupriyaa7
 
Jpeg compression
Jpeg compressionJpeg compression
Jpeg compression
Hossain Md Shakhawat
 
A completed modeling of local binary pattern operator
A completed modeling of local binary pattern operatorA completed modeling of local binary pattern operator
A completed modeling of local binary pattern operator
Win Yu
 
filters for noise in image processing
filters for noise in image processingfilters for noise in image processing
filters for noise in image processing
Sardar Alam
 
Threshold Selection for Image segmentation
Threshold Selection for Image segmentationThreshold Selection for Image segmentation
Threshold Selection for Image segmentation
Parijat Sinha
 
Sign Language Recognition using Mediapipe
Sign Language Recognition using MediapipeSign Language Recognition using Mediapipe
Sign Language Recognition using Mediapipe
IRJET Journal
 
NOISE FILTERS IN IMAGE PROCESSING
NOISE FILTERS IN IMAGE PROCESSINGNOISE FILTERS IN IMAGE PROCESSING
NOISE FILTERS IN IMAGE PROCESSING
Animesh Singh Sengar
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
A B Shinde
 
Presentation of Lossy compression
Presentation of Lossy compressionPresentation of Lossy compression
Presentation of Lossy compression
Omar Ghazi
 

What's hot (20)

Histogram equalization
Histogram equalizationHistogram equalization
Histogram equalization
 
SPATIAL FILTER
SPATIAL FILTERSPATIAL FILTER
SPATIAL FILTER
 
Morphological image processing
Morphological image processingMorphological image processing
Morphological image processing
 
6 spatial filtering p2
6 spatial filtering p26 spatial filtering p2
6 spatial filtering p2
 
Image noise reduction
Image noise reductionImage noise reduction
Image noise reduction
 
4.intensity transformations
4.intensity transformations4.intensity transformations
4.intensity transformations
 
Image compression .
Image compression .Image compression .
Image compression .
 
Histogram Equalization
Histogram EqualizationHistogram Equalization
Histogram Equalization
 
04 image enhancement edge detection
04 image enhancement edge detection04 image enhancement edge detection
04 image enhancement edge detection
 
Removal of Salt and Pepper Noise in images
Removal of Salt and Pepper Noise in imagesRemoval of Salt and Pepper Noise in images
Removal of Salt and Pepper Noise in images
 
Image segmentation ppt
Image segmentation pptImage segmentation ppt
Image segmentation ppt
 
Point processing
Point processingPoint processing
Point processing
 
Jpeg compression
Jpeg compressionJpeg compression
Jpeg compression
 
A completed modeling of local binary pattern operator
A completed modeling of local binary pattern operatorA completed modeling of local binary pattern operator
A completed modeling of local binary pattern operator
 
filters for noise in image processing
filters for noise in image processingfilters for noise in image processing
filters for noise in image processing
 
Threshold Selection for Image segmentation
Threshold Selection for Image segmentationThreshold Selection for Image segmentation
Threshold Selection for Image segmentation
 
Sign Language Recognition using Mediapipe
Sign Language Recognition using MediapipeSign Language Recognition using Mediapipe
Sign Language Recognition using Mediapipe
 
NOISE FILTERS IN IMAGE PROCESSING
NOISE FILTERS IN IMAGE PROCESSINGNOISE FILTERS IN IMAGE PROCESSING
NOISE FILTERS IN IMAGE PROCESSING
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
Presentation of Lossy compression
Presentation of Lossy compressionPresentation of Lossy compression
Presentation of Lossy compression
 

Viewers also liked

Digital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial DomainDigital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial Domain
Mostafa G. M. Mostafa
 
Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)
asodariyabhavesh
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
Ayaelshiwi
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
DEEPASHRI HK
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
sakshij91
 
Image enhancement using alpha rooting based hybrid technique
Image enhancement using alpha rooting based hybrid techniqueImage enhancement using alpha rooting based hybrid technique
Image enhancement using alpha rooting based hybrid technique
Rahul Yadav
 
04 image enhancement in spatial domain DIP
04 image enhancement in spatial domain DIP04 image enhancement in spatial domain DIP
04 image enhancement in spatial domain DIP
babak danyal
 
Spatial enhancement
Spatial enhancement Spatial enhancement
Spatial enhancement
abinarkt
 
COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...
COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...
COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...
Hemantha Kulathilake
 
Digital Image Processing: Image Restoration
Digital Image Processing: Image RestorationDigital Image Processing: Image Restoration
Digital Image Processing: Image Restoration
Mostafa G. M. Mostafa
 
Digital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency DomainDigital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency Domain
Mostafa G. M. Mostafa
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
Saideep
 
Management scenario
Management scenarioManagement scenario
Management scenario
envifisheries
 
Fitbit
FitbitFitbit
Fitbit
cathycrabb
 
Agents, Teams and the Future
Agents, Teams and the FutureAgents, Teams and the Future
Agents, Teams and the Future
Jeff Kramer
 
Noa Noa Journal Autumn 2012
Noa Noa Journal Autumn 2012Noa Noa Journal Autumn 2012
Noa Noa Journal Autumn 2012
NoaNoa1
 
Measuring the Influence of Tag Recommenders on the Indexing Quality in Taggin...
Measuring the Influence of Tag Recommenders on the Indexing Quality in Taggin...Measuring the Influence of Tag Recommenders on the Indexing Quality in Taggin...
Measuring the Influence of Tag Recommenders on the Indexing Quality in Taggin...
Klaas Dellschaft
 
Presentation
PresentationPresentation
Presentation
Kiran Ghosh
 
Streaming architecture zx_dec2015
Streaming architecture zx_dec2015Streaming architecture zx_dec2015
Streaming architecture zx_dec2015
Zhenzhong Xu
 

Viewers also liked (20)

Digital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial DomainDigital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial Domain
 
Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
 
Image enhancement using alpha rooting based hybrid technique
Image enhancement using alpha rooting based hybrid techniqueImage enhancement using alpha rooting based hybrid technique
Image enhancement using alpha rooting based hybrid technique
 
04 image enhancement in spatial domain DIP
04 image enhancement in spatial domain DIP04 image enhancement in spatial domain DIP
04 image enhancement in spatial domain DIP
 
Spatial enhancement
Spatial enhancement Spatial enhancement
Spatial enhancement
 
COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...
COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...
COM2304: Intensity Transformation and Spatial Filtering – II Spatial Filterin...
 
Digital Image Processing: Image Restoration
Digital Image Processing: Image RestorationDigital Image Processing: Image Restoration
Digital Image Processing: Image Restoration
 
Digital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency DomainDigital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency Domain
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
 
Management scenario
Management scenarioManagement scenario
Management scenario
 
Fitbit
FitbitFitbit
Fitbit
 
Agents, Teams and the Future
Agents, Teams and the FutureAgents, Teams and the Future
Agents, Teams and the Future
 
Asaco pla salut 2013
Asaco pla salut 2013Asaco pla salut 2013
Asaco pla salut 2013
 
Noa Noa Journal Autumn 2012
Noa Noa Journal Autumn 2012Noa Noa Journal Autumn 2012
Noa Noa Journal Autumn 2012
 
Measuring the Influence of Tag Recommenders on the Indexing Quality in Taggin...
Measuring the Influence of Tag Recommenders on the Indexing Quality in Taggin...Measuring the Influence of Tag Recommenders on the Indexing Quality in Taggin...
Measuring the Influence of Tag Recommenders on the Indexing Quality in Taggin...
 
Presentation
PresentationPresentation
Presentation
 
Streaming architecture zx_dec2015
Streaming architecture zx_dec2015Streaming architecture zx_dec2015
Streaming architecture zx_dec2015
 

Similar to image_enhancement_spatial

Image enhancement
Image enhancementImage enhancement
Intensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringIntensity Transformation and Spatial filtering
Intensity Transformation and Spatial filtering
Shajun Nisha
 
Matlab intro
Matlab introMatlab intro
Matlab intro
fvijayami
 
Gonzalez, rafael,c.digitalimageprocessingusing matlab
Gonzalez, rafael,c.digitalimageprocessingusing matlabGonzalez, rafael,c.digitalimageprocessingusing matlab
Gonzalez, rafael,c.digitalimageprocessingusing matlab
urmia university of technology
 
chapter-2 SPACIAL DOMAIN.pptx
chapter-2 SPACIAL DOMAIN.pptxchapter-2 SPACIAL DOMAIN.pptx
chapter-2 SPACIAL DOMAIN.pptx
AyeleFeyissa1
 
image processing intensity transformation
image processing intensity transformationimage processing intensity transformation
image processing intensity transformation
alobaidimki
 
Image enhancement ppt nal2
Image enhancement ppt nal2Image enhancement ppt nal2
Image enhancement ppt nal2
Surabhi Ks
 
Point Processing
Point ProcessingPoint Processing
Point Processing
Gowrishankar S
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
Kuppusamy P
 
Dip3
Dip3Dip3
point processing
point processingpoint processing
point processing
Rumah Belajar
 
Image Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.pptImage Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.ppt
ShabanamTamboli1
 
Image Processing using Matlab . Useful for beginners to learn Image Processing
Image Processing using Matlab . Useful for beginners to learn Image ProcessingImage Processing using Matlab . Useful for beginners to learn Image Processing
Image Processing using Matlab . Useful for beginners to learn Image Processing
Ashok Kumar
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portion
Moe Moe Myint
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdf
nagwaAboElenein
 
Mathematical tools in dip
Mathematical tools in dipMathematical tools in dip
Image enhancement
Image enhancementImage enhancement
Image enhancement
shabanam tamboli
 
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSINGLAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
Priyanka Rathore
 
DIP Lecture 7-9.pdf
DIP Lecture 7-9.pdfDIP Lecture 7-9.pdf
DIP Lecture 7-9.pdf
SAhsanShahBukhari
 
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTUUNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
ankushspencer015
 

Similar to image_enhancement_spatial (20)

Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Intensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringIntensity Transformation and Spatial filtering
Intensity Transformation and Spatial filtering
 
Matlab intro
Matlab introMatlab intro
Matlab intro
 
Gonzalez, rafael,c.digitalimageprocessingusing matlab
Gonzalez, rafael,c.digitalimageprocessingusing matlabGonzalez, rafael,c.digitalimageprocessingusing matlab
Gonzalez, rafael,c.digitalimageprocessingusing matlab
 
chapter-2 SPACIAL DOMAIN.pptx
chapter-2 SPACIAL DOMAIN.pptxchapter-2 SPACIAL DOMAIN.pptx
chapter-2 SPACIAL DOMAIN.pptx
 
image processing intensity transformation
image processing intensity transformationimage processing intensity transformation
image processing intensity transformation
 
Image enhancement ppt nal2
Image enhancement ppt nal2Image enhancement ppt nal2
Image enhancement ppt nal2
 
Point Processing
Point ProcessingPoint Processing
Point Processing
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Dip3
Dip3Dip3
Dip3
 
point processing
point processingpoint processing
point processing
 
Image Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.pptImage Enhancement in the Spatial Domain1.ppt
Image Enhancement in the Spatial Domain1.ppt
 
Image Processing using Matlab . Useful for beginners to learn Image Processing
Image Processing using Matlab . Useful for beginners to learn Image ProcessingImage Processing using Matlab . Useful for beginners to learn Image Processing
Image Processing using Matlab . Useful for beginners to learn Image Processing
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portion
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdf
 
Mathematical tools in dip
Mathematical tools in dipMathematical tools in dip
Mathematical tools in dip
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSINGLAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
 
DIP Lecture 7-9.pdf
DIP Lecture 7-9.pdfDIP Lecture 7-9.pdf
DIP Lecture 7-9.pdf
 
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTUUNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
UNIT-2 image enhancement.pdf Image Processing Unit 2 AKTU
 

Recently uploaded

Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
paigestewart1632
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 

Recently uploaded (20)

Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 

image_enhancement_spatial

  • 1. CIS 601 Image ENHANCEMENT in the SPATIAL DOMAIN Dr. Rolf Lakaemper
  • 2. Most of these slides base on the book Digital Image Processing by Gonzales/Woods Chapter 3
  • 3. Introduction Image Enhancement ? • enhance otherwise hidden information • Filter important image features • Discard unimportant image features Spatial Domain ? • Refers to the image plane (the ‘natural’ image) • Direct image manipulation
  • 4. Remember ? A 2D grayvalue - image is a 2D -> 1D function, v = f(x,y)
  • 5. Remember ? As we have a function, we can apply operators to this function, e.g. T(f(x,y)) = f(x,y) / 2 Operator Image (= function !)
  • 6. Remember ? T transforms the given image f(x,y) into another image g(x,y) f(x,y) g(x,y)
  • 7. Spatial Domain The operator T can be defined over • The set of pixels (x,y) of the image • The set of ‘neighborhoods’ N(x,y) of each pixel • A set of images f1,f2,f3,…
  • 8. Spatial Domain Operation on the set of image-pixels 6 8 2 0 3 4 1 0 12 200 20 10 6 100 10 5 (Operator: Div. by 2)
  • 9. Spatial Domain Operation on the set of ‘neighborhoods’ N(x,y) of each pixel 6 8 (Operator: sum) 12 200 6 8 2 0 226 12 200 20 10
  • 10. Spatial Domain Operation on a set of images f1,f2,… 6 8 2 0 12 200 20 10 (Operator: sum) 11 13 3 0 14 220 23 14 5 5 1 0 2 20 3 4
  • 11. Spatial Domain Operation on the set of image-pixels Remark: these operations can also be seen as operations on the neighborhood of a pixel (x,y), by defining the neighborhood as the pixel itself. • The simplest case of operators • g(x,y) = T(f(x,y)) depends only on the value of f at (x,y) • T is called a gray-level or intensity transformation function
  • 12. Transformations Basic Gray Level Transformations • Image Negatives • Log Transformations • Power Law Transformations • Piecewise-Linear Transformation Functions For the following slides L denotes the max. possible gray value of the image, i.e. f(x,y) ∈ [0,L]
  • 13. Transformations Image Negatives: T(f)= L-f T(f)=L-f Output gray level Input gray level
  • 14. Transformations Log Transformations: T(f) = c * log (1+ f)
  • 15. Transformations Log Transformations InvLog Log
  • 16. Transformations Log Transformations
  • 17. Transformations Power Law Transformations T(f) = c*f γ
  • 18. Transformations • varying gamma (γ) obtains family of possible transformation curves ∀γ > 0 • Compresses dark values • Expands bright values ∀γ < 0 • Expands dark values • Compresses bright values
  • 19. Transformations • Used for gamma-correction
  • 20. Transformations • Used for general purpose contrast manipulation
  • 21. Transformations Piecewise Linear Transformations
  • 22. Piecewise Linear Transformations Thresholding Function g(x,y) = L if f(x,y) > t, 0 else t = ‘threshold level’ Output gray level Input gray level
  • 23. Piecewise Linear Transformations Gray Level Slicing Purpose: Highlight a specific range of grayvalues Two approaches: 7. Display high value for range of interest, low value else (‘discard background’) 9. Display high value for range of interest, original value else (‘preserve background’)
  • 24. Piecewise Linear Transformations Gray Level Slicing
  • 25. Piecewise Linear Transformations Bitplane Slicing Extracts the information of a single bitplane
  • 27. Piecewise Linear Transformations Exercise: • How does the transformation function look for bitplanes 0,1,… ? • What is the easiest way to filter a single bitplane (e.g. in MATLAB) ?
  • 28. Histograms Histogram Processing 1 4 5 0 3 1 5 1 Number of Pixels gray level
  • 29. Histograms Histogram Equalization: • Preprocessing technique to enhance contrast in ‘natural’ images • Target: find gray level transformation function T to transform image f such that the histogram of T(f) is ‘equalized’
  • 30. Histogram Equalization Equalized Histogram: The image consists of an equal number of pixels for every gray- value, the histogram is constant !
  • 31. Histogram Equalization Example: T We are looking for this transformation !
  • 32. Histogram Equalization Target: Find a transformation T to transform the grayvalues g1∈[0..1] of an image I to grayvalues g2 = T(g1) such that the histogram is equalized, i.e. there’s an equal amount of pixels for each grayvalue. Observation (continous model !): Assumption: Total image area = 1 (normalized). Then: The area(!) of pixels of the transformed image in the gray-value range 0..g2 equals the gray-value g2.
  • 33. Histogram Equalization The area(!) of pixels of the transformed image in the gray- value range 0..g2 equals the gray-value g2. ⇒ Every g1 is transformed to a grayvalue that equals the area (discrete: number of pixels) in the image covered by pixels having gray-values from 0 to g1. ⇒ The transformation T function t is the area- integral: T: g2 = ∫ 0..g1 I da
  • 34. Histogram Equalization Discrete: g1 is mapped to the (normalized) number of pixels having grayvalues 0..g1 .
  • 35. Histogram Equalization Mathematically the transformation is deducted by theorems in continous (not discrete) spaces. The results achieved do NOT hold for discrete spaces ! (Why ?) However, it’s visually close.
  • 36. Histogram Equalization Conclusion: • The transformation function that yields an image having an equalized histogram is the integral of the histogram of the source-image • The discrete integral is given by the cumulative sum, MATLAB function: cumsum() • The function transforms an image into an image, NOT a histogram into a histogram ! The histogram is just a control tool ! • In general the transformation does not create an image with an equalized histogram in the discrete case !
  • 37. Operations on a set of images Operation on a set of images f1,f2,… 6 8 2 0 12 200 20 10 (Operator: sum) 11 13 3 0 14 220 23 14 5 5 1 0 2 20 3 4
  • 38. Operations on a set of images Logic (Bitwise) Operations AND OR NOT
  • 39. Operations on a set of images The operators AND,OR,NOT are functionally complete: Any logic operator can be implemented using only these 3 operators
  • 40. Operations on a set of images Any logic operator can be implemented using only these 3 operators: A B Op 0 0 1 Op= NOT(A) AND NOT(B) 0 1 1 OR 1 0 0 NOT(A) AND B 1 1 0
  • 41. Operations on a set of images Image 1 AND Image 2 1 2 3 9 7 3 6 4 (Operator: AND) 1 0 1 1 2 2 2 0 1 1 1 1 2 2 2 2
  • 42. Operations on a set of images Image 1 AND Image 2: Used for Bitplane-Slicing and Masking
  • 43. Operations on a set of images Exercise: Define the mask-image, that transforms image1 into image2 using the OR operand 1 2 3 9 7 3 6 4 (Operator: OR) 255 2 7 255 255 3 7 255
  • 44. Operations Arithmetic Operations on a set of images 1 2 3 9 7 3 6 4 (Operator: +) 2 3 4 10 9 5 8 6 1 1 1 1 2 2 2 2
  • 45. Operations Exercise: What could the operators + and – be used for ?
  • 46. Operations (MATLAB) Example: Operator – Foreground-Extraction
  • 47. Operations (MATLAB) Example: Operator + Image Averaging
  • 48. CIS 601 Image ENHANCEMENT in the SPATIAL DOMAIN Part 2
  • 49. Histograms So far (part 1) : • Histogram definition • Histogram equalization Now: • Histogram statistics
  • 50. Histograms Remember: The histogram shows the number of pixels having a certain gray-value number of pixels grayvalue (0..1)
  • 51. Histograms The NORMALIZED histogram is the histogram divided by the total number of pixels in the source image. The sum of all values in the normalized histogram is 1. The value given by the normalized histogram for a certain gray value can be read as the probability of randomly picking a pixel having that gray value
  • 52. Histograms What can the (normalized) histogram tell about the image ?
  • 53. Histograms • The MEAN VALUE (or average gray level) M = Σ g h(g) g 1*0.3+2*0.1+3*0.2+4*0.1+5*0.2+6*0.1= 0.3 0.2 2.6 0.1 0.0 1 2 3 4 5 6
  • 54. Histograms The MEAN value is the average gray value of the image, the ‘overall brightness appearance’.
  • 55. Histograms 2. The VARIANCE V = Σ (g-M)2 h(g) g (with M = mean) or similar: The STANDARD DEVIATION D = sqrt(V)
  • 56. Histograms VARIANCE gives a measure about the distribution of the histogram values around the mean. 0.3 0.3 0.2 0.2 0.1 0.1 0.0 0.0 V1 > V2
  • 57. Histograms The STANDARD DEVIATION is a value on the gray level axis, showing the average distance of all pixels to the mean 0.3 0.3 0.2 0.2 0.1 0.1 0.0 0.0 D1 > D2
  • 58. Histograms VARIANCE and STANDARD DEVIATION of the histogram tell us about the average contrast of the image ! The higher the VARIANCE (=the higher the STANDARD DEVIATION), the higher the image’s contrast !
  • 59. Histograms Example: Image and blurred version
  • 60. Histograms Histograms with MEAN and STANDARD DEVIATION M=0.73 D=0.32 M=0.71 D=0.27
  • 61. Histograms Exercise: Design an autofocus system for a digital camera ! The system should analyse an area in the middle of the picture and automatically adjust the lens such that this area is sharp.
  • 62. Histograms In between the basics… …histograms can give us a first hint how to create image databases:
  • 63. Feature Based Coding Feature Based Coding • Determine a feature-vector for a given image • Compare images by their feature-vectors Two operations need to be defined: a mapping of shape into the feature space and a similarity of feature vectors. Representation Feature Extraction Vector Comparison Where are the histograms ?
  • 64. Feature Based Coding Feature Based Coding • Determine a feature-vector for a given image • Compare images by their feature-vectors Two operations need to be defined: a mapping of shape into the feature space and a similarity of feature vectors. Representation HISTOGRAM Histogram Comp. HERE ! Question: how can we compare histograms (vectors) ?
  • 65. Vector Comparison Vector Comparison ,
  • 68. Vector Comparison What’s the meaning of the Cosine Distance with respect to histograms ? i.e.: what’s the consequence of eliminating the vector’s length information ?
  • 69. Vector Comparison More Vector Distances: • Quadratic Form Distance • Earth Movers Distance • Proportional Transportation Distance •…
  • 70. Vector Comparison Histogram Intersection (non symmetric): d(h1,h2) = 1 - ∑ min(h1 ,h2 ) i i i / ∑i h1i Ex.: What could be a huge drawback of image comparison using histogram intersection ?
  • 71. Histograms Exercise: Outline an image database system, using statistical (histogram) information
  • 72. Histograms Discussion: Which problems could occur if the database consists of the following images ?
  • 74. Spatial Filtering End of histograms. And now to something completely different …