SlideShare una empresa de Scribd logo
1 de 22
Descargar para leer sin conexión
Mean Shift Tracking

   CS4243 Computer Vision and Pattern Recognition

                     Leow Wee Kheng

              Department of Computer Science
                   School of Computing
              National University of Singapore




(CS4243)             Mean Shift Tracking            1 / 1
Mean Shift


Mean Shift

Mean Shift [Che98, FH75, Sil86]
    An algorithm that iteratively shifts a data point to the average of
    data points in its neighborhood.
    Similar to clustering.
    Useful for clustering, mode seeking, probability density estimation,
    tracking, etc.




       (CS4243)                Mean Shift Tracking                   2 / 1
Mean Shift


Consider a set S of n data points xi in d-D Euclidean space X.
Let K(x) denote a kernel function that indicates how much x
contributes to the estimation of the mean.
Then, the sample mean m at x with kernel K is given by
                                   n
                                       K(x − xi ) xi
                               i=1
                    m(x) =       n                               (1)
                                         K(x − xi )
                                   i=1

The difference m(x) − x is called mean shift.
Mean shift algorithm: iteratively move date point to its mean.
In each iteration, x ← m(x).
The algorithm stops when m(x) = x.



   (CS4243)             Mean Shift Tracking                      3 / 1
Mean Shift


The sequence x, m(x), m(m(x)), . . . is called the trajectory of x.
If sample means are computed at multiple points, then at each
iteration, update is done simultaneously to all these points.




   (CS4243)              Mean Shift Tracking                          4 / 1
Mean Shift    Kernel


Kernel

      Typically, kernel K is a function of x 2 :

                                K(x) = k( x 2 )       (2)

      k is called the profile of K.

Properties of Profile:
  1   k is nonnegative.
  2   k is nonincreasing: k(x) ≥ k(y) if x < y.
  3   k is piecewise continuous and
                                     ∞
                                         k(x)dx < ∞   (3)
                                 0




         (CS4243)              Mean Shift Tracking    5 / 1
Mean Shift   Kernel


Examples of kernels [Che98]:
    Flat kernel:
                                           1 if x ≤ 1
                            K(x) =                                  (4)
                                           0 otherwise
    Gaussian kernel:
                               K(x) = exp(− x 2 )                   (5)




                  (a) Flat kernel             (b) Gaussian kernel


       (CS4243)                 Mean Shift Tracking                 6 / 1
Mean Shift   Density Estimation


Density Estimation

   Kernel density estimation (Parzen window technique) is a popular
   method for estimating probability density
   [CRM00, CRM02, DH73].
   For a set of n data points xi in d-D space, the kernel density
   estimate with kernel K(x) (profile k(x)) and radius h is
                                        n
                   ˜              1               x − xi
                   fK (x) =                  K
                                 nhd                h
                                       i=1
                                                                    (6)
                                        n                   2
                                  1               x − xi
                           =                 k
                                 nhd                h
                                       i=1

   The quality of kernel density estimator is measured by the mean
   square error between the actual density and the estimate.

      (CS4243)              Mean Shift Tracking                      7 / 1
Mean Shift       Density Estimation


The mean square error is minimized by the Epanechnikov kernel:
                 
                  1
                         (d + 2)(1 − x 2 ) if x ≤ 1
        KE (x) =     2Cd                                    (7)
                              0           otherwise

where Cd is the volume of the unit d-D sphere, with profile
                   
                    1
                          (d + 2)(1 − x) if 0 ≤ x ≤ 1
          kE (x) =    2Cd                                        (8)
                             0           if x > 1

A more commonly used kernel is Gaussian
                              1                     1       2
                 K(x) =                  exp −        x          (9)
                             (2π)d                  2

with profile
                                   1            1
                   k(x) =                  exp − x              (10)
                               (2π)d            2
   (CS4243)             Mean Shift Tracking                      8 / 1
Mean Shift   Density Estimation


    Define another kernel G(x) = g( x 2 ) such that

                                                   dk(x)
                         g(x) = −k (x) = −                         (11)
                                                    dx


Important Result
Mean shift with kernel G moves x along the direction of the gradient of
                 ˜
density estimate f with kernel K.


    Define density estimate with kernel K.
    But, perform mean shift with kernel G.
    Then, mean shift performs gradient ascent on density estimate.




       (CS4243)              Mean Shift Tracking                     9 / 1
Mean Shift         Density Estimation


Proof:
          ˜
    Define f with kernel G
                                         n                           2
                     ˜         C                      x − xi
                     fG (x) ≡                  g                              (12)
                              nhd                       h
                                         i=1

    where C is a normalization constant.
    Mean shift M with kernel G is
                               n                            2
                                               x − xi
                                     g                              xi
                                                 h
                               i=1
                    MG (x) ≡     n                              2
                                                                         −x   (13)
                                                   x − xi
                                         g
                                                     h
                                i=1




         (CS4243)           Mean Shift Tracking                                10 / 1
