SlideShare uma empresa Scribd logo
Binary Pattern
                          Matching from a Local
                          Dissimilarity Measure
                           F. Morain-Nicolier - Jérôme Landré - Su Ruan
                             CReSTIC - URCA - IUT Troyes - FRANCE
                                        http://pixel-shaker.fr
                                            IPTA 2010

                                                1
mercredi 7 juillet 2010                                                   1
?




                          2
mercredi 7 juillet 2010       2
Outline

                          • Local Dissimilarity Measure
                          • LDM as Shape Matcher
                          • Results

                                               3
mercredi 7 juillet 2010                                   3
Local Dissimilarity Map


              E. Baudrier, F. Nicolier, G. Millon, S. Ruan, ”Binary-image comparison with local-dissimilarity quantification”,
              Pattern Recognition, vol. 41, n. 5, pp. 1461–1478, jan. 2008


                                                                     4
mercredi 7 juillet 2010                                                                                                         4
Hausdorff Distance

                          HD(A, B) = max(h(A, B), h(B, A))


                           with h(A, B) = max(min d(a, b))
                                              a∈A b∈B




                                          5
mercredi 7 juillet 2010                                      5
Hausdorff Distance

                          HD(A, B) = max(h(A, B), h(B, A))


                           with h(A, B) = max(min d(a, b))
                                              a∈A b∈B




                                          5
mercredi 7 juillet 2010                                      5
Local Dissimilarity Map

 ig. 3. Behavior of the LDMap on simple patterns. A vertical line, a horizontal one, a square and their LDMaps. The dar
measure.




          Fig. 4. Letters “co” et “et” and their LDMap. The obtained LDMap (c) shows clearly both locations and quantifi




                E. Baudrier, F. Nicolier, G. Millon, S. Ruan, ”Binary-image comparison with local-dissimilarity quantification”,
                Pattern Recognition, vol. 41, n. 5, pp. 1461–1478, jan. 2008


                                                                       6
  mercredi 7 juillet 2010                                                                                                         6
Local Dissimilarity Map

 ig. 3. Behavior of the LDMap on simple patterns. A vertical line, a horizontal one, a square and their LDMaps. The dar
measure.




          Fig. 4. Letters “co” et “et” and their LDMap. The obtained LDMap (c) shows clearly both locations and quantifi




                E. Baudrier, F. Nicolier, G. Millon, S. Ruan, ”Binary-image comparison with local-dissimilarity quantification”,
                Pattern Recognition, vol. 41, n. 5, pp. 1461–1478, jan. 2008


                                                                       6
  mercredi 7 juillet 2010                                                                                                         6
Local Dissimilarity Map

 ig. 3. Behavior of the LDMap on simple patterns. A vertical line, a horizontal one, a square and their LDMaps. The dar
measure.




          Fig. 4. Letters “co” et “et” and their LDMap. The obtained LDMap (c) shows clearly both locations and quantifi




                E. Baudrier, F. Nicolier, G. Millon, S. Ruan, ”Binary-image comparison with local-dissimilarity quantification”,
                Pattern Recognition, vol. 41, n. 5, pp. 1461–1478, jan. 2008


                                                                       7
  mercredi 7 juillet 2010                                                                                                         7
Local Dissimilarity Map

 ig. 3. Behavior of the LDMap on simple patterns. A vertical line, a horizontal one, a square and their LDMaps. The dar
measure.




          Fig. 4. Letters “co” et “et” and their LDMap. The obtained LDMap (c) shows clearly both locations and quantifi




                E. Baudrier, F. Nicolier, G. Millon, S. Ruan, ”Binary-image comparison with local-dissimilarity quantification”,
                Pattern Recognition, vol. 41, n. 5, pp. 1461–1478, jan. 2008


                                                                       8
  mercredi 7 juillet 2010                                                                                                         8
Local Dissimilarity Map

                                          Iterative algorithm = slow




                          LDMA,B (p) = |A(p) − B(p)| max(dtA (p), dtB (p))

                                   dt : distance transform
                                        (distance to nearest foreground pixel)

              E. Baudrier, F. Nicolier, G. Millon, S. Ruan, ”Binary-image comparison with local-dissimilarity quantification”,
              Pattern Recognition, vol. 41, n. 5, pp. 1461–1478, jan. 2008


                                                                     9
mercredi 7 juillet 2010                                                                                                         9
Local Dissimilarity Map

                                       For binary images :

                          LDMA,B (p) = |A(p) − B(p)| max(dtA (p), dtB (p))




                                     LDMA,B = BdtA + AdtB



                                                 10
mercredi 7 juillet 2010                                                      10
LDMap on simple patterns. A vertical line, a horizontal one, a square and their LDMaps. The darker the pixe




 o” et “et” and their LDMap. The obtained LDMap (c) shows clearly both locations and quantification of th




                                 Localized and quantified

                                                     11
  mercredi 7 juillet 2010                                                                               11
