SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Downloaden Sie, um offline zu lesen
Robert Collins
CSE486




                     Lecture 11:
                 LoG and DoG Filters
Robert Collins
CSE486
                       Today’s Topics

       Laplacian of Gaussian (LoG) Filter
        - useful for finding edges
        - also useful for finding blobs!

       approximation using Difference of Gaussian (DoG)
Robert Collins

                 Recall: First Derivative Filters
CSE486




         • Sharp changes in gray level of the input
           image correspond to “peaks or valleys” of
           the first-derivative of the input signal.

                  F(x)
                                    F ’(x)




                                                  x
         (1D example)

O.Camps, PSU
Robert Collins
CSE486
                 Second-Derivative Filters

        • Peaks or valleys of the first-derivative of the
          input signal, correspond to “zero-crossings”
          of the second-derivative of the input signal.

     F(x)                   F ’(x)              F’’(x)




                                          x

O.Camps, PSU
Robert Collins
CSE486
                   Numerical Derivatives
                       See also T&V, Appendix A.2

       Taylor Series expansion


    add




                                    Central difference approx
                     1 -2     1
                                     to second derivative
Robert Collins
CSE486
                 Example: Second Derivatives
                                                  Ixx=d2I(x,y)/dx2

                        [ 1 -2 1 ]
    I(x,y)
                        2nd Partial deriv wrt x



                                1
                               -2
                                1                 Iyy=d2I(x,y)/dy2
                        2nd Partial deriv wrt y
Robert Collins
CSE486
                 Example: Second Derivatives
                 Ixx                            Iyy




                                 benefit: you get clear localization of
                                 the edge, as opposed to the “smear”
                                 of high gradient magnitude values
                                 across an edge
Robert Collins
CSE486
                 Compare: 1st vs 2nd Derivatives
Ixx                            Iyy




Ix                             Iy
Robert Collins
CSE486
                    Finding Zero-Crossings
       An alternative approx to finding edges as peaks in
       first deriv is to find zero-crossings in second deriv.
       In 1D, convolve with [1 -2 1] and look for pixels
       where response is (nearly) zero?
       Problem: when first deriv is zero, so is second. I.e.
       the filter [1 -2 1] also produces zero when convolved
       with regions of constant intensity.

       So, in 1D, convolve with [1 -2 1] and look for pixels
       where response is nearly zero AND magnitude of
       first derivative is “large enough”.
Edge Detection Summary
Robert Collins
CSE486


                          1D                                       2D
                                                                        y
 step edge


                               F(x)
                       I(x)                          I(x,y)    x
                                           x
 2nd deriv 1st deriv




                       dI(x)                   |∇I(x,y)| =(Ix 2(x,y) + Iy2(x,y))1/2 > Th
                                      > Th
                        dx                       tan θ = Ix(x,y)/ Iy(x,y)


                        d2I(x)        =0         ∇2I(x,y) =Ix x (x,y) + Iyy (x,y)=0
                         dx2
                                                            Laplacian
Robert Collins
CSE486
                 Finite Difference Laplacian




                   Laplacian filter ∇2I(x,y)
Robert Collins
CSE486
                          Example: Laplacian
                 I(x,y)
                                          Ixx + Iyy
Robert Collins
CSE486
                       Example: Laplacian
                 Ixx                        Iyy




                                        Ixx+Iyy
                                        ∇2I(x,y)
Robert Collins
CSE486
                     Notes about the Laplacian:
       •  ∇2I(x,y) is a SCALAR
          – ↑ Can be found using a SINGLE mask
          – ↓ Orientation information is lost
       • ∇2I(x,y) is the sum of SECOND-order derivatives
          – But taking derivatives increases noise
          – Very noise sensitive!
       • It is always combined with a smoothing operation:




                 I(x,y)                                      O(x,y)
                           Smooth          Laplacian