Mean Shift     Density Estimation


Estimate of density gradient is the gradient of density estimate
        ˜ fK (x) ≡     ˜
                       fK (x)
                                n                              2
                       2                              x − xi
                 =                  (x − xi ) k
                     nhd+2                              h
                             i=1
                                n                              2
                                                                   (14)
                       2                             x − xi
                 =                  (xi − x) g
                     nhd+2                             h
                             i=1

                      2 ˜
                 =       fG (x)MG (x)
                     Ch2
Then,
                                     Ch2 ˜ fK (x)
                      MG (x) =                                     (15)
                                          ˜
                                      2 fG (x)
Thus, MG is an estimate of the normalized gradient of fK .
So, can use mean shift (Eq. 13) to obtain estimate of fK .
   (CS4243)             Mean Shift Tracking                         11 / 1
Mean Shift Tracking


Mean Shift Tracking

Basic Ideas [CRM00]:
    Model object using color probability density.
    Track target object in video by matching color density.
    Use mean shift to estimate color density and target location.




       (CS4243)               Mean Shift Tracking                   12 / 1
Mean Shift Tracking     Object Model


Object Model

  Let xi , i = 1, . . . , n, denote pixel locations of model centered at 0.
  Represent color distribution by discrete m-bin color histogram.
  Let b(xi ) denote the color bin of the color at xi .
  Assume size of model is normalized; so, kernel radius h = 1.
  Then, the probability q of color u in the model is
                                 n
                     qu = C           k( xi 2 ) δ(b(xi ) − u)          (16)
                                i=1

  C is the normalization constant
                                       n                   −1
                                                    2
                            C=              k( xi )                    (17)
                                      i=1

  Kernel profile k weights contribution by distance to centroid.
     (CS4243)                 Mean Shift Tracking                       13 / 1
Mean Shift Tracking   Object Model


δ is the Kronecker delta function
                                       1 if a = 0
                        δ(a) =                        (18)
                                       0 otherwise

That is, contribute k( xi 2 ) to qu if b(xi ) = u.




   (CS4243)                Mean Shift Tracking         14 / 1
Mean Shift Tracking     Target Candidate


Target Candidate

   Let yi , i = 1, . . . , nh , denote pixel locations of target centered at y.
   Then, the probability p of color u in the target is
                               nh                      2
                                             y − yi
                 pu (y) = Ch         k                         δ(b(yi ) − u)   (19)
                                               h
                               i=1

   Ch is the normalization constant
                                    nh                     2      −1
                                               y − yi
                       Ch =              k                                     (20)
                                                 h
                                  i=1




      (CS4243)                 Mean Shift Tracking                              15 / 1
Mean Shift Tracking   Color Density Matching


Color Density Matching

   Use Bhattacharyya coefficient ρ
                                            m
                          ρ(p(y), q) =               pu (y) qu          (21)
                                           u=1
                               √            √          √            √
   ρ is the cosine of vectors ( p1 , . . . , pm ) and ( q1 , . . . , qm ) .
   Large ρ means good color match.
   For each image frame, find y that maximizes ρ.
   This y is the location of the target.




      (CS4243)                 Mean Shift Tracking                       16 / 1
Mean Shift Tracking      Tracking Algorithm


Tracking Algorithm

Given {qu } of model and location y of target in previous frame:
  1   Initialize location of target in current frame as y.
  2   Compute {pu (y)} and ρ(p(y), q).
  3   Apply mean shift: Compute new location z as
                                   nh                       2
                                                 y − yi
                                        g                           yi
                                                   h
                                  i=1
                            z=      nh                          2
                                                                         (22)
                                                   y − yi
                                            g
                                                     h
                                    i=1

  4   Compute {pu (z)} and ρ(p(z), q).
  5   While ρ(p(z), q) < ρ(p(y), q), do z ← 1 (y + z).
                                            2
  6   If z − y is small enough, stop. Else, set y ← z and goto (1).

         (CS4243)                Mean Shift Tracking                      17 / 1
Mean Shift Tracking   Tracking Algorithm


Step 3: In practice, a window of pixels yi is considered.
Size of window is related to h.
Step 5 is used to validate the target’s new location.
Can stop Step 5 if y and z round off to the same pixel.
Tests show that Step 5 is needed only 0.1% of the time.
Step 6: can stop algorithm if y and z round off to the same pixel.
To track object that changes size, varies radius h
(see [CRM00] for details).




   (CS4243)               Mean Shift Tracking                  18 / 1