ity scores between images. Figure 5 gives an example of
                                 6
 computed local-dissimilarity map (c) from two images.




                          Figure 5. Local-dissimilarity map of [2]
                          (a) image 1 (b) image 2 (c) dissimilarity map

     The main characteristic and quantified is a comparison
                   Localized of the method
 of images without any feature extraction, a high precision
 is obtained about image differences. On the other hand, the
                              12

 method increases computation times and can’t be used on-
mercredi 7 juillet 2010                                                   12
sym
                                                                                     asy

                                                                                  F. M

                                                                                frederic

                                                                                http://


                                                                                Plan

                                                                                Pr´sent
                                                                                  e
                                                                                Carte d
                                                                                Locales

                                                                                Mesure
                                                                                mesure

                                                                                Formula
                                                                                Exempl

                                                                                Bilan -




                 Propri´t´s :
                       ee
                 localisation, quantification, robustesse textured variations.
                        Good for non strongly aux petites images
           6
                                                 13
mercredi 7 juillet 2010                                                             13
LDM as template
                            matcher?


                                 14
mercredi 7 juillet 2010                     14
P reference shape
                                    I binary image




                          find the position in I of an instance of P




                              use LDM as similarity measure


                                             15
mercredi 7 juillet 2010                                               15
x       I


                          y                          I(x,y)   P
            P
                              I(x,y)

                                                  to be compared!




                                                LDMA,B = BdtA + AdtB

                                           16
mercredi 7 juillet 2010                                             16
matcher (first version)
                                            I(x,y)          P




                                               
                               MI,P (x, y) =                LDMI(x,y) ,P (k, l)
                                               k        l



                           MI,P (x, y) = N CSI,P (x, y) + N CSP,I (x, y)



                          Symetrical Chamfer Matching [Borgefors]
                                                   17
mercredi 7 juillet 2010                                                           17
use quadratic sums to get
                          less false positives [Borgefors]

                                         and
                             LDMA,B = BdtA + AdtB



            matcher
                                           2               2
             (final             QMI,P =   dtI   P +I    dtP   (  : cross-correlation)

            version)
                                  Quadratic Matcher
                          (very fast computation via Fourier)

                                          18
mercredi 7 juillet 2010                                                               18
Generalization (not used here)
                                               2               2
                                QMI,P =      dtI   P +I    dtP



                                                2                   2
                              AQMI,P =       αdtI     P + βI    dtP


               Links to Tverksy results : human judgement of
                           similarity is asymmetric
                                       
                      s(A, B) = F (A       B) − αF (A − B) − βF (B − A)

                                                19
mercredi 7 juillet 2010                                                   19
An example



                              20
mercredi 7 juillet 2010                20
I binary image




              P reference shape



                                                                                         Fig. 2. In (c), image response by Borgefors chamfer matcher. – In (d), image
                                                                                         obtained with symmetric LDM-matcher. – A good match with the reference
                                                                                         pattern is reported by low values (with dark gray levels).
        Fig. 1. (a) A test image. – (b) a reference pattern, the ideal location in (a)
        is labeled with G.


                                                                                         in the area N. The LDM-matcher is more selective. For the
        that belong to b but not to a. A comparable idea can be                          area-N pixels, high values are obtained by the LDM-matcher.
        formulated from (10) by weighting the contribution of each                       The area-N values can be interpreted as false-positives for
        term (Generalized Quadratic Matcher - GQM):                                      the Borgefors chamfer matching and true-negatives for the
                                                                                         LDM-matcher. The LDM-matcher can thus provide less false
                                                                                         positives in a pattern matching task than the Borgefors chamfer
                         AQMI,P = αdt2  P + βI  dt2 .                         (11)
                                     I              P                                    matching.
          A symmetric matcher is obtained with α = β. Asymmetric                            Here is an interpretation of these observations. The pixel
        ones are obtained with α = β, such as α = 1, β = 0 (the                         density in area-N is higher than in other locations of the
        chamfer matching) or α = 0, β = 1.                                               image. When the pattern template P is somewhere in area-N,
                                                                                         there is a high probability that a subset of pixels matching the
            IV. T HE LDM- MATCHER CAN PROVIDE LESS FALSE                                 pattern exists, providing low values by the Borgefors chamfer
                                        POSITIVES                                        matching. High values are given by the LDM-matcher as it is
                                                                                         a symmetric matcher. Low values are only obtained when P
        The final LDM-matcher (eq. (11)) (symmetric one, with                             matches the images and the image matches the pattern. Let’s
      α = β = 1) is compared in this section to the Borgefors
      chamfer matcher (purely asymmetric, with α = 1 and β = 0).
                                                                                         take a drastic example : figure an area completely filled with  Fig. 1. (a) A test image. – (b) a reference pattern,
                                                                                                                                                    21
                                                                                         pixels (ie an area filled with foreground pixels) and a pattern to
      The behavior of the two matchers is compared in a concrete
      example.
                                                                                         be matched. The Borgefors chamfer matching output responses   is labeled with G.
                                                                                         would be 0 as distance transform values (dtI in eq. 7) are zero.