O.Camps, PSU
Robert Collins
CSE486
                                   LoG Filter
         • First smooth (Gaussian filter),
         • Then, find zero-crossings (Laplacian filter):
                 – O(x,y) = ∇2(I(x,y) * G(x,y))




     Laplacian of                          Laplacian of Gaussian (LoG)
     Gaussian-filtered image               -filtered image
                           Do you see the distinction?
O.Camps, PSU
Robert Collins
CSE486
                 1D Gaussian and Derivatives
                              x2
                         −
                             2σ 2
            g ( x) = e

                                x2              x2
                1             − 2       x     − 2
   g ' ( x) = − 2 2 xe         2σ
                                     =− 2 e    2σ
               2σ                      σ

                  2                  x2
                  x    1 − 2σ 2
   g ' ' ( x ) = ( 4 − 2 )e
                  σ3 σ

O.Camps, PSU
Robert Collins
CSE486
                 Second Derivative of a Gaussian

                                2               x2
                                  x    1      − 2
                   g ' ' ( x ) = ( 4 − 2 )e
                                    3
                                               2σ
                                  σ   σ

                                 2D
                                 analog




                                          LoG “Mexican Hat”

O.Camps, PSU
Robert Collins
CSE486
                     Effect of LoG Operator
                 Original                     LoG-filtered




      Band-Pass Filter (suppresses both high and low frequencies)
      Why? Easier to explain in a moment.
Robert Collins
CSE486
                 Zero-Crossings as an Edge Detector
                  Raw zero-crossings (no contrast thresholding)




                                 LoG sigma = 2, zero-crossing
Robert Collins
CSE486
                 Zero-Crossings as an Edge Detector
                  Raw zero-crossings (no contrast thresholding)




                                 LoG sigma = 4, zero-crossing
Robert Collins
CSE486
                 Zero-Crossings as an Edge Detector
                  Raw zero-crossings (no contrast thresholding)




                                 LoG sigma = 8, zero-crossing
Robert Collins
CSE486
                        Note: Closed Contours
            You may have noticed that zero-crossings form
            closed contours. It is easy to see why…

     Think of equal-elevation
     contours on a topo map.

     Each is a closed contour.
     Zero-crossings are contours
     at elevation = 0 .

         remember that in our case, the height map is of a LoG filtered
         image - a surface with both positive and negative “elevations”
Robert Collins
CSE486                  Other uses of LoG:
                          Blob Detection




                 Lindeberg: ``Feature detection with automatic
                 scale selection''. International Journal of
                 Computer Vision, vol 30, number 2, pp. 77--
                 116, 1998.
Robert Collins
CSE486
                 Pause to Think for a Moment:


                 How can an edge finder also be used to
                 find blobs in an image?
Robert Collins
CSE486
                 Example: LoG Extrema

   LoG                           maxima
sigma = 2




                                  minima
Robert Collins
CSE486
                 LoG Extrema, Detail
                                        maxima




                               LoG sigma = 2
Robert Collins
CSE486
                         LoG Blob Finding
       LoG filter extrema locates “blobs”
           maxima = dark blobs on light background
           minima = light blobs on dark background

       Scale of blob (size ; radius in pixels) is determined
       by the sigma parameter of the LoG filter.




                 LoG sigma = 2              LoG sigma = 10
Robert Collins
CSE486
                 Observe and Generalize
     convolve                        result
     with LoG




                                  maxima
Robert Collins
CSE486
                 Observe and Generalize

                                  LoG looks a bit
                                  like an eye.




                                  and it responds
                                  maximally in the
                                  eye region!
Robert Collins
CSE486
                       Observe and Generalize
                 LoG               Derivative of Gaussian




       Looks like dark blob         Looks like vertical and
       on light background          horizontal step edges

         Recall: Convolution (and cross correlation) with a
         filter can be viewed as comparing a little “picture” of
         what you want to find against all local regions in the
         mage.
Robert Collins
CSE486
                        Observe and Generalize
      Key idea: Cross correlation with a filter can be viewed
      as comparing a little “picture” of what you want to find
      against all local regions in the image.




           Maximum response:                Maximum response:
            dark blob on light background    vertical edge; lighter on left
           Minimum response:                Minimum response:
            light blob on dark background    vertical edge; lighter on right