Mean Shift Tracking   Tracking Algorithm


Example 1: Track football player no. 78 [CRM00].




       (CS4243)              Mean Shift Tracking              19 / 1
Mean Shift Tracking   Tracking Algorithm


Example 2: Track a passenger in train station [CRM00].




       (CS4243)              Mean Shift Tracking              20 / 1
Reference


Reference I

  Y. Cheng.
  Mean shift, mode seeking, and clustering.
  IEEE Trans. on Pattern Analysis and Machine Intelligence,
  17(8):790–799, 1998.
  D. Comaniciu, V. Ramesh, and P. Meer.
  Real-time tracking of non-rigid objects using mean shift.
  In IEEE Proc. on Computer Vision and Pattern Recognition, pages
  673–678, 2000.
  D. Comaniciu, V. Ramesh, and P. Meer.
  Mean shift: A robust approach towards feature space analysis.
  IEEE Trans. on Pattern Analysis and Machine Intelligence,
  24(5):603–619, 2002.



     (CS4243)             Mean Shift Tracking                     21 / 1
Reference


Reference II

   R. O. Duda and P. E. Hart.
   Pattern Classification and Scene Analysis.
   Wiley, 1973.
   K. Fukunaga and L. D. Hostetler.
   The estimation of the gradient of a density function, with
   applications in pattern recognition.
   IEEE Trans. on Information Theory, 21:32–40, 1975.
   B. W. Silverman.
   Density Estimation for Statistics and Data Analysis.
   Chapman and Hall, 1986.




      (CS4243)             Mean Shift Tracking                  22 / 1

Más contenido relacionado

La actualidad más candente

AlexNet, VGG, GoogleNet, Resnet
AlexNet, VGG, GoogleNet, ResnetAlexNet, VGG, GoogleNet, Resnet
AlexNet, VGG, GoogleNet, ResnetJungwon Kim
 
Image anomaly detection with generative adversarial networks
Image anomaly detection with generative adversarial networksImage anomaly detection with generative adversarial networks
Image anomaly detection with generative adversarial networksSakshiSingh480
 
Probability & Information theory
Probability & Information theoryProbability & Information theory
Probability & Information theory성재 최
 
Image Interpolation Techniques with Optical and Digital Zoom Concepts
Image Interpolation Techniques with Optical and Digital Zoom ConceptsImage Interpolation Techniques with Optical and Digital Zoom Concepts
Image Interpolation Techniques with Optical and Digital Zoom Conceptsmmjalbiaty
 
Unit I & II in Principles of Soft computing
Unit I & II in Principles of Soft computing Unit I & II in Principles of Soft computing
Unit I & II in Principles of Soft computing Sivagowry Shathesh
 
Introduction to Evidential Neural Networks
Introduction to Evidential Neural NetworksIntroduction to Evidential Neural Networks
Introduction to Evidential Neural NetworksFederico Cerutti
 
Convolutional Neural Network and Its Applications
Convolutional Neural Network and Its ApplicationsConvolutional Neural Network and Its Applications
Convolutional Neural Network and Its ApplicationsKasun Chinthaka Piyarathna
 
Generative adversarial networks
Generative adversarial networksGenerative adversarial networks
Generative adversarial networks남주 김
 
k medoid clustering.pptx
k medoid clustering.pptxk medoid clustering.pptx
k medoid clustering.pptxRoshan86572
 
Mean shift and Hierarchical clustering
Mean shift and Hierarchical clustering Mean shift and Hierarchical clustering
Mean shift and Hierarchical clustering Yan Xu
 
08 frequency domain filtering DIP
08 frequency domain filtering DIP08 frequency domain filtering DIP
08 frequency domain filtering DIPbabak danyal
 
KNN Algorithm - How KNN Algorithm Works With Example | Data Science For Begin...
KNN Algorithm - How KNN Algorithm Works With Example | Data Science For Begin...KNN Algorithm - How KNN Algorithm Works With Example | Data Science For Begin...
KNN Algorithm - How KNN Algorithm Works With Example | Data Science For Begin...Simplilearn
 

La actualidad más candente (20)

AlexNet, VGG, GoogleNet, Resnet
AlexNet, VGG, GoogleNet, ResnetAlexNet, VGG, GoogleNet, Resnet
AlexNet, VGG, GoogleNet, Resnet
 
Unit ii
Unit iiUnit ii
Unit ii
 
Support vector machine
Support vector machineSupport vector machine
Support vector machine
 
Image anomaly detection with generative adversarial networks
Image anomaly detection with generative adversarial networksImage anomaly detection with generative adversarial networks
Image anomaly detection with generative adversarial networks
 
Probability & Information theory
Probability & Information theoryProbability & Information theory
Probability & Information theory
 