mercrediCoast image2010 are given in figure 1. A test pattern to be
         7 juillet edges                                                                 Intuitively each pixel of the pattern is corresponding to a pixel                                              21
low value → match!




                                                                                                                                                         Fig. 2. In (c), image response by Borgefors chamfer matcher. – In (d
                                                                                                                                                         obtained with symmetric LDM-matcher. – A good match with the r
                                                                                                                                                         pattern is reported by low values (with dark gray levels).
    Fig. 1. (a) A test image. – (b) a reference pattern, the ideal location in (a)
    is labeled with G.


                                                                                                                     in the area N. The LDM-matcher is more selective. F
   that belong to b but not to a. A comparable idea can be area-N pixels, high values are obtained by the LDM-m
                                                                                                   Chamfer Matching
   formulated from (10) by weighting the contributionimage response by Borgefors chamfer be interpreted as image
                                                                             Fig. 2. In (c), of each The area-N values can matcher. – In (d), false-positiv         Quadratic LDM
   term (Generalized Quadratic Matcher obtained with symmetric LDM-matcher. – chamfer match with and reference
                                                                              - GQM):                                the Borgefors A good matching the true-negatives f
                                                                             pattern is reported by low values (with dark gray levels).
                                                                                                                     LDM-matcher. The LDM-matcher can thus provide les  matcher
nce pattern, the ideal location in (a)                                 Fig. 2. In (c), image response by Borgefors chamfer matcher. – In (d), image


                               AQMI,P = αdt2  P + βI  dt2 .
  A test image. – (b) a reference pattern, the ideal location in (a)
with G.                                                     I
                                                                       obtained with symmetric LDM-matcher. – A good match with the reference

                                                                                                                (11)
                                                                       pattern is reported by low values (with dark gray levels).
                                                                                            P                        matching.
                                                                                                                                                                 (less false positives)
                                                                                                                     positives in a pattern matching task than the Borgefors c

                                                  in the area N. The LDM-matcher is more selective. For the
ng to bA symmetric matcher is obtained with α =the LDM-matcher.
          but not to a. A comparable idea can be area-N pixels, high values are obtained by β. Asymmetric               Here is an interpretation of these observations. Th
neralized Quadratic Matcher - GQM):               the Borgefors              in the=area N. The LDM-matcher is more selective. For the
d from (10) by weighting the contribution of each The area-N values can be interpreted as false-positives for
   ones are obtained with α = β, chamfer matching and thus provideβforfalse 0 (the density in area-N is higher than in other locations
                                                                   such as can true-negativesless = 22
                                                                                     α           1,         the


   A comparable idea = 0, in abe 1. area-NBorgefors chamfer high values are obtained by template P is somewhere in a
   chamfer matching) or (11) positives β pattern matching task than the pixels,                                      image. When the pattern the LDM-matcher.
                                                  LDM-matcher. The LDM-matcher
     AQM                   2
               = αdt  P + βI  dt .
              I,P          I
                                               2
                                               P   can
                                               α matching. =
  mercredi 7 juillet 2010
metric matcher is obtained with α = β. Asymmetric    Here is an interpretation of these observations. The pixel      there is a high probability that a subset of pixels match
                                                                                                                                                                           22
Robust?



                             23
mercredi 7 juillet 2010             23
I



                a) extract
                 pattern

                               P


                                       b) invert some pixels

                          Pnoisy                    c) localize

                                         24
mercredi 7 juillet 2010                                           24
[1] A. Andreev, N. Ki
                                                                                                                 Distances”, Proc. of
                                                                                                                 and Recognition, pp
                                                                                                             [2] E. Baudrier, F. Nico
                                                                                                                 with local-dissimilar
                                                                                                                 5, pp. 1461–1478, ja
                                                                                                             [3] G. Borgefors, ”Hiera
                                                                                                                 ing algorithm”, IEE
                                                                                                                 Intelligence, vol. 10
                                                                                                             [4] Calypod - graphiC
                                                                                                                 http://calypod
                                                                                                             [5] A. Ghafoor, R. N. I
                                                                                                                 Algorithm”, IDEAL
                                                                                                                 Hong Kong, LLNCS
                                                                                                             [6] D.P. Huttenlocher, W
                                                                                                                 dorff distance”, IEE
                                                                                                                 Intelligence, vol. 15
                                                                                                             [7] U. Montanari, ”A m

                                                            Texte                                                distance”, Journal o
                                                                                                                 pp. 600-624, 1968.
                                                                                                             [8] E. Rosch, ”Cognitive
                                                                                                                 4, pp. 532-547, 1975
                                                                                                             [9] S. Santini, R. Jain,
                                                                                                                 Mach. Intell., vol. 2
                                                                                                             [10] A. Tversky, ”Featu
                                                                                                                 4, pp. 327-352, 1977
                                                                                                             [11] B. Zitova, J. Flusse
                             Fig. 4. Noise robustness of the Borgefors chamfer-matcher and the LDM-
                                                                                                                 Vision Computing, v
                             matcher. The mislocation error (a distance in pixel) is given with respect to
                             the perturbation rate of the pattern (percentage of inverted pixels).

                          localization error vs pattern perturbation
                             matchers. The position error is estimated by the euclidean
                             distance between the real position and the computed pattern
                             position. For these three images, one thousand patterns have
                                                          25