Robert Collins
CSE486             Efficient Implementation
                 Approximating LoG with DoG
       LoG can be approximate by a Difference of two
       Gaussians (DoG) at different scales




                          1D example


M.Hebert, CMU
Robert Collins
CSE486
                  Efficient Implementation

       LoG can be approximate by a Difference of two
       Gaussians (DoG) at different scales.

       Separability of and cascadability of Gaussians applies
       to the DoG, so we can achieve efficient implementation
       of the LoG operator.

       DoG approx also explains bandpass filtering of LoG
       (think about it. Hint: Gaussian is a low-pass filter)
Robert Collins
CSE486
                 Back to Blob Detection




                        Lindeberg: blobs are detected
                        as local extrema in space and
                        scale, within the LoG (or DoG)
                        scale-space volume.
Robert Collins
CSE486
                 Other uses of LoG:
                   Blob Detection




                         Gesture recognition for
                         the ultimate couch potato
Robert Collins
CSE486
                       Other uses for LOG:
                          Image Coding
         • Coarse layer of the Gaussian pyramid predicts the
           appearance of the next finer layer.
         • The prediction is not exact, but means that it is not
           necessary to store all of the next fine scale layer.
         • Laplacian pyramid stores the difference.
Robert Collins
CSE486
                            Other uses for LOG:
                               Image Coding
                  256x256      128x128          64x64            32x32




                                                            takes less bits to store
                                                            compressed versions of
                                                            these than to compress
                                                            the original full-res
                 256x256      128x128          64x64        greyscale image


     The Laplacian Pyramid as a Compact Image Code Burt, P., and Adelson, E. H.,
     IEEE Transactions on Communication, COM-31:532-540 (1983).

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to image contrast and enhancement method
Introduction to image contrast and enhancement methodIntroduction to image contrast and enhancement method
Introduction to image contrast and enhancement methodAbhishekvb
 
Chapter 8 image compression
Chapter 8 image compressionChapter 8 image compression
Chapter 8 image compressionasodariyabhavesh
 
Enhancement in frequency domain
Enhancement in frequency domainEnhancement in frequency domain
Enhancement in frequency domainAshish Kumar
 
Hough Transform By Md.Nazmul Islam
Hough Transform By Md.Nazmul IslamHough Transform By Md.Nazmul Islam
Hough Transform By Md.Nazmul IslamNazmul Islam
 
Image Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain FiltersImage Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain FiltersKarthika Ramachandran
 
Chapter 6 Image Processing: Image Enhancement
Chapter 6 Image Processing: Image EnhancementChapter 6 Image Processing: Image Enhancement
Chapter 6 Image Processing: Image EnhancementVarun Ojha
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domainAshish Kumar
 
Filtering an image is to apply a convolution
Filtering an image is to apply a convolutionFiltering an image is to apply a convolution
Filtering an image is to apply a convolutionAbhishek Mukherjee
 
Image processing7 frequencyfiltering
Image processing7 frequencyfilteringImage processing7 frequencyfiltering
Image processing7 frequencyfilteringshabanam tamboli
 
Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards
Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standardsComparison between JPEG(DCT) and JPEG 2000(DWT) compression standards
Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standardsRishab2612
 
Morphological Image Processing
Morphological Image ProcessingMorphological Image Processing
Morphological Image Processingkumari36
 
08 frequency domain filtering DIP
08 frequency domain filtering DIP08 frequency domain filtering DIP
08 frequency domain filtering DIPbabak danyal
 
Image enhancement sharpening
Image enhancement  sharpeningImage enhancement  sharpening
Image enhancement sharpeningarulraj121
 
Intensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringIntensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringShajun Nisha
 

Was ist angesagt? (20)

Introduction to image contrast and enhancement method
Introduction to image contrast and enhancement methodIntroduction to image contrast and enhancement method
Introduction to image contrast and enhancement method
 
