Image processing and computer vision Chapter 7 Mean-shift and cam-shift Ref o[1 Dorin Comaniciu, Peter Meer, "Mean Shift: A Robust Approach Toward Feature Space Analysis"Volume 24, Issue 5(May 2002),IEEE Transactions on Pattern Analysis and Machine Intelligence o[2] web. missouri. edu/ hantx/ECE8001/notes/Lect7 mean shift. pdf Camshift v 0.a
Image processing and computer vision Chapter 7: Mean-shift and Cam-shift Ref ⚫[1] Dorin Comaniciu, Peter Meer,"Mean Shift: A Robust Approach Toward Feature Space Analysis"Volume 24 , Issue 5 (May 2002),IEEE Transactions on Pattern Analysis and Machine Intelligence ⚫[2] web.missouri.edu/~hantx/ECE8001/notes/Lect7_mean_shift.pdf Camshift v.0.a 1
INtroduction Kernel density I Kernel choices Peak finding I Mean-shift Cam-shift What is Mean-shift? Find the peak of a probability function by the change of the mean of the data Applications Non-rigid object tracking Segmentation Camshift v 0.a
Introduction | Kernel density | Kernel choices | Peak finding | Mean-shift | Cam-shift What is Mean-shift? • Find the peak of a probability function by the change of the mean of the data • Applications: – Non-rigid object tracking – Segmentation Camshift v.0.a 2
INtroduction Kernel density I Kernel choices Peak finding I Mean-shift Cam-shift Applications: segmentation of regions of images in a movie Use color to segment the image into logical regions for analysIS If the regions are moving mean-shift is useful Camshift v 0.a .https://www.youtube.com/watch?v=rdtun7a6h08
Introduction | Kernel density | Kernel choices | Peak finding | Mean-shift | Cam-shift Applications: segmentation of regions of images in a movie • Use color to segment the image into logical regions for analysis. • If the regions are moving , mean-shift is useful. Camshift v.0.a 3 •https://www.youtube.com/watch?v=rDTun7A6HO8
INtroduction Kernel density I Kernel choices Peak finding I Mean-shift Cam-shift Application: tracking non- rigid object Human tracking http://ww.youtubecom/watch?v=zltjpfpp9hy Camshift v.0.a
Introduction | Kernel density | Kernel choices | Peak finding | Mean-shift | Cam-shift Application: tracking non-rigid object • Human tracking Camshift v.0.a 4 http://www.youtube.com/watch?v=zLtjPfPP9HY
INtroduction Kernel density I Kernel choices Peak finding I Mean-shift Cam-shift Intuition: find the mode by mean shift Target: Find the modes (peaks in a set of sample data The mode of a continuous probability distribution is the peak There may be multiple peaks The method used is called mean-shift MIX By finding the shift of the mean, we can find the 8a s mode (peak) It can be used to segment an image into logical regions. e.g. within each region, the color is the same Camshift v 0.a 5
Introduction | Kernel density | Kernel choices | Peak finding | Mean-shift | Cam-shift Intuition: find the mode by mean-shift • Target : Find the modes (peaks) in a set of sample data. – The mode of a continuous probability distribution is the peak. – There may be multiple peaks. • The method used is called mean-shift. – By finding the shift of the mean, we can find the mode (peak) • It can be used to segment an image into logical regions. (e.g. within each region, the color is the same.) Camshift v.0.a 5
INtroduction Kernel density I Kernel choices Peak finding I Mean-shift Cam-shift First we need to understand the Probability density Function PDF We use Kernel density estimation to find PDF Obtain the probability function from samples Camshift v 0.a 6
Introduction | Kernel density | Kernel choices | Peak finding | Mean-shift | Cam-shift First we need to understand the Probability Density Function PDF We use Kernel density estimation to find PDF Obtain the probability function from samples Camshift v.0.a 6
Introduction (Kernel density Kernel choices I Peak finding I Mean-shift |Cam-shift Motivation for Kernel density estimation to find pdf The formula(parametric form) of the PDf (probability density function is difficult to find Use sampling method to estimate the p.D.f That means: Gaussian(a parametric form with mean, standard deviation etc. is easy to use) but it is too simple to model real life problems PDF(X N/iToo simple to model o onaL HR real life problems KN(x)=ceiiA X An irregular shape pdf, the distribution Gaussian distribution Is difficult to model using parameters camshift v .a --use non-parametric methods instead
Introduction | Kernel density | Kernel choices | Peak finding | Mean-shift | Cam-shift Motivation for Kernel density estimation to find PDF • The formula (parametric form) of the PDF (probability density function) is difficult to find. • Use sampling method to estimate the P.D.F. • That means: Gaussian ( a parametric form with mean , standard deviation etc., is easy to use), but it is too simple to model real life problems. 2 || || 2 1 ( ) x N K x c e − = Camshift v.0.a 7 Gaussian distribution An irregular shape PDF, the distribution Is difficult to model using parameters --use non-parametric methods instead PDF(x) 0 x Too simple to model real life problems
IntroductionKKernel density Kernel choices I Peak finding IMean-shiftICam-shift Example Outbreak of flu in a year How do you model this pdf? CUHK Clinic Patients Number 100+ Per day 3 9 12 month Camshift v 0.a 8
Introduction | Kernel density | Kernel choices | Peak finding | Mean-shift | Cam-shift Example • Outbreak of flu in a year • How do you model this PDF? Camshift v.0.a 8 month CUHK Clinic Patients Number Per day 3 6 9 12 100
Introduction KErnel density Kernel choices I Peak finding I Mean-shift I Cam-shift Kernel density estimation KDE Demo mei Density Estm Dataset 0waBa们a钟(动 https://courses.cs.ut.ee/demos/kernel-Density-estimation/ https:/en.wikipedia.org/wiki/kerneldensityestimation Camshift v 0.a 9
Introduction | Kernel density | Kernel choices | Peak finding | Mean-shift | Cam-shift Kernel density estimation KDE Demo • Camshift v.0.a 9 https://courses.cs.ut.ee/demos/kernel-density-estimation/ https://en.wikipedia.org/wiki/Kernel_density_estimation
Introduction KErnel density Kernel choices I Peak finding I Mean-shift I Cam-shift kernel density distribution function K is a function To be explained(see slide 19) The general form of a kernel x-xi density distribution function x)=∑k The Kernel (k) has many n=number of samples choices h= window radius Epanechnikov d= dimension Uniform get position Normal ( gaussian) x= samples C= normalization constant Camshift v 0.a
Introduction | Kernel density | Kernel choices | Peak finding | Mean-shift | Cam-shift kernel density distribution function • The general form of a kernel density distribution function • The Kernel (K) has many choices – Epanechnikov – Uniform – Normal (Gaussian) C normalization constant samples target position dimension window radius number of samples ( ) ˆ 1 = = = = = = − = = i n i i h d x xd h n h x x K nhC f x Camshift v.0.a 10 K is a function: To be explained (see slide19)