mercredi 7 juillet 2010      been extracted and processed.                                                                       25
Conclusion

                          • Template matching via Local Dissimilarity
                            Measure (LDM)
                          • LDM = symmetrical Chamfer matching
                          • Less false positives
                          • More robust to noise

                                               26
mercredi 7 juillet 2010                                                 26
Main future works

                          • Playing with asymmetry weights
                          • Formalize and use links with Tversky’s
                            constrast model
                          • Going to gray-level images similarity (soon
                            via extended distance transform)



                                               27
mercredi 7 juillet 2010                                                   27

Mais conteúdo relacionado

Mais procurados

2_IGARSS2011_BPT_v2.pdf
2_IGARSS2011_BPT_v2.pdf2_IGARSS2011_BPT_v2.pdf
2_IGARSS2011_BPT_v2.pdf
grssieee
 
Contextless Object Recognition with Shape-enriched SIFT and Bags of Features
Contextless Object Recognition with Shape-enriched SIFT and Bags of FeaturesContextless Object Recognition with Shape-enriched SIFT and Bags of Features
Contextless Object Recognition with Shape-enriched SIFT and Bags of Features
Universitat Politècnica de Catalunya
 
Unsupervised Change Detection in the Feature Space Using Kernels.pdf
Unsupervised Change Detection in the Feature Space Using Kernels.pdfUnsupervised Change Detection in the Feature Space Using Kernels.pdf
Unsupervised Change Detection in the Feature Space Using Kernels.pdf
grssieee
 
Kevin_Park_OSU_ Master_Project Report
Kevin_Park_OSU_ Master_Project ReportKevin_Park_OSU_ Master_Project Report
Kevin_Park_OSU_ Master_Project Report
Kevin Park
 

Mais procurados (14)

Detection Tracking and Recognition of Human Poses for a Real Time Spatial Game
Detection Tracking and Recognition of Human Poses for a Real Time Spatial GameDetection Tracking and Recognition of Human Poses for a Real Time Spatial Game
Detection Tracking and Recognition of Human Poses for a Real Time Spatial Game
 
SIGGRAPH ASIA 2012 Stereoscopic Cloning Presentation Slide
SIGGRAPH ASIA 2012 Stereoscopic Cloning Presentation SlideSIGGRAPH ASIA 2012 Stereoscopic Cloning Presentation Slide
SIGGRAPH ASIA 2012 Stereoscopic Cloning Presentation Slide
 
2_IGARSS2011_BPT_v2.pdf
2_IGARSS2011_BPT_v2.pdf2_IGARSS2011_BPT_v2.pdf
2_IGARSS2011_BPT_v2.pdf
 
Contextless Object Recognition with Shape-enriched SIFT and Bags of Features
Contextless Object Recognition with Shape-enriched SIFT and Bags of FeaturesContextless Object Recognition with Shape-enriched SIFT and Bags of Features
Contextless Object Recognition with Shape-enriched SIFT and Bags of Features
 
Gaining Colour Stability in Live Image Capturing
Gaining Colour Stability in Live Image CapturingGaining Colour Stability in Live Image Capturing
Gaining Colour Stability in Live Image Capturing
 
56 58
56 5856 58
56 58
 
Unsupervised Change Detection in the Feature Space Using Kernels.pdf
Unsupervised Change Detection in the Feature Space Using Kernels.pdfUnsupervised Change Detection in the Feature Space Using Kernels.pdf
Unsupervised Change Detection in the Feature Space Using Kernels.pdf
 
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error norm
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error normRobust Super-Resolution by minimizing a Gaussian-weighted L2 error norm
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error norm
 
Kevin_Park_OSU_ Master_Project Report
Kevin_Park_OSU_ Master_Project ReportKevin_Park_OSU_ Master_Project Report
Kevin_Park_OSU_ Master_Project Report
 
Image processing
Image processingImage processing
Image processing
 
Comprehensive Infrared Image Edge detection Algorithm
Comprehensive Infrared Image Edge detection AlgorithmComprehensive Infrared Image Edge detection Algorithm
Comprehensive Infrared Image Edge detection Algorithm
 
Image Processing, 2012
Image Processing, 2012Image Processing, 2012
Image Processing, 2012
 