Chapter 8 image compression
Chapter 8 image compressionChapter 8 image compression
Chapter 8 image compression
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
image enhancement
 image enhancement image enhancement
image enhancement
 
Enhancement in frequency domain
Enhancement in frequency domainEnhancement in frequency domain
Enhancement in frequency domain
 
Hough Transform By Md.Nazmul Islam
Hough Transform By Md.Nazmul IslamHough Transform By Md.Nazmul Islam
Hough Transform By Md.Nazmul Islam
 
Image Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain FiltersImage Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain Filters
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Spatial filtering
Spatial filteringSpatial filtering
Spatial filtering
 
Chapter 6 Image Processing: Image Enhancement
Chapter 6 Image Processing: Image EnhancementChapter 6 Image Processing: Image Enhancement
Chapter 6 Image Processing: Image Enhancement
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domain
 
Filtering an image is to apply a convolution
Filtering an image is to apply a convolutionFiltering an image is to apply a convolution
Filtering an image is to apply a convolution
 
Spatial filtering
Spatial filteringSpatial filtering
Spatial filtering
 
Image processing7 frequencyfiltering
Image processing7 frequencyfilteringImage processing7 frequencyfiltering
Image processing7 frequencyfiltering
 
Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards
Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standardsComparison between JPEG(DCT) and JPEG 2000(DWT) compression standards
Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards
 
Morphological Image Processing
Morphological Image ProcessingMorphological Image Processing
Morphological Image Processing
 
08 frequency domain filtering DIP
08 frequency domain filtering DIP08 frequency domain filtering DIP
08 frequency domain filtering DIP
 
Image enhancement sharpening
Image enhancement  sharpeningImage enhancement  sharpening
Image enhancement sharpening
 
Intensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringIntensity Transformation and Spatial filtering
Intensity Transformation and Spatial filtering
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 

Ähnlich wie Lecture11

Engr 371 final exam april 2010
Engr 371 final exam april 2010Engr 371 final exam april 2010
Engr 371 final exam april 2010amnesiann
 
IVR - Chapter 2 - Basics of filtering I: Spatial filters (25Mb)
IVR - Chapter 2 - Basics of filtering I: Spatial filters (25Mb) IVR - Chapter 2 - Basics of filtering I: Spatial filters (25Mb)
IVR - Chapter 2 - Basics of filtering I: Spatial filters (25Mb) Charles Deledalle
 
Alternating direction
Alternating directionAlternating direction
Alternating directionDerek Pang
 
Existence of Hopf-Bifurcations on the Nonlinear FKN Model
Existence of Hopf-Bifurcations on the Nonlinear FKN ModelExistence of Hopf-Bifurcations on the Nonlinear FKN Model
Existence of Hopf-Bifurcations on the Nonlinear FKN ModelIJMER
 
03_spectral_computing.pdf
03_spectral_computing.pdf03_spectral_computing.pdf
03_spectral_computing.pdfBruno Levy
 
Brilliant Polymer Scientist-Nantes-2011
Brilliant Polymer Scientist-Nantes-2011Brilliant Polymer Scientist-Nantes-2011
Brilliant Polymer Scientist-Nantes-2011malcolmmackley
 
CS 354 Global Illumination
CS 354 Global IlluminationCS 354 Global Illumination
CS 354 Global IlluminationMark Kilgard
 
Sns mid term-test2-solution
Sns mid term-test2-solutionSns mid term-test2-solution
Sns mid term-test2-solutioncheekeong1231
 
Lecture02
Lecture02Lecture02
Lecture02zukun
 
NIPS2010: optimization algorithms in machine learning
NIPS2010: optimization algorithms in machine learningNIPS2010: optimization algorithms in machine learning
NIPS2010: optimization algorithms in machine learningzukun
 
Notes parabolas
Notes   parabolasNotes   parabolas
Notes parabolasLori Rapp
 
Lect4 ellipse
Lect4 ellipseLect4 ellipse
Lect4 ellipseBCET
 