K Nearest Neighbor Algorithm
K Nearest Neighbor AlgorithmK Nearest Neighbor Algorithm
K Nearest Neighbor Algorithm
 
Image Interpolation Techniques with Optical and Digital Zoom Concepts
Image Interpolation Techniques with Optical and Digital Zoom ConceptsImage Interpolation Techniques with Optical and Digital Zoom Concepts
Image Interpolation Techniques with Optical and Digital Zoom Concepts
 
Module 31
Module 31Module 31
Module 31
 
GMM
GMMGMM
GMM
 
Unit I & II in Principles of Soft computing
Unit I & II in Principles of Soft computing Unit I & II in Principles of Soft computing
Unit I & II in Principles of Soft computing
 
Introduction to Evidential Neural Networks
Introduction to Evidential Neural NetworksIntroduction to Evidential Neural Networks
Introduction to Evidential Neural Networks
 
Convolutional Neural Network and Its Applications
Convolutional Neural Network and Its ApplicationsConvolutional Neural Network and Its Applications
Convolutional Neural Network and Its Applications
 
Generative adversarial networks
Generative adversarial networksGenerative adversarial networks
Generative adversarial networks
 
Activation function
Activation functionActivation function
Activation function
 
Image denoising
Image denoising Image denoising
Image denoising
 
k medoid clustering.pptx
k medoid clustering.pptxk medoid clustering.pptx
k medoid clustering.pptx
 
Mean shift and Hierarchical clustering
Mean shift and Hierarchical clustering Mean shift and Hierarchical clustering
Mean shift and Hierarchical clustering
 
08 frequency domain filtering DIP
08 frequency domain filtering DIP08 frequency domain filtering DIP
08 frequency domain filtering DIP
 
KNN Algorithm - How KNN Algorithm Works With Example | Data Science For Begin...
KNN Algorithm - How KNN Algorithm Works With Example | Data Science For Begin...KNN Algorithm - How KNN Algorithm Works With Example | Data Science For Begin...
KNN Algorithm - How KNN Algorithm Works With Example | Data Science For Begin...
 
Euclidean Distance And Manhattan Distance
Euclidean Distance And Manhattan DistanceEuclidean Distance And Manhattan Distance
Euclidean Distance And Manhattan Distance
 

Destacado

★Mean shift a_robust_approach_to_feature_space_analysis
★Mean shift a_robust_approach_to_feature_space_analysis★Mean shift a_robust_approach_to_feature_space_analysis
★Mean shift a_robust_approach_to_feature_space_analysisirisshicat
 
TS-IASSL2014
TS-IASSL2014TS-IASSL2014
TS-IASSL2014ychaubey
 
Speech Processing in Stressing Co-Channel Interference Using the Wigner Distr...
Speech Processing in Stressing Co-Channel Interference Using the Wigner Distr...Speech Processing in Stressing Co-Channel Interference Using the Wigner Distr...
Speech Processing in Stressing Co-Channel Interference Using the Wigner Distr...CSCJournals
 
ピンホールカメラモデル
ピンホールカメラモデルピンホールカメラモデル
ピンホールカメラモデルShohei Mori
 
カメラ位置姿勢とビュー行列
カメラ位置姿勢とビュー行列カメラ位置姿勢とビュー行列
カメラ位置姿勢とビュー行列Shohei Mori
 
Limonta - Input2012
Limonta -  Input2012Limonta -  Input2012
Limonta - Input2012INPUT 2012
 
Chaubey seminarslides2017
Chaubey seminarslides2017Chaubey seminarslides2017
Chaubey seminarslides2017ychaubey
 
エピポーラ幾何 (Epipolar geometry)
エピポーラ幾何 (Epipolar geometry)エピポーラ幾何 (Epipolar geometry)
エピポーラ幾何 (Epipolar geometry)Shohei Mori
 
Image-Based Rendering 各手法の直感的理解
Image-Based Rendering各手法の直感的理解Image-Based Rendering各手法の直感的理解
Image-Based Rendering 各手法の直感的理解Shohei Mori
 
ISMAR2016まとめ
ISMAR2016まとめISMAR2016まとめ
ISMAR2016まとめShohei Mori
 
Compressed air car technology
Compressed air car technologyCompressed air car technology
Compressed air car technologykeshav goyal
 
K means clustering
K means clusteringK means clustering
K means clusteringkeshav goyal
 
Real Time Object Tracking
Real Time Object TrackingReal Time Object Tracking
Real Time Object TrackingVanya Valindria
 
Snakes in Images (Active contour tutorial)
Snakes in Images (Active contour tutorial)Snakes in Images (Active contour tutorial)
Snakes in Images (Active contour tutorial)Yan Xu
 