Object Detection for Service Robot Using Range and Color Features of an Image
Object Detection for Service Robot Using Range and Color Features of an ImageObject Detection for Service Robot Using Range and Color Features of an Image
Object Detection for Service Robot Using Range and Color Features of an Image
 
Object detection for service robot using range and color features of an image
Object detection for service robot using range and color features of an imageObject detection for service robot using range and color features of an image
Object detection for service robot using range and color features of an image
 

Destaque

Mesures de dissimilarités locales et globales entre images, symétriques et as...
Mesures de dissimilarités locales et globales entre images, symétriques et as...Mesures de dissimilarités locales et globales entre images, symétriques et as...
Mesures de dissimilarités locales et globales entre images, symétriques et as...
Frédéric Morain-Nicolier
 
2012.09.25 - Local and non-metric similarities between images - why, how and ...
2012.09.25 - Local and non-metric similarities between images - why, how and ...2012.09.25 - Local and non-metric similarities between images - why, how and ...
2012.09.25 - Local and non-metric similarities between images - why, how and ...
Frédéric Morain-Nicolier
 
NIGHT VISION IN CARS
NIGHT VISION IN CARSNIGHT VISION IN CARS
NIGHT VISION IN CARS
Praveen Yadav
 

Destaque (20)

Mesures de dissimilarités locales et globales entre images, symétriques et as...
Mesures de dissimilarités locales et globales entre images, symétriques et as...Mesures de dissimilarités locales et globales entre images, symétriques et as...
Mesures de dissimilarités locales et globales entre images, symétriques et as...
 
Practising Fourier Analysis with Digital Images
Practising Fourier Analysis with Digital ImagesPractising Fourier Analysis with Digital Images
Practising Fourier Analysis with Digital Images
 
2012.09.25 - Local and non-metric similarities between images - why, how and ...
2012.09.25 - Local and non-metric similarities between images - why, how and ...2012.09.25 - Local and non-metric similarities between images - why, how and ...
2012.09.25 - Local and non-metric similarities between images - why, how and ...
 
SRC - SAV - Système Visuel et Auditif Humain
SRC - SAV - Système Visuel et Auditif HumainSRC - SAV - Système Visuel et Auditif Humain
SRC - SAV - Système Visuel et Auditif Humain
 
CCD
CCDCCD
CCD
 
SRC - SAV - La lumière
SRC - SAV - La lumièreSRC - SAV - La lumière
SRC - SAV - La lumière
 
GEII - Ma3 - Suites et séries
GEII - Ma3 - Suites et sériesGEII - Ma3 - Suites et séries
GEII - Ma3 - Suites et séries
 
GEII - Ma3 - Matrices
GEII - Ma3 - MatricesGEII - Ma3 - Matrices
GEII - Ma3 - Matrices
 
GEII - Ma3 - Représentations de Fourier et convolution
GEII - Ma3 - Représentations de Fourier et convolutionGEII - Ma3 - Représentations de Fourier et convolution
GEII - Ma3 - Représentations de Fourier et convolution
 
Capteurs de positions
Capteurs de positionsCapteurs de positions
Capteurs de positions
 
Thermal camera and Radar
Thermal camera and RadarThermal camera and Radar
Thermal camera and Radar
 
Barns digitala rum (Örebro & Uppsala, april 2008)
Barns digitala rum (Örebro & Uppsala, april 2008)Barns digitala rum (Örebro & Uppsala, april 2008)
Barns digitala rum (Örebro & Uppsala, april 2008)
 
PLS 2016: Pedestrian vision at night
PLS 2016: Pedestrian vision at nightPLS 2016: Pedestrian vision at night
PLS 2016: Pedestrian vision at night
 
2 signaux et systèmes slideshare
2 signaux et systèmes slideshare2 signaux et systèmes slideshare
2 signaux et systèmes slideshare
 
Batel f re v66
Batel f re v66Batel f re v66
Batel f re v66
 
Cours1
Cours1Cours1
Cours1
 
What Is A Thermal Imaging Camera?
What Is A Thermal Imaging Camera?What Is A Thermal Imaging Camera?
What Is A Thermal Imaging Camera?
 
NIGHT VISION IN CARS
NIGHT VISION IN CARSNIGHT VISION IN CARS
NIGHT VISION IN CARS
 
PLS 2016: Practical implementation of circadian lighting in office environments
PLS 2016: Practical implementation of circadian lighting in office environmentsPLS 2016: Practical implementation of circadian lighting in office environments
PLS 2016: Practical implementation of circadian lighting in office environments
 
Ccna day5
Ccna day5Ccna day5
Ccna day5
 

Último

Último (20)

JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Transforming The New York Times: Empowering Evolution through UX
Transforming The New York Times: Empowering Evolution through UXTransforming The New York Times: Empowering Evolution through UX
Transforming The New York Times: Empowering Evolution through UX
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
 