Ähnlich wie Lecture11 (20)

Kinks & Defects
Kinks & DefectsKinks & Defects
Kinks & Defects
 
Engr 371 final exam april 2010
Engr 371 final exam april 2010Engr 371 final exam april 2010
Engr 371 final exam april 2010
 
Demo
DemoDemo
Demo
 
Demo
DemoDemo
Demo
 
Demo
DemoDemo
Demo
 
IVR - Chapter 2 - Basics of filtering I: Spatial filters (25Mb)
IVR - Chapter 2 - Basics of filtering I: Spatial filters (25Mb) IVR - Chapter 2 - Basics of filtering I: Spatial filters (25Mb)
IVR - Chapter 2 - Basics of filtering I: Spatial filters (25Mb)
 
Alternating direction
Alternating directionAlternating direction
Alternating direction
 
Existence of Hopf-Bifurcations on the Nonlinear FKN Model
Existence of Hopf-Bifurcations on the Nonlinear FKN ModelExistence of Hopf-Bifurcations on the Nonlinear FKN Model
Existence of Hopf-Bifurcations on the Nonlinear FKN Model
 
QMC: Operator Splitting Workshop, Forward-Backward Splitting Algorithm withou...
QMC: Operator Splitting Workshop, Forward-Backward Splitting Algorithm withou...QMC: Operator Splitting Workshop, Forward-Backward Splitting Algorithm withou...
QMC: Operator Splitting Workshop, Forward-Backward Splitting Algorithm withou...
 
ECC_basics.ppt
ECC_basics.pptECC_basics.ppt
ECC_basics.ppt
 
ECC_basics.ppt
ECC_basics.pptECC_basics.ppt
ECC_basics.ppt
 
03_spectral_computing.pdf
03_spectral_computing.pdf03_spectral_computing.pdf
03_spectral_computing.pdf
 
Brilliant Polymer Scientist-Nantes-2011
Brilliant Polymer Scientist-Nantes-2011Brilliant Polymer Scientist-Nantes-2011
Brilliant Polymer Scientist-Nantes-2011
 
CS 354 Global Illumination
CS 354 Global IlluminationCS 354 Global Illumination
CS 354 Global Illumination
 
Sns mid term-test2-solution
Sns mid term-test2-solutionSns mid term-test2-solution
Sns mid term-test2-solution
 
Lecture02
Lecture02Lecture02
Lecture02
 
Exponents)
Exponents)Exponents)
Exponents)
 
NIPS2010: optimization algorithms in machine learning
NIPS2010: optimization algorithms in machine learningNIPS2010: optimization algorithms in machine learning
NIPS2010: optimization algorithms in machine learning
 
Notes parabolas
Notes   parabolasNotes   parabolas
Notes parabolas
 
Lect4 ellipse
Lect4 ellipseLect4 ellipse
Lect4 ellipse
 

Mehr von zukun

My lyn tutorial 2009
My lyn tutorial 2009My lyn tutorial 2009
My lyn tutorial 2009zukun
 
ETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVzukun
 
ETHZ CV2012: Information
ETHZ CV2012: InformationETHZ CV2012: Information
ETHZ CV2012: Informationzukun
 
Siwei lyu: natural image statistics
Siwei lyu: natural image statisticsSiwei lyu: natural image statistics
Siwei lyu: natural image statisticszukun
 
Lecture9 camera calibration
Lecture9 camera calibrationLecture9 camera calibration
Lecture9 camera calibrationzukun
 
Brunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionBrunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionzukun
 
Modern features-part-4-evaluation
Modern features-part-4-evaluationModern features-part-4-evaluation
Modern features-part-4-evaluationzukun
 
Modern features-part-3-software
Modern features-part-3-softwareModern features-part-3-software
Modern features-part-3-softwarezukun
 
Modern features-part-2-descriptors
Modern features-part-2-descriptorsModern features-part-2-descriptors
Modern features-part-2-descriptorszukun
 