K mean-clustering algorithm
K mean-clustering algorithmK mean-clustering algorithm
K mean-clustering algorithmparry prabhu
 
Kernel Bayes Rule
Kernel Bayes RuleKernel Bayes Rule
Kernel Bayes RuleYan Xu
 

Destacado (20)

★Mean shift a_robust_approach_to_feature_space_analysis
★Mean shift a_robust_approach_to_feature_space_analysis★Mean shift a_robust_approach_to_feature_space_analysis
★Mean shift a_robust_approach_to_feature_space_analysis
 
TS-IASSL2014
TS-IASSL2014TS-IASSL2014
TS-IASSL2014
 
Bwright
BwrightBwright
Bwright
 
Speech Processing in Stressing Co-Channel Interference Using the Wigner Distr...
Speech Processing in Stressing Co-Channel Interference Using the Wigner Distr...Speech Processing in Stressing Co-Channel Interference Using the Wigner Distr...
Speech Processing in Stressing Co-Channel Interference Using the Wigner Distr...
 
27. cognitive radio
27. cognitive radio27. cognitive radio
27. cognitive radio
 
ピンホールカメラモデル
ピンホールカメラモデルピンホールカメラモデル
ピンホールカメラモデル
 
カメラ位置姿勢とビュー行列
カメラ位置姿勢とビュー行列カメラ位置姿勢とビュー行列
カメラ位置姿勢とビュー行列
 
Limonta - Input2012
Limonta -  Input2012Limonta -  Input2012
Limonta - Input2012
 
CVIM mean shift-3
CVIM mean shift-3CVIM mean shift-3
CVIM mean shift-3
 
Chaubey seminarslides2017
Chaubey seminarslides2017Chaubey seminarslides2017
Chaubey seminarslides2017
 
エピポーラ幾何 (Epipolar geometry)
エピポーラ幾何 (Epipolar geometry)エピポーラ幾何 (Epipolar geometry)
エピポーラ幾何 (Epipolar geometry)
 
Image-Based Rendering 各手法の直感的理解
Image-Based Rendering各手法の直感的理解Image-Based Rendering各手法の直感的理解
Image-Based Rendering 各手法の直感的理解
 
ISMAR2016まとめ
ISMAR2016まとめISMAR2016まとめ
ISMAR2016まとめ
 
Compressed air car technology
Compressed air car technologyCompressed air car technology
Compressed air car technology
 
K means clustering
K means clusteringK means clustering
K means clustering
 
Real Time Object Tracking
Real Time Object TrackingReal Time Object Tracking
Real Time Object Tracking
 
Object tracking
Object trackingObject tracking
Object tracking
 
Snakes in Images (Active contour tutorial)
Snakes in Images (Active contour tutorial)Snakes in Images (Active contour tutorial)
Snakes in Images (Active contour tutorial)
 
K mean-clustering algorithm
K mean-clustering algorithmK mean-clustering algorithm
K mean-clustering algorithm
 
Kernel Bayes Rule
Kernel Bayes RuleKernel Bayes Rule
Kernel Bayes Rule
 

Similar a Meanshift Tracking Presentation

A Measure Of Independence For A Multifariate Normal Distribution And Some Con...
A Measure Of Independence For A Multifariate Normal Distribution And Some Con...A Measure Of Independence For A Multifariate Normal Distribution And Some Con...
A Measure Of Independence For A Multifariate Normal Distribution And Some Con...ganuraga
 
A Measure Of Independence For A Multifariate Normal Distribution And Some Con...
A Measure Of Independence For A Multifariate Normal Distribution And Some Con...A Measure Of Independence For A Multifariate Normal Distribution And Some Con...
A Measure Of Independence For A Multifariate Normal Distribution And Some Con...gueste63bd9
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...ijceronline
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
Least squares support Vector Machine Classifier
Least squares support Vector Machine ClassifierLeast squares support Vector Machine Classifier
Least squares support Vector Machine ClassifierRaj Sikarwar
 
Lesson 26: The Fundamental Theorem of Calculus (Section 4 version)
Lesson 26: The Fundamental Theorem of Calculus (Section 4 version)Lesson 26: The Fundamental Theorem of Calculus (Section 4 version)
Lesson 26: The Fundamental Theorem of Calculus (Section 4 version)Matthew Leingang
 
How good are interior point methods? Klee–Minty cubes tighten iteration-compl...
How good are interior point methods? Klee–Minty cubes tighten iteration-compl...How good are interior point methods? Klee–Minty cubes tighten iteration-compl...
How good are interior point methods? Klee–Minty cubes tighten iteration-compl...SSA KPI
 
Lesson 31: Evaluating Definite Integrals
Lesson 31: Evaluating Definite IntegralsLesson 31: Evaluating Definite Integrals
Lesson 31: Evaluating Definite IntegralsMatthew Leingang
 
