SlideShare une entreprise Scribd logo
1  sur  74
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 …

Contenu connexe

Tendances

Lecture11
Lecture11Lecture11
Lecture11zukun
 
Image Filtering in the Frequency Domain
Image Filtering in the Frequency DomainImage Filtering in the Frequency Domain
Image Filtering in the Frequency DomainAmnaakhaan
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and SegmentationA B Shinde
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniquesBulbul Agrawal
 
Image Restoration And Reconstruction
Image Restoration And ReconstructionImage Restoration And Reconstruction
Image Restoration And ReconstructionAmnaakhaan
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image FundamentalsKalyan Acharjya
 
Chapter 6 color image processing
Chapter 6 color image processingChapter 6 color image processing
Chapter 6 color image processingasodariyabhavesh
 
Digital Image Processing_ ch2 enhancement spatial-domain
Digital Image Processing_ ch2 enhancement spatial-domainDigital Image Processing_ ch2 enhancement spatial-domain
Digital Image Processing_ ch2 enhancement spatial-domainMalik obeisat
 
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...Hemantha Kulathilake
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentationasodariyabhavesh
 
Chapter 8 image compression
Chapter 8 image compressionChapter 8 image compression
Chapter 8 image compressionasodariyabhavesh
 
Image pre processing - local processing
Image pre processing - local processingImage pre processing - local processing
Image pre processing - local processingAshish Kumar
 
Interpixel redundancy
Interpixel redundancyInterpixel redundancy
Interpixel redundancyNaveen Kumar
 
Digital Image restoration
Digital Image restorationDigital Image restoration
Digital Image restorationMd Shabir Alam
 

Tendances (20)

Lecture11
Lecture11Lecture11
Lecture11
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Image Filtering in the Frequency Domain
Image Filtering in the Frequency DomainImage Filtering in the Frequency Domain
Image Filtering in the Frequency Domain
 
image enhancement
 image enhancement image enhancement
image enhancement
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and Segmentation
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniques
 
Image Restoration And Reconstruction
Image Restoration And ReconstructionImage Restoration And Reconstruction
Image Restoration And Reconstruction
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image Fundamentals
 
Chapter 6 color image processing
Chapter 6 color image processingChapter 6 color image processing
Chapter 6 color image processing
 
Digital Image Processing_ ch2 enhancement spatial-domain
Digital Image Processing_ ch2 enhancement spatial-domainDigital Image Processing_ ch2 enhancement spatial-domain
Digital Image Processing_ ch2 enhancement spatial-domain
 
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
 
Image restoration and reconstruction
Image restoration and reconstructionImage restoration and reconstruction
Image restoration and reconstruction
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
 
Chapter 8 image compression
Chapter 8 image compressionChapter 8 image compression
Chapter 8 image compression
 
Mathematical tools in dip
Mathematical tools in dipMathematical tools in dip
Mathematical tools in dip
 
Image pre processing - local processing
Image pre processing - local processingImage pre processing - local processing
Image pre processing - local processing
 
Segmentation
SegmentationSegmentation
Segmentation
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Interpixel redundancy
Interpixel redundancyInterpixel redundancy
Interpixel redundancy
 
Digital Image restoration
Digital Image restorationDigital Image restoration
Digital Image restoration
 

En vedette

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 DomainMostafa 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 enhancementAyaelshiwi
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial DomainDEEPASHRI HK
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniquessakshij91
 
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 techniqueRahul 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 DIPbabak 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 RestorationMostafa 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 DomainMostafa G. M. Mostafa
 
Image enhancement techniques
Image enhancement techniquesImage enhancement techniques
Image enhancement techniquesSaideep
 
Agents, Teams and the Future
Agents, Teams and the FutureAgents, Teams and the Future
Agents, Teams and the FutureJeff Kramer
 
Noa Noa Journal Autumn 2012
Noa Noa Journal Autumn 2012Noa Noa Journal Autumn 2012
Noa Noa Journal Autumn 2012NoaNoa1
 
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
 
Streaming architecture zx_dec2015
Streaming architecture zx_dec2015Streaming architecture zx_dec2015
Streaming architecture zx_dec2015Zhenzhong Xu
 

En vedette (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
 

Similaire à image_enhancement_spatial

Matlab intro
Matlab introMatlab intro
Matlab introfvijayami
 
chapter-2 SPACIAL DOMAIN.pptx
chapter-2 SPACIAL DOMAIN.pptxchapter-2 SPACIAL DOMAIN.pptx
chapter-2 SPACIAL DOMAIN.pptxAyeleFeyissa1
 
4.intensity transformations
4.intensity transformations4.intensity transformations
4.intensity transformationsYahya Alkhaldi
 
image processing intensity transformation
image processing intensity transformationimage processing intensity transformation
image processing intensity transformationalobaidimki
 
Image enhancement ppt nal2
Image enhancement ppt nal2Image enhancement ppt nal2
Image enhancement ppt nal2Surabhi Ks
 
Image enhancement
Image enhancementImage enhancement
Image enhancementKuppusamy P
 
Image enhancement in the spatial domain1
Image enhancement in the spatial domain1Image enhancement in the spatial domain1
Image enhancement in the spatial domain1shabanam tamboli
 
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.pptShabanamTamboli1
 
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 ProcessingAshok Kumar
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portionMoe Moe Myint
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfnagwaAboElenein
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit NotesAAKANKSHA JAIN
 
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSINGLAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSINGPriyanka Rathore
 

Similaire à image_enhancement_spatial (20)

Image enhancement
Image enhancementImage enhancement
Image enhancement
 
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
 
4.intensity transformations
4.intensity transformations4.intensity transformations
4.intensity transformations
 
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
Image enhancement in the spatial domain1Image enhancement in the spatial domain1
Image enhancement in the spatial domain1
 
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
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit Notes
 
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
 

Dernier

Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 

Dernier (20)

Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 

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 …