Modern features-part-1-detectors
Modern features-part-1-detectorsModern features-part-1-detectors
Modern features-part-1-detectorszukun
 
Modern features-part-0-intro
Modern features-part-0-introModern features-part-0-intro
Modern features-part-0-introzukun
 
Lecture 02 internet video search
Lecture 02 internet video searchLecture 02 internet video search
Lecture 02 internet video searchzukun
 
Lecture 01 internet video search
Lecture 01 internet video searchLecture 01 internet video search
Lecture 01 internet video searchzukun
 
Lecture 03 internet video search
Lecture 03 internet video searchLecture 03 internet video search
Lecture 03 internet video searchzukun
 
Icml2012 tutorial representation_learning
Icml2012 tutorial representation_learningIcml2012 tutorial representation_learning
Icml2012 tutorial representation_learningzukun
 
Advances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionAdvances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionzukun
 
Gephi tutorial: quick start
Gephi tutorial: quick startGephi tutorial: quick start
Gephi tutorial: quick startzukun
 
EM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysisEM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysiszukun
 
Object recognition with pictorial structures
Object recognition with pictorial structuresObject recognition with pictorial structures
Object recognition with pictorial structureszukun
 
Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities zukun
 

Mehr von zukun (20)

My lyn tutorial 2009
My lyn tutorial 2009My lyn tutorial 2009
My lyn tutorial 2009
 
ETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCV
 
ETHZ CV2012: Information
ETHZ CV2012: InformationETHZ CV2012: Information
ETHZ CV2012: Information
 
Siwei lyu: natural image statistics
Siwei lyu: natural image statisticsSiwei lyu: natural image statistics
Siwei lyu: natural image statistics
 
Lecture9 camera calibration
Lecture9 camera calibrationLecture9 camera calibration
Lecture9 camera calibration
 
Brunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionBrunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer vision
 
Modern features-part-4-evaluation
Modern features-part-4-evaluationModern features-part-4-evaluation
Modern features-part-4-evaluation
 
Modern features-part-3-software
Modern features-part-3-softwareModern features-part-3-software
Modern features-part-3-software
 
Modern features-part-2-descriptors
Modern features-part-2-descriptorsModern features-part-2-descriptors
Modern features-part-2-descriptors
 
Modern features-part-1-detectors
Modern features-part-1-detectorsModern features-part-1-detectors
Modern features-part-1-detectors
 
Modern features-part-0-intro
Modern features-part-0-introModern features-part-0-intro
Modern features-part-0-intro
 
Lecture 02 internet video search
Lecture 02 internet video searchLecture 02 internet video search
Lecture 02 internet video search
 
Lecture 01 internet video search
Lecture 01 internet video searchLecture 01 internet video search
Lecture 01 internet video search
 
Lecture 03 internet video search
Lecture 03 internet video searchLecture 03 internet video search
Lecture 03 internet video search
 
Icml2012 tutorial representation_learning
Icml2012 tutorial representation_learningIcml2012 tutorial representation_learning
Icml2012 tutorial representation_learning
 
Advances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionAdvances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer vision
 
Gephi tutorial: quick start
Gephi tutorial: quick startGephi tutorial: quick start
Gephi tutorial: quick start
 
EM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysisEM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysis
 
Object recognition with pictorial structures
Object recognition with pictorial structuresObject recognition with pictorial structures
Object recognition with pictorial structures
 
Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities
 