Fluctuations and rare events in stochastic aggregation
Fluctuations and rare events in stochastic aggregationFluctuations and rare events in stochastic aggregation
Fluctuations and rare events in stochastic aggregationColm Connaughton
 
Information-theoretic clustering with applications
Information-theoretic clustering  with applicationsInformation-theoretic clustering  with applications
Information-theoretic clustering with applicationsFrank Nielsen
 
QMC Error SAMSI Tutorial Aug 2017
QMC Error SAMSI Tutorial Aug 2017QMC Error SAMSI Tutorial Aug 2017
QMC Error SAMSI Tutorial Aug 2017Fred J. Hickernell
 
Hierarchical matrices for approximating large covariance matries and computin...
Hierarchical matrices for approximating large covariance matries and computin...Hierarchical matrices for approximating large covariance matries and computin...
Hierarchical matrices for approximating large covariance matries and computin...Alexander Litvinenko
 
Automatic Bayesian method for Numerical Integration
Automatic Bayesian method for Numerical Integration Automatic Bayesian method for Numerical Integration
Automatic Bayesian method for Numerical Integration Jagadeeswaran Rathinavel
 
Social Network Analysis
Social Network AnalysisSocial Network Analysis
Social Network Analysisrik0
 
Munich07 Foils
Munich07 FoilsMunich07 Foils
Munich07 FoilsAntonini
 
Engr 213 final 2009
Engr 213 final 2009Engr 213 final 2009
Engr 213 final 2009akabaka12
 

Similar a Meanshift Tracking Presentation (20)

A Measure Of Independence For A Multifariate Normal Distribution And Some Con...
A Measure Of Independence For A Multifariate Normal Distribution And Some Con...A Measure Of Independence For A Multifariate Normal Distribution And Some Con...
A Measure Of Independence For A Multifariate Normal Distribution And Some Con...
 
A Measure Of Independence For A Multifariate Normal Distribution And Some Con...
A Measure Of Independence For A Multifariate Normal Distribution And Some Con...A Measure Of Independence For A Multifariate Normal Distribution And Some Con...
A Measure Of Independence For A Multifariate Normal Distribution And Some Con...
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
 
Least squares support Vector Machine Classifier
Least squares support Vector Machine ClassifierLeast squares support Vector Machine Classifier
Least squares support Vector Machine Classifier
 
Lesson 26: The Fundamental Theorem of Calculus (Section 4 version)
Lesson 26: The Fundamental Theorem of Calculus (Section 4 version)Lesson 26: The Fundamental Theorem of Calculus (Section 4 version)
Lesson 26: The Fundamental Theorem of Calculus (Section 4 version)
 
How good are interior point methods? Klee–Minty cubes tighten iteration-compl...
How good are interior point methods? Klee–Minty cubes tighten iteration-compl...How good are interior point methods? Klee–Minty cubes tighten iteration-compl...
How good are interior point methods? Klee–Minty cubes tighten iteration-compl...
 
Assignment6
Assignment6Assignment6
Assignment6
 
Lesson 31: Evaluating Definite Integrals
Lesson 31: Evaluating Definite IntegralsLesson 31: Evaluating Definite Integrals
Lesson 31: Evaluating Definite Integrals
 
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
 
Fluctuations and rare events in stochastic aggregation
Fluctuations and rare events in stochastic aggregationFluctuations and rare events in stochastic aggregation
Fluctuations and rare events in stochastic aggregation
 
Information-theoretic clustering with applications
Information-theoretic clustering  with applicationsInformation-theoretic clustering  with applications
Information-theoretic clustering with applications
 
QMC Error SAMSI Tutorial Aug 2017
QMC Error SAMSI Tutorial Aug 2017QMC Error SAMSI Tutorial Aug 2017
QMC Error SAMSI Tutorial Aug 2017
 
Hierarchical matrices for approximating large covariance matries and computin...
Hierarchical matrices for approximating large covariance matries and computin...Hierarchical matrices for approximating large covariance matries and computin...
Hierarchical matrices for approximating large covariance matries and computin...
 
Automatic Bayesian method for Numerical Integration
Automatic Bayesian method for Numerical Integration Automatic Bayesian method for Numerical Integration
Automatic Bayesian method for Numerical Integration
 
SSA slides
SSA slidesSSA slides
SSA slides
 
Social Network Analysis
Social Network AnalysisSocial Network Analysis
Social Network Analysis
 
Munich07 Foils
Munich07 FoilsMunich07 Foils
Munich07 Foils
 
Engr 213 final 2009
Engr 213 final 2009Engr 213 final 2009
Engr 213 final 2009
 