Enterprise Security Monitoring, And Log Management.
Enterprise Security Monitoring, And Log Management.Enterprise Security Monitoring, And Log Management.
Enterprise Security Monitoring, And Log Management.
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Server-Driven User Interface (SDUI) at Priceline
Server-Driven User Interface (SDUI) at PricelineServer-Driven User Interface (SDUI) at Priceline
Server-Driven User Interface (SDUI) at Priceline
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 

Ipta2010

  • 1. Binary Pattern Matching from a Local Dissimilarity Measure F. Morain-Nicolier - Jérôme Landré - Su Ruan CReSTIC - URCA - IUT Troyes - FRANCE http://pixel-shaker.fr IPTA 2010 1 mercredi 7 juillet 2010 1
  • 2. ? 2 mercredi 7 juillet 2010 2
  • 3. Outline • Local Dissimilarity Measure • LDM as Shape Matcher • Results 3 mercredi 7 juillet 2010 3
  • 4. Local Dissimilarity Map E. Baudrier, F. Nicolier, G. Millon, S. Ruan, ”Binary-image comparison with local-dissimilarity quantification”, Pattern Recognition, vol. 41, n. 5, pp. 1461–1478, jan. 2008 4 mercredi 7 juillet 2010 4
  • 5. Hausdorff Distance HD(A, B) = max(h(A, B), h(B, A)) with h(A, B) = max(min d(a, b)) a∈A b∈B 5 mercredi 7 juillet 2010 5
  • 6. Hausdorff Distance HD(A, B) = max(h(A, B), h(B, A)) with h(A, B) = max(min d(a, b)) a∈A b∈B 5 mercredi 7 juillet 2010 5
  • 7. Local Dissimilarity Map ig. 3. Behavior of the LDMap on simple patterns. A vertical line, a horizontal one, a square and their LDMaps. The dar measure. Fig. 4. Letters “co” et “et” and their LDMap. The obtained LDMap (c) shows clearly both locations and quantifi E. Baudrier, F. Nicolier, G. Millon, S. Ruan, ”Binary-image comparison with local-dissimilarity quantification”, Pattern Recognition, vol. 41, n. 5, pp. 1461–1478, jan. 2008 6 mercredi 7 juillet 2010 6
  • 8. Local Dissimilarity Map ig. 3. Behavior of the LDMap on simple patterns. A vertical line, a horizontal one, a square and their LDMaps. The dar measure. Fig. 4. Letters “co” et “et” and their LDMap. The obtained LDMap (c) shows clearly both locations and quantifi E. Baudrier, F. Nicolier, G. Millon, S. Ruan, ”Binary-image comparison with local-dissimilarity quantification”, Pattern Recognition, vol. 41, n. 5, pp. 1461–1478, jan. 2008 6 mercredi 7 juillet 2010 6
  • 9. Local Dissimilarity Map ig. 3. Behavior of the LDMap on simple patterns. A vertical line, a horizontal one, a square and their LDMaps. The dar measure. Fig. 4. Letters “co” et “et” and their LDMap. The obtained LDMap (c) shows clearly both locations and quantifi E. Baudrier, F. Nicolier, G. Millon, S. Ruan, ”Binary-image comparison with local-dissimilarity quantification”, Pattern Recognition, vol. 41, n. 5, pp. 1461–1478, jan. 2008 7 mercredi 7 juillet 2010 7
  • 10. Local Dissimilarity Map ig. 3. Behavior of the LDMap on simple patterns. A vertical line, a horizontal one, a square and their LDMaps. The dar measure. Fig. 4. Letters “co” et “et” and their LDMap. The obtained LDMap (c) shows clearly both locations and quantifi E. Baudrier, F. Nicolier, G. Millon, S. Ruan, ”Binary-image comparison with local-dissimilarity quantification”, Pattern Recognition, vol. 41, n. 5, pp. 1461–1478, jan. 2008 8 mercredi 7 juillet 2010 8
  • 11. Local Dissimilarity Map Iterative algorithm = slow LDMA,B (p) = |A(p) − B(p)| max(dtA (p), dtB (p)) dt : distance transform (distance to nearest foreground pixel) E. Baudrier, F. Nicolier, G. Millon, S. Ruan, ”Binary-image comparison with local-dissimilarity quantification”, Pattern Recognition, vol. 41, n. 5, pp. 1461–1478, jan. 2008 9 mercredi 7 juillet 2010 9
  • 12. Local Dissimilarity Map For binary images : LDMA,B (p) = |A(p) − B(p)| max(dtA (p), dtB (p)) LDMA,B = BdtA + AdtB 10 mercredi 7 juillet 2010 10
  • 13. LDMap on simple patterns. A vertical line, a horizontal one, a square and their LDMaps. The darker the pixe o” et “et” and their LDMap. The obtained LDMap (c) shows clearly both locations and quantification of th Localized and quantified 11 mercredi 7 juillet 2010 11
  • 14. ity scores between images. Figure 5 gives an example of 6 computed local-dissimilarity map (c) from two images. Figure 5. Local-dissimilarity map of [2] (a) image 1 (b) image 2 (c) dissimilarity map The main characteristic and quantified is a comparison Localized of the method of images without any feature extraction, a high precision is obtained about image differences. On the other hand, the 12 method increases computation times and can’t be used on- mercredi 7 juillet 2010 12
  • 15. sym asy F. M frederic http:// Plan Pr´sent e Carte d Locales Mesure mesure Formula Exempl Bilan - Propri´t´s : ee localisation, quantification, robustesse textured variations. Good for non strongly aux petites images 6 13 mercredi 7 juillet 2010 13
  • 16. LDM as template matcher? 14 mercredi 7 juillet 2010 14
  • 17. P reference shape I binary image find the position in I of an instance of P use LDM as similarity measure 15 mercredi 7 juillet 2010 15
  • 18. x I y I(x,y) P P I(x,y) to be compared! LDMA,B = BdtA + AdtB 16 mercredi 7 juillet 2010 16
  • 19. matcher (first version) I(x,y) P MI,P (x, y) = LDMI(x,y) ,P (k, l) k l MI,P (x, y) = N CSI,P (x, y) + N CSP,I (x, y) Symetrical Chamfer Matching [Borgefors] 17 mercredi 7 juillet 2010 17
  • 20. use quadratic sums to get less false positives [Borgefors] and LDMA,B = BdtA + AdtB matcher 2 2 (final QMI,P = dtI P +I dtP ( : cross-correlation) version) Quadratic Matcher (very fast computation via Fourier) 18 mercredi 7 juillet 2010 18
  • 21. Generalization (not used here) 2 2 QMI,P = dtI P +I dtP 2 2 AQMI,P = αdtI P + βI dtP Links to Tverksy results : human judgement of similarity is asymmetric s(A, B) = F (A B) − αF (A − B) − βF (B − A) 19 mercredi 7 juillet 2010 19
  • 22. An example 20 mercredi 7 juillet 2010 20
  • 23. I binary image P reference shape Fig. 2. In (c), image response by Borgefors chamfer matcher. – In (d), image obtained with symmetric LDM-matcher. – A good match with the reference pattern is reported by low values (with dark gray levels). Fig. 1. (a) A test image. – (b) a reference pattern, the ideal location in (a) is labeled with G. in the area N. The LDM-matcher is more selective. For the that belong to b but not to a. A comparable idea can be area-N pixels, high values are obtained by the LDM-matcher. formulated from (10) by weighting the contribution of each The area-N values can be interpreted as false-positives for term (Generalized Quadratic Matcher - GQM): the Borgefors chamfer matching and true-negatives for the LDM-matcher. The LDM-matcher can thus provide less false positives in a pattern matching task than the Borgefors chamfer AQMI,P = αdt2 P + βI dt2 . (11) I P matching. A symmetric matcher is obtained with α = β. Asymmetric Here is an interpretation of these observations. The pixel ones are obtained with α = β, such as α = 1, β = 0 (the density in area-N is higher than in other locations of the chamfer matching) or α = 0, β = 1. image. When the pattern template P is somewhere in area-N, there is a high probability that a subset of pixels matching the IV. T HE LDM- MATCHER CAN PROVIDE LESS FALSE pattern exists, providing low values by the Borgefors chamfer POSITIVES matching. High values are given by the LDM-matcher as it is a symmetric matcher. Low values are only obtained when P The final LDM-matcher (eq. (11)) (symmetric one, with matches the images and the image matches the pattern. Let’s α = β = 1) is compared in this section to the Borgefors chamfer matcher (purely asymmetric, with α = 1 and β = 0). take a drastic example : figure an area completely filled with Fig. 1. (a) A test image. – (b) a reference pattern, 21 pixels (ie an area filled with foreground pixels) and a pattern to The behavior of the two matchers is compared in a concrete example. be matched. The Borgefors chamfer matching output responses is labeled with G. would be 0 as distance transform values (dtI in eq. 7) are zero. mercrediCoast image2010 are given in figure 1. A test pattern to be 7 juillet edges Intuitively each pixel of the pattern is corresponding to a pixel 21
  • 24. low value → match! Fig. 2. In (c), image response by Borgefors chamfer matcher. – In (d obtained with symmetric LDM-matcher. – A good match with the r pattern is reported by low values (with dark gray levels). Fig. 1. (a) A test image. – (b) a reference pattern, the ideal location in (a) is labeled with G. in the area N. The LDM-matcher is more selective. F that belong to b but not to a. A comparable idea can be area-N pixels, high values are obtained by the LDM-m Chamfer Matching formulated from (10) by weighting the contributionimage response by Borgefors chamfer be interpreted as image Fig. 2. In (c), of each The area-N values can matcher. – In (d), false-positiv Quadratic LDM term (Generalized Quadratic Matcher obtained with symmetric LDM-matcher. – chamfer match with and reference - GQM): the Borgefors A good matching the true-negatives f pattern is reported by low values (with dark gray levels). LDM-matcher. The LDM-matcher can thus provide les matcher nce pattern, the ideal location in (a) Fig. 2. In (c), image response by Borgefors chamfer matcher. – In (d), image AQMI,P = αdt2 P + βI dt2 . A test image. – (b) a reference pattern, the ideal location in (a) with G. I obtained with symmetric LDM-matcher. – A good match with the reference (11) pattern is reported by low values (with dark gray levels). P matching. (less false positives) positives in a pattern matching task than the Borgefors c in the area N. The LDM-matcher is more selective. For the ng to bA symmetric matcher is obtained with α =the LDM-matcher. but not to a. A comparable idea can be area-N pixels, high values are obtained by β. Asymmetric Here is an interpretation of these observations. Th neralized Quadratic Matcher - GQM): the Borgefors in the=area N. The LDM-matcher is more selective. For the d from (10) by weighting the contribution of each The area-N values can be interpreted as false-positives for ones are obtained with α = β, chamfer matching and thus provideβforfalse 0 (the density in area-N is higher than in other locations such as can true-negativesless = 22 α 1, the A comparable idea = 0, in abe 1. area-NBorgefors chamfer high values are obtained by template P is somewhere in a chamfer matching) or (11) positives β pattern matching task than the pixels, image. When the pattern the LDM-matcher. LDM-matcher. The LDM-matcher AQM 2 = αdt P + βI dt . I,P I 2 P can α matching. = mercredi 7 juillet 2010 metric matcher is obtained with α = β. Asymmetric Here is an interpretation of these observations. The pixel there is a high probability that a subset of pixels match 22
  • 25. Robust? 23 mercredi 7 juillet 2010 23
  • 26. I a) extract pattern P b) invert some pixels Pnoisy c) localize 24 mercredi 7 juillet 2010 24
  • 27. [1] A. Andreev, N. Ki Distances”, Proc. of and Recognition, pp [2] E. Baudrier, F. Nico with local-dissimilar 5, pp. 1461–1478, ja [3] G. Borgefors, ”Hiera ing algorithm”, IEE Intelligence, vol. 10 [4] Calypod - graphiC http://calypod [5] A. Ghafoor, R. N. I Algorithm”, IDEAL Hong Kong, LLNCS [6] D.P. Huttenlocher, W dorff distance”, IEE Intelligence, vol. 15 [7] U. Montanari, ”A m Texte distance”, Journal o pp. 600-624, 1968. [8] E. Rosch, ”Cognitive 4, pp. 532-547, 1975 [9] S. Santini, R. Jain, Mach. Intell., vol. 2 [10] A. Tversky, ”Featu 4, pp. 327-352, 1977 [11] B. Zitova, J. Flusse Fig. 4. Noise robustness of the Borgefors chamfer-matcher and the LDM- Vision Computing, v matcher. The mislocation error (a distance in pixel) is given with respect to the perturbation rate of the pattern (percentage of inverted pixels). localization error vs pattern perturbation matchers. The position error is estimated by the euclidean distance between the real position and the computed pattern position. For these three images, one thousand patterns have 25 mercredi 7 juillet 2010 been extracted and processed. 25
  • 28. Conclusion • Template matching via Local Dissimilarity Measure (LDM) • LDM = symmetrical Chamfer matching • Less false positives • More robust to noise 26 mercredi 7 juillet 2010 26
  • 29. Main future works • Playing with asymmetry weights • Formalize and use links with Tversky’s constrast model • Going to gray-level images similarity (soon via extended distance transform) 27 mercredi 7 juillet 2010 27

Notas do Editor

  1. where is the template? or a variation of it?
  2. Global max-min distance / good properties (robust to translation) / good for pattern recognition tasks / sensitive to ouliers
  3. For each pixel position
  4. We start with a given size window and make the window growing
  5. Keep growing until distance lower than window’s size
  6. Faster non iterative algorithm DT : fast computation via a two-pass algorithm (chamfer distance : Borgefors)
  7. only linear operations!! Only for binary image.
  8. First simple example
  9. A real example on «renaissance» printings / Where are the similarities? / Are the image similar? / Same scene?
  10. Two synthetic examples : good and bad (because of textures)
  11. Loop on I / for each position, extract a sub-image with same size as P Measure the similarity between P and I(x,y)
  12. Match score = sum of LDM values (less sensitive to outliers than HD) Can be expressed from Chamfer Matching / Local -> global vs global -> local (more consistent)
  13. The final matcher : very fast!
  14. A small parenthesis
  15. Chamfer matching : measure if there are pixels in I corresponding to P LDM Matcher : also measure if there are pixels in P corresponding to I (local) Extreme example : totally black image I
  16. Very good for low perturbations Still better than Chamfer Matching for stronger perturbations