Lecture11

  • 1. Robert Collins CSE486 Lecture 11: LoG and DoG Filters
  • 2. Robert Collins CSE486 Today’s Topics Laplacian of Gaussian (LoG) Filter - useful for finding edges - also useful for finding blobs! approximation using Difference of Gaussian (DoG)
  • 3. Robert Collins Recall: First Derivative Filters CSE486 • Sharp changes in gray level of the input image correspond to “peaks or valleys” of the first-derivative of the input signal. F(x) F ’(x) x (1D example) O.Camps, PSU
  • 4. Robert Collins CSE486 Second-Derivative Filters • Peaks or valleys of the first-derivative of the input signal, correspond to “zero-crossings” of the second-derivative of the input signal. F(x) F ’(x) F’’(x) x O.Camps, PSU
  • 5. Robert Collins CSE486 Numerical Derivatives See also T&V, Appendix A.2 Taylor Series expansion add Central difference approx 1 -2 1 to second derivative
  • 6. Robert Collins CSE486 Example: Second Derivatives Ixx=d2I(x,y)/dx2 [ 1 -2 1 ] I(x,y) 2nd Partial deriv wrt x 1 -2 1 Iyy=d2I(x,y)/dy2 2nd Partial deriv wrt y
  • 7. Robert Collins CSE486 Example: Second Derivatives Ixx Iyy benefit: you get clear localization of the edge, as opposed to the “smear” of high gradient magnitude values across an edge
  • 8. Robert Collins CSE486 Compare: 1st vs 2nd Derivatives Ixx Iyy Ix Iy
  • 9. Robert Collins CSE486 Finding Zero-Crossings An alternative approx to finding edges as peaks in first deriv is to find zero-crossings in second deriv. In 1D, convolve with [1 -2 1] and look for pixels where response is (nearly) zero? Problem: when first deriv is zero, so is second. I.e. the filter [1 -2 1] also produces zero when convolved with regions of constant intensity. So, in 1D, convolve with [1 -2 1] and look for pixels where response is nearly zero AND magnitude of first derivative is “large enough”.
  • 10. Edge Detection Summary Robert Collins CSE486 1D 2D y step edge F(x) I(x) I(x,y) x x 2nd deriv 1st deriv dI(x) |∇I(x,y)| =(Ix 2(x,y) + Iy2(x,y))1/2 > Th > Th dx tan θ = Ix(x,y)/ Iy(x,y) d2I(x) =0 ∇2I(x,y) =Ix x (x,y) + Iyy (x,y)=0 dx2 Laplacian
  • 11. Robert Collins CSE486 Finite Difference Laplacian Laplacian filter ∇2I(x,y)
  • 12. Robert Collins CSE486 Example: Laplacian I(x,y) Ixx + Iyy
  • 13. Robert Collins CSE486 Example: Laplacian Ixx Iyy Ixx+Iyy ∇2I(x,y)
  • 14. Robert Collins CSE486 Notes about the Laplacian: • ∇2I(x,y) is a SCALAR – ↑ Can be found using a SINGLE mask – ↓ Orientation information is lost • ∇2I(x,y) is the sum of SECOND-order derivatives – But taking derivatives increases noise – Very noise sensitive! • It is always combined with a smoothing operation: I(x,y) O(x,y) Smooth Laplacian O.Camps, PSU
  • 15. Robert Collins CSE486 LoG Filter • First smooth (Gaussian filter), • Then, find zero-crossings (Laplacian filter): – O(x,y) = ∇2(I(x,y) * G(x,y)) Laplacian of Laplacian of Gaussian (LoG) Gaussian-filtered image -filtered image Do you see the distinction? O.Camps, PSU
  • 16. Robert Collins CSE486 1D Gaussian and Derivatives x2 − 2σ 2 g ( x) = e x2 x2 1 − 2 x − 2 g ' ( x) = − 2 2 xe 2σ =− 2 e 2σ 2σ σ 2 x2 x 1 − 2σ 2 g ' ' ( x ) = ( 4 − 2 )e σ3 σ O.Camps, PSU
  • 17. Robert Collins CSE486 Second Derivative of a Gaussian 2 x2 x 1 − 2 g ' ' ( x ) = ( 4 − 2 )e 3 2σ σ σ 2D analog LoG “Mexican Hat” O.Camps, PSU
  • 18. Robert Collins CSE486 Effect of LoG Operator Original LoG-filtered Band-Pass Filter (suppresses both high and low frequencies) Why? Easier to explain in a moment.
  • 19. Robert Collins CSE486 Zero-Crossings as an Edge Detector Raw zero-crossings (no contrast thresholding) LoG sigma = 2, zero-crossing
  • 20. Robert Collins CSE486 Zero-Crossings as an Edge Detector Raw zero-crossings (no contrast thresholding) LoG sigma = 4, zero-crossing
  • 21. Robert Collins CSE486 Zero-Crossings as an Edge Detector Raw zero-crossings (no contrast thresholding) LoG sigma = 8, zero-crossing
  • 22. Robert Collins CSE486 Note: Closed Contours You may have noticed that zero-crossings form closed contours. It is easy to see why… Think of equal-elevation contours on a topo map. Each is a closed contour. Zero-crossings are contours at elevation = 0 . remember that in our case, the height map is of a LoG filtered image - a surface with both positive and negative “elevations”
  • 23. Robert Collins CSE486 Other uses of LoG: Blob Detection Lindeberg: ``Feature detection with automatic scale selection''. International Journal of Computer Vision, vol 30, number 2, pp. 77-- 116, 1998.
  • 24. Robert Collins CSE486 Pause to Think for a Moment: How can an edge finder also be used to find blobs in an image?
  • 25. Robert Collins CSE486 Example: LoG Extrema LoG maxima sigma = 2 minima
  • 26. Robert Collins CSE486 LoG Extrema, Detail maxima LoG sigma = 2
  • 27. Robert Collins CSE486 LoG Blob Finding LoG filter extrema locates “blobs” maxima = dark blobs on light background minima = light blobs on dark background Scale of blob (size ; radius in pixels) is determined by the sigma parameter of the LoG filter. LoG sigma = 2 LoG sigma = 10
  • 28. Robert Collins CSE486 Observe and Generalize convolve result with LoG maxima
  • 29. Robert Collins CSE486 Observe and Generalize LoG looks a bit like an eye. and it responds maximally in the eye region!
  • 30. Robert Collins CSE486 Observe and Generalize LoG Derivative of Gaussian Looks like dark blob Looks like vertical and on light background horizontal step edges Recall: Convolution (and cross correlation) with a filter can be viewed as comparing a little “picture” of what you want to find against all local regions in the mage.
  • 31. Robert Collins CSE486 Observe and Generalize Key idea: Cross correlation with a filter can be viewed as comparing a little “picture” of what you want to find against all local regions in the image. Maximum response: Maximum response: dark blob on light background vertical edge; lighter on left Minimum response: Minimum response: light blob on dark background vertical edge; lighter on right
  • 32. Robert Collins CSE486 Efficient Implementation Approximating LoG with DoG LoG can be approximate by a Difference of two Gaussians (DoG) at different scales 1D example M.Hebert, CMU
  • 33. Robert Collins CSE486 Efficient Implementation LoG can be approximate by a Difference of two Gaussians (DoG) at different scales. Separability of and cascadability of Gaussians applies to the DoG, so we can achieve efficient implementation of the LoG operator. DoG approx also explains bandpass filtering of LoG (think about it. Hint: Gaussian is a low-pass filter)
  • 34. Robert Collins CSE486 Back to Blob Detection Lindeberg: blobs are detected as local extrema in space and scale, within the LoG (or DoG) scale-space volume.
  • 35. Robert Collins CSE486 Other uses of LoG: Blob Detection Gesture recognition for the ultimate couch potato
  • 36. Robert Collins CSE486 Other uses for LOG: Image Coding • Coarse layer of the Gaussian pyramid predicts the appearance of the next finer layer. • The prediction is not exact, but means that it is not necessary to store all of the next fine scale layer. • Laplacian pyramid stores the difference.
  • 37. Robert Collins CSE486 Other uses for LOG: Image Coding 256x256 128x128 64x64 32x32 takes less bits to store compressed versions of these than to compress the original full-res 256x256 128x128 64x64 greyscale image The Laplacian Pyramid as a Compact Image Code Burt, P., and Adelson, E. H., IEEE Transactions on Communication, COM-31:532-540 (1983).