Md2521102111
Md2521102111Md2521102111
Md2521102111
 

Último

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Meanshift Tracking Presentation

  • 1. Mean Shift Tracking CS4243 Computer Vision and Pattern Recognition Leow Wee Kheng Department of Computer Science School of Computing National University of Singapore (CS4243) Mean Shift Tracking 1 / 1
  • 2. Mean Shift Mean Shift Mean Shift [Che98, FH75, Sil86] An algorithm that iteratively shifts a data point to the average of data points in its neighborhood. Similar to clustering. Useful for clustering, mode seeking, probability density estimation, tracking, etc. (CS4243) Mean Shift Tracking 2 / 1
  • 3. Mean Shift Consider a set S of n data points xi in d-D Euclidean space X. Let K(x) denote a kernel function that indicates how much x contributes to the estimation of the mean. Then, the sample mean m at x with kernel K is given by n K(x − xi ) xi i=1 m(x) = n (1) K(x − xi ) i=1 The difference m(x) − x is called mean shift. Mean shift algorithm: iteratively move date point to its mean. In each iteration, x ← m(x). The algorithm stops when m(x) = x. (CS4243) Mean Shift Tracking 3 / 1
  • 4. Mean Shift The sequence x, m(x), m(m(x)), . . . is called the trajectory of x. If sample means are computed at multiple points, then at each iteration, update is done simultaneously to all these points. (CS4243) Mean Shift Tracking 4 / 1
  • 5. Mean Shift Kernel Kernel Typically, kernel K is a function of x 2 : K(x) = k( x 2 ) (2) k is called the profile of K. Properties of Profile: 1 k is nonnegative. 2 k is nonincreasing: k(x) ≥ k(y) if x < y. 3 k is piecewise continuous and ∞ k(x)dx < ∞ (3) 0 (CS4243) Mean Shift Tracking 5 / 1
  • 6. Mean Shift Kernel Examples of kernels [Che98]: Flat kernel: 1 if x ≤ 1 K(x) = (4) 0 otherwise Gaussian kernel: K(x) = exp(− x 2 ) (5) (a) Flat kernel (b) Gaussian kernel (CS4243) Mean Shift Tracking 6 / 1
  • 7. Mean Shift Density Estimation Density Estimation Kernel density estimation (Parzen window technique) is a popular method for estimating probability density [CRM00, CRM02, DH73]. For a set of n data points xi in d-D space, the kernel density estimate with kernel K(x) (profile k(x)) and radius h is n ˜ 1 x − xi fK (x) = K nhd h i=1 (6) n 2 1 x − xi = k nhd h i=1 The quality of kernel density estimator is measured by the mean square error between the actual density and the estimate. (CS4243) Mean Shift Tracking 7 / 1
  • 8. Mean Shift Density Estimation The mean square error is minimized by the Epanechnikov kernel:   1 (d + 2)(1 − x 2 ) if x ≤ 1 KE (x) = 2Cd (7)  0 otherwise where Cd is the volume of the unit d-D sphere, with profile   1 (d + 2)(1 − x) if 0 ≤ x ≤ 1 kE (x) = 2Cd (8)  0 if x > 1 A more commonly used kernel is Gaussian 1 1 2 K(x) = exp − x (9) (2π)d 2 with profile 1 1 k(x) = exp − x (10) (2π)d 2 (CS4243) Mean Shift Tracking 8 / 1
  • 9. Mean Shift Density Estimation Define another kernel G(x) = g( x 2 ) such that dk(x) g(x) = −k (x) = − (11) dx Important Result Mean shift with kernel G moves x along the direction of the gradient of ˜ density estimate f with kernel K. Define density estimate with kernel K. But, perform mean shift with kernel G. Then, mean shift performs gradient ascent on density estimate. (CS4243) Mean Shift Tracking 9 / 1
  • 10. Mean Shift Density Estimation Proof: ˜ Define f with kernel G n 2 ˜ C x − xi fG (x) ≡ g (12) nhd h i=1 where C is a normalization constant. Mean shift M with kernel G is n 2 x − xi g xi h i=1 MG (x) ≡ n 2 −x (13) x − xi g h i=1 (CS4243) Mean Shift Tracking 10 / 1
  • 11. Mean Shift Density Estimation Estimate of density gradient is the gradient of density estimate ˜ fK (x) ≡ ˜ fK (x) n 2 2 x − xi = (x − xi ) k nhd+2 h i=1 n 2 (14) 2 x − xi = (xi − x) g nhd+2 h i=1 2 ˜ = fG (x)MG (x) Ch2 Then, Ch2 ˜ fK (x) MG (x) = (15) ˜ 2 fG (x) Thus, MG is an estimate of the normalized gradient of fK . So, can use mean shift (Eq. 13) to obtain estimate of fK . (CS4243) Mean Shift Tracking 11 / 1
  • 12. Mean Shift Tracking Mean Shift Tracking Basic Ideas [CRM00]: Model object using color probability density. Track target object in video by matching color density. Use mean shift to estimate color density and target location. (CS4243) Mean Shift Tracking 12 / 1
  • 13. Mean Shift Tracking Object Model Object Model Let xi , i = 1, . . . , n, denote pixel locations of model centered at 0. Represent color distribution by discrete m-bin color histogram. Let b(xi ) denote the color bin of the color at xi . Assume size of model is normalized; so, kernel radius h = 1. Then, the probability q of color u in the model is n qu = C k( xi 2 ) δ(b(xi ) − u) (16) i=1 C is the normalization constant n −1 2 C= k( xi ) (17) i=1 Kernel profile k weights contribution by distance to centroid. (CS4243) Mean Shift Tracking 13 / 1
  • 14. Mean Shift Tracking Object Model δ is the Kronecker delta function 1 if a = 0 δ(a) = (18) 0 otherwise That is, contribute k( xi 2 ) to qu if b(xi ) = u. (CS4243) Mean Shift Tracking 14 / 1
  • 15. Mean Shift Tracking Target Candidate Target Candidate Let yi , i = 1, . . . , nh , denote pixel locations of target centered at y. Then, the probability p of color u in the target is nh 2 y − yi pu (y) = Ch k δ(b(yi ) − u) (19) h i=1 Ch is the normalization constant nh 2 −1 y − yi Ch = k (20) h i=1 (CS4243) Mean Shift Tracking 15 / 1
  • 16. Mean Shift Tracking Color Density Matching Color Density Matching Use Bhattacharyya coefficient ρ m ρ(p(y), q) = pu (y) qu (21) u=1 √ √ √ √ ρ is the cosine of vectors ( p1 , . . . , pm ) and ( q1 , . . . , qm ) . Large ρ means good color match. For each image frame, find y that maximizes ρ. This y is the location of the target. (CS4243) Mean Shift Tracking 16 / 1
  • 17. Mean Shift Tracking Tracking Algorithm Tracking Algorithm Given {qu } of model and location y of target in previous frame: 1 Initialize location of target in current frame as y. 2 Compute {pu (y)} and ρ(p(y), q). 3 Apply mean shift: Compute new location z as nh 2 y − yi g yi h i=1 z= nh 2 (22) y − yi g h i=1 4 Compute {pu (z)} and ρ(p(z), q). 5 While ρ(p(z), q) < ρ(p(y), q), do z ← 1 (y + z). 2 6 If z − y is small enough, stop. Else, set y ← z and goto (1). (CS4243) Mean Shift Tracking 17 / 1
  • 18. Mean Shift Tracking Tracking Algorithm Step 3: In practice, a window of pixels yi is considered. Size of window is related to h. Step 5 is used to validate the target’s new location. Can stop Step 5 if y and z round off to the same pixel. Tests show that Step 5 is needed only 0.1% of the time. Step 6: can stop algorithm if y and z round off to the same pixel. To track object that changes size, varies radius h (see [CRM00] for details). (CS4243) Mean Shift Tracking 18 / 1
  • 19. Mean Shift Tracking Tracking Algorithm Example 1: Track football player no. 78 [CRM00]. (CS4243) Mean Shift Tracking 19 / 1
  • 20. Mean Shift Tracking Tracking Algorithm Example 2: Track a passenger in train station [CRM00]. (CS4243) Mean Shift Tracking 20 / 1
  • 21. Reference Reference I Y. Cheng. Mean shift, mode seeking, and clustering. IEEE Trans. on Pattern Analysis and Machine Intelligence, 17(8):790–799, 1998. D. Comaniciu, V. Ramesh, and P. Meer. Real-time tracking of non-rigid objects using mean shift. In IEEE Proc. on Computer Vision and Pattern Recognition, pages 673–678, 2000. D. Comaniciu, V. Ramesh, and P. Meer. Mean shift: A robust approach towards feature space analysis. IEEE Trans. on Pattern Analysis and Machine Intelligence, 24(5):603–619, 2002. (CS4243) Mean Shift Tracking 21 / 1
  • 22. Reference Reference II R. O. Duda and P. E. Hart. Pattern Classification and Scene Analysis. Wiley, 1973. K. Fukunaga and L. D. Hostetler. The estimation of the gradient of a density function, with applications in pattern recognition. IEEE Trans. on Information Theory, 21:32–40, 1975. B. W. Silverman. Density Estimation for Statistics and Data Analysis. Chapman and Hall, 1986. (CS4243) Mean Shift Tracking 22 / 1