Patch tracking based on comparing its pixels 1

Podobné dokumenty
Patch tracking based on comparing its pixels 1

Gymnázium, Brno, Slovanské nám. 7 WORKBOOK. Mathematics. Teacher: Student:

Geometry of image formation

Tento materiál byl vytvořen v rámci projektu Operačního programu Vzdělávání pro konkurenceschopnost.

VY_32_INOVACE_06_Předpřítomný čas_03. Škola: Základní škola Slušovice, okres Zlín, příspěvková organizace

Introduction to MS Dynamics NAV

Návrh a implementace algoritmů pro adaptivní řízení průmyslových robotů

USING VIDEO IN PRE-SET AND IN-SET TEACHER TRAINING

GUIDELINES FOR CONNECTION TO FTP SERVER TO TRANSFER PRINTING DATA

Tento materiál byl vytvořen v rámci projektu Operačního programu Vzdělávání pro konkurenceschopnost.

Náhradník Náhradník 5.A

Perception Motivated Hybrid Approach to Tone Mapping

WORKSHEET 1: LINEAR EQUATION 1

User manual SŘHV Online WEB interface for CUSTOMERS June 2017 version 14 VÍTKOVICE STEEL, a.s. vitkovicesteel.com

Compression of a Dictionary

Projekt: ŠKOLA RADOSTI, ŠKOLA KVALITY Registrační číslo projektu: CZ.1.07/1.4.00/ EU PENÍZE ŠKOLÁM

II_2-01_39 ABBA,Happy New Year, řešení II_2-01_39 ABBA,Happy New Year, for students

Tabulka 1 Stav členské základny SK Praga Vysočany k roku 2015 Tabulka 2 Výše členských příspěvků v SK Praga Vysočany Tabulka 3 Přehled finanční

EU peníze středním školám digitální učební materiál

Využití hybridní metody vícekriteriálního rozhodování za nejistoty. Michal Koláček, Markéta Matulová

Škola: Střední škola obchodní, České Budějovice, Husova 9. Inovace a zkvalitnění výuky prostřednictvím ICT

Střední průmyslová škola strojnická Olomouc, tř.17. listopadu 49

Informace o písemných přijímacích zkouškách. Doktorské studijní programy Matematika

Náhradník Náhradník 5.A

Extrakce nezávislé komponenty

Vánoční sety Christmas sets

EXACT DS OFFICE. The best lens for office work

PSANÍ. M e t o d i c k é p o z n á m k y k z á k l a d o v é m u t e x t u :

Czech Republic. EDUCAnet. Střední odborná škola Pardubice, s.r.o.

Aplikace matematiky. Dana Lauerová A note to the theory of periodic solutions of a parabolic equation

Just write down your most recent and important education. Remember that sometimes less is more some people may be considered overqualified.

Algebraic methods in Computer Vision Zuzana Kukelova, Tomas Pajdla, Martin Bujnak

Tento materiál byl vytvořen v rámci projektu Operačního programu Vzdělávání pro konkurenceschopnost.

Invitation to ON-ARRIVAL TRAINING COURSE for EVS volunteers

Název školy STŘEDNÍ ODBORNÁ ŠKOLA a STŘEDNÍ ODBORNÉ UČILIŠTĚ, Česká Lípa, 28. října 2707, příspěvková organizace

Comparation of mobile

Výukový materiál zpracovaný v rámci operačního programu Vzdělávání pro konkurenceschopnost

Why PRIME? 20 years of Erasmus Programme Over 2 million students in total Annually

2. Entity, Architecture, Process

CHAPTER 5 MODIFIED MINKOWSKI FRACTAL ANTENNA

Manuál pro vyplnění přihlášky

Anotace Mgr. Filip Soviš (Autor) Angličtina, čeština Speciální vzdělávací potřeby - žádné -

Střední průmyslová škola strojnická Olomouc, tř.17. listopadu 49

Výukový materiál zpracovaný v rámci operačního programu Vzdělávání pro konkurenceschopnost

AIC ČESKÁ REPUBLIKA CZECH REPUBLIC

The Czech education system, school

Database systems. Normal forms

Immigration Studying. Studying - University. Stating that you want to enroll. Stating that you want to apply for a course.

Immigration Studying. Studying - University. Stating that you want to enroll. Stating that you want to apply for a course.

ADC Young Creative. Brief MOBIL.CZ

Výukový materiál zpracovaný v rámci projektu EU peníze do škol. illness, a text

Náhradník Náhradník 5.A

The Over-Head Cam (OHC) Valve Train Computer Model

AJ 3_16_Prague.notebook. December 20, úvodní strana

Dynamic Development of Vocabulary Richness of Text. Miroslav Kubát & Radek Čech University of Ostrava Czech Republic

Číslo projektu: CZ.1.07/1.5.00/ Název projektu: Inovace a individualizace výuky

Enabling Intelligent Buildings via Smart Sensor Network & Smart Lighting

Klepnutím lze upravit styl předlohy. nadpisů. nadpisů.

Jak importovat profily do Cura (Windows a

VY_22_INOVACE_84. P3 U3 Revision

Obrábění robotem se zpětnovazební tuhostí

Číslo materiálu: VY 32 INOVACE 29/18. Číslo projektu: CZ.1.07/1.4.00/

My Year Manager is Vedoucí našeho ročníku je. P.E. is on Tělocvik mám v

ENVIRONMENTAL EDUCATION IN.

Transportation Problem

LOGBOOK. Blahopřejeme, našli jste to! Nezapomeňte. Prosím vyvarujte se downtrade

CZ.1.07/1.5.00/

DOPLNĚK K FACEBOOK RETRO EDICI STRÁNEK MAVO JAZYKOVÉ ŠKOLY MONCHHICHI

Gymnázium a Střední odborná škola, Rokycany, Mládežníků 1115

Present Perfect x Past Simple Předpřítomný čas x Minulý čas Pracovní list

Přečtěte si následující inzerát na seznámení. Doplňte chybějící výrazy a vypracujte následné otázky.

POSLECH. Cinema or TV tonight (a dialogue between Susan and David about their plans for tonight)

CZ.1.07/1.5.00/ Zefektivnění výuky prostřednictvím ICT technologií III/2 - Inovace a zkvalitnění výuky prostřednictvím ICT

Image Analysis and MATLAB. Jiří Militky

Náhradník Náhradník 9.A

Digitální učební materiál

Vzdělávací materiál projektu Zlepšení podmínek výuky v ZŠ Sloup. Questions

Střední průmyslová škola strojnická Olomouc, tř.17. listopadu 49

Města (rodné město a další důležitá města) Michal Kadlec, Dis

Gymnázium, Brno, Elgartova 3

CZ.1.07/1.5.00/

VŠEOBECNÁ TÉMATA PRO SOU Mgr. Dita Hejlová


Střední průmyslová škola strojnická Olomouc, tř.17. listopadu 49

II/2 Inovace a zkvalitnění výuky cizích jazyků na středních školách

PART 2 - SPECIAL WHOLESALE OFFER OF PLANTS SPRING 2016 NEWS MAY 2016 SUCCULENT SPECIAL WHOLESALE ASSORTMENT

CZ.1.07/1.5.00/

POSLECH. Kate and Jim are friends. It's Thursday afternoon and they are talking about their free time activities.

A Note on Generation of Sequences of Pseudorandom Numbers with Prescribed Autocorrelation Coefficients

FIRE INVESTIGATION. Střední průmyslová škola Hranice. Mgr. Radka Vorlová. 19_Fire investigation CZ.1.07/1.5.00/

Střední průmyslová škola strojnická Olomouc, tř.17. listopadu 49

Projekt MŠMT ČR: EU peníze školám

5. Učebnice str. 74, cvičení 5. Vybíráme podle jídelního lístku.

Postup objednávky Microsoft Action Pack Subscription

DATA SHEET. BC516 PNP Darlington transistor. technický list DISCRETE SEMICONDUCTORS Apr 23. Product specification Supersedes data of 1997 Apr 16

CZ.1.07/1.5.00/

SEZNAM PŘÍLOH. Příloha 1 Dotazník Tartu, Estonsko (anglická verze) Příloha 2 Dotazník Praha, ČR (česká verze)... 91

Střední průmyslová škola strojnická Olomouc, tř.17. listopadu 49

SEMI-PRODUCTS. 2. The basic classification of semi-products is: standardized semi-products non-standardized semi-products

Angličtina v matematických softwarech 2 Vypracovala: Mgr. Bronislava Kreuzingerová

Transkript:

Patch tracking based on comparing its pixels 1 Tomáš Svoboda, svoboda@cmp.felk.cvut.cz Czech Technical University in Prague, Center for Machine Perception http://cmp.felk.cvut.cz Last update: March 23, 2015 Talk Outline comparing patch pixels normalized cross-correlation, ssd... KLT - gradient based optimization good features to track 1 Please note that the lecture will be accompanied be several sketches and derivations on the blackboard and few live-interactive demos in Matlab

What is the problem? 2/38 video: CTU campus, door of G building

Tracking of dense sequences camera motion 3/38 T - Template I - Image Scene static, camera moves.

Tracking of dense sequences object motion 4/38 T - Template I - Image Camera static, object moves.

Alignment of an image (patch) 5/38 Goal is to align a template image T (x) to an input image I(x). x column vector containing image coordinates [x, y]. The I(x) could be also a small subwindow within an image.

How to measure the alignment? What is the best criterial function? 6/38 How to find the best match, in other words, how to find extremum of the criterial function?

How to measure the alignment? What is the best criterial function? 6/38 How to find the best match, in other words, how to find extremum of the criterial function? Criterial function What are the desired properties (on a certain domain)?

How to measure the alignment? What is the best criterial function? 6/38 How to find the best match, in other words, how to find extremum of the criterial function? Criterial function What are the desired properties (on a certain domain)? convex (remember the optimization course?) discriminative...

Normalized cross-correlation You may know it as correlation coefficient (from statistics) 7/38 ρ X,Y = cov(x, Y ) σ X σ Y = E[(X µ X)(Y µ Y )] σ X σ Y where σ means standard deviation.

Normalized cross-correlation You may know it as correlation coefficient (from statistics) 7/38 ρ X,Y = cov(x, Y ) σ X σ Y = E[(X µ X)(Y µ Y )] σ X σ Y where σ means standard deviation. Having template T (k, l) and image I(x, y), r(x, y) = k k ( ) ( ) l T (k, l) T I(x + k, y + l) I(x, y) ( I(x + k, y + l) I(x, y) l ( T (k, l) T ) 2 k l ) 2

Normalized cross-correlation in picture 8/38 criterial function ncc 50 100 150 200 250 300 350 400 450 500 50 100 150 200 250 300 350 400 450 500 0.8 0.6 0.4 0.2 0 0.2 0.4 550 100 200 300 400 500 600 700 550 0.6 100 200 300 400 500 600 700

Normalized cross-correlation in picture 8/38 criterial function ncc 50 100 150 200 250 300 350 400 450 500 50 100 150 200 250 300 350 400 450 500 0.8 0.6 0.4 0.2 0 0.2 0.4 550 100 200 300 400 500 600 700 550 0.6 100 200 300 400 500 600 700 well, definitely not convex but the discriminability looks promising very efficient in computation, see [3]2. 2 check also normxcorr2 in Matlab

Sum of squared differences 9/38 ssd(x, y) = k l (T (k, l) I(x + k, y + l)) 2 50 100 50 100 criterial function ssd x 10 7 4 3.5 150 150 3 200 250 200 250 2.5 300 300 2 350 400 450 350 400 450 1.5 1 500 500 0.5 550 100 200 300 400 500 600 700 550 100 200 300 400 500 600 700 0

Sum of absolute differences 10/38 sad(x, y) = k l T (k, l) I(x + k, y + l) 50 100 150 200 250 300 350 400 450 500 550 100 200 300 400 500 600 700 50 100 150 200 250 300 350 400 450 500 550 criterial function sad 100 200 300 400 500 600 700 x 10 5 2.2 2 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2

SAD for the door part 11/38 50 criterial function sad x 10 4 10 50 100 150 200 250 300 350 400 450 100 150 200 250 300 350 9 8 7 6 5 4 3 2 500 550 400 1 100 200 300 400 500 600 700 200 250 300 350 400 450 500 550

SAD for the door part truncated 12/38 criterial function sad_truncated 50 8000 100 7000 50 100 150 6000 150 200 200 5000 250 250 4000 300 350 300 3000 400 450 350 2000 500 550 100 200 300 400 500 600 700 400 200 250 300 350 400 450 500 550 1000 0 Differences greater than 20 intensity levels are counted as 20.

Normalized cross-correlation: how it works 13/38 live demo for various patches

Normalized cross-correlation: tracking 14/38 video

Normalized cross-correlation: tracking 14/38 video What went wrong? Why did it failed? Suggestions for improvement?

Tracking as an optimization problem finding extrema of a criterial function... 15/38

Tracking as an optimization problem finding extrema of a criterial function... 15/38... sounds like an optimization problem Kanade Lucas Tomasi (KLT) tracker Iteratively minimizes sum of square differences. It is a Gauss-Newton gradient algorithm.

Importance in Computer Vision Firstly published in 1981 as an image registration method [4]. 16/38 Improved many times, most importantly by Carlo Tomasi [5, 6] Free implementation(s) available3. Also part of the OpenCV library4. After more than two decades, a project5 at CMU dedicated to this single algorithm and results published in a premium journal [1]. Part of plethora computer vision algorithms. Our explanation follows mainly the paper [1]. It is a good reading for those who are also interested in alternative solutions. 3 http://www.ces.clemson.edu/~stb/klt/ 4 http://opencv.org/ 5 Lucas-Kanade 20 Years On https://www.ri.cmu.edu/research_project_detail.html?project_ id=515&menu_id=261

Original Lucas-Kanade algorithm I Goal is to align a template image T (x) to an input image I(x). x column vector containing image coordinates [x, y]. The I(x) could be also a small subwindow withing an image. Set of allowable warps W(x; p), where p is a vector of parameters. For translations [ ] x + p1 W(x; p) = y + p 2 W(x; p) can be arbitrarily complex The best alignment, p, minimizes image dissimilarity [I(W(x; p)) T (x)] 2 x 17/38

Original Lucas-Kanade algorithm II 18/38 [I(W(x; p)) T (x)] 2 x I(W(x; p) is nonlinear! The warp W(x; p) may be linear but the pixels value are, in general, non-linear. In fact, they are essentially unrelated to x. Linearization of the image: It is assumed that some p is known and best increment p is sought. The modified problem [I(W(x; p + p)) T (x)] 2 x is solved with respect to p. When found then p gets updated p p + p...

Original Lucas-Kanade algorithm III 19/38 x [I(W(x; p + p)) T (x)] 2 linearization by performing first order Taylor expansion 6 x [I(W(x; p)) + I W p T (x)]2 p I = [ I x, I W y ] is the gradient image computed at W(x; p). The term p is the Jacobian of the warp. 6 Detailed explanation on the blackboard.

Original Lucas-Kanade algorithm IV Differentiate x [I(W(x; p)) + I W p p T (x)]2 with respect to p 20/38

Original Lucas-Kanade algorithm IV Differentiate x [I(W(x; p)) + I W p p T (x)]2 with respect to p 20/38 2 x [ ] [ ] I W I(W(x; p)) + I W p T (x) p p setting equality to zero yields

Original Lucas-Kanade algorithm IV Differentiate x [I(W(x; p)) + I W p p T (x)]2 with respect to p 20/38 2 x [ ] [ ] I W I(W(x; p)) + I W p T (x) p p setting equality to zero yields p = H 1 x [ ] I W [T (x) I(W(x; p))] p where H is (Gauss-Newton) approximation of Hessian matrix. H = x [ ] [ ] I W I W p p

Iterate: The Lucas-Kanade algorithm Summary 21/38 1. Warp I with W(x; p) 2. Warp the gradient I with W(x; p) 3. Evaluate the Jacobian W p image I W p 4. Compute the H = x 5. Compute p = H 1 x [ at (x; p) and compute the steepest descent I W p [ ] [ I W p 6. Update the parameters p p + p until p ɛ I W p ] ] [T (x) I(W(x; p))]

Example of convergence 22/38 video

Example of convergence 23/38 Convergence video: Initial state is within the basin of attraction

Example of divergence 24/38 Divergence video: Initial state is outside the basin of attraction

Example on-line demo 25/38 Let play and see...

What are good features (windows) to track? 26/38

What are good features (windows) to track? How to select good templates T (x) for image registration, object tracking. 27/38 p = H 1 x [ ] I W [T (x) I(W(x; p))] p

What are good features (windows) to track? How to select good templates T (x) for image registration, object tracking. 27/38 p = H 1 x [ ] I W [T (x) I(W(x; p))] p where H is the matrix H = x [ ] [ ] I W I W p p

What are good features (windows) to track? How to select good templates T (x) for image registration, object tracking. 27/38 p = H 1 x [ ] I W [T (x) I(W(x; p))] p where H is the matrix H = x [ ] [ ] I W I W p p The stability of the iteration is mainly influenced by the inverse of Hessian. We can study its eigenvalues. Consequently, the criterion of a good feature window is min(λ 1, λ 2 ) > λ min (texturedness).

What are good features for translations? Consider translation W(x; p) = [ ] W 1 0 p = 0 1 [ x + p1 y + p 2 ]. The Jacobian is then 28/38 H = x = x = x [ I W p [ 1 0 0 1 ( I x I I x y ] [ ] [ I x I I W p ] y ) 2 I I x y ( I y ) 2 ] [ I x, I x ] [ 1 0 0 1 ] The image windows with varying derivatives in both directions. Homeogeneous areas are clearly not suitable. Texture oriented mostly in one direction only would cause instability for this translation.

What are the good points for translations? The matrix H = x ( I ) 2 I x x I I x y ( I y I y ) 2 Should have large eigenvalues. We have seen the matrix already, where? 29/38

What are the good points for translations? The matrix H = x ( I ) 2 I x x I I x y ( I y I y ) 2 Should have large eigenvalues. We have seen the matrix already, where? 29/38 Harris corner detector [2]! The matrix is sometimes called Harris matrix.

Experiments - no occlusions 30/38 video

Experiments - occlusions 31/38 video

Experiments - occlusions with dissimilarity 32/38 video

Experiments - object motion 33/38 video

Experiments door tracking 34/38 video

Experiments door tracking smoothed 35/38 video

Comparison of ncc vs KLT tracking 36/38 video

References 37/38 [1] Simon Baker and Iain Matthews. Lucas-Kanade 20 years on: A unifying framework. International Journal of Computer Vision, 56(3):221 255, 2004. [2] C. Harris and M. Stephen. A combined corner and edge detection. In M. M. Matthews, editor, Proceedings of the 4th ALVEY vision conference, pages 147 151, University of Manchaster, England, September 1988. on-line copies available on the web. [3] J.P. Lewis. Fast template matching. In Vision Interfaces, pages 120 123, 1995. Extended version published on-line as "Fast Normalized Cross-Correlation" at http://scribblethink.org/work/nvisioninterface/nip.html. [4] Bruce D. Lucas and Takeo Kanade. An iterative image registration technique with an application to stereo vision. In Proceedings of the 7th International Conference on Artificial Intelligence, pages 674 679, August 1981. [5] Jianbo Shi and Carlo Tomasi. Good features to track. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 593 600, 1994. [6] Carlo Tomasi and Takeo Kanade. Detection and tracking of point features. Technical Report CMU-CS-91-132, Carnegie Mellon University, April 1991.

End 38/38

100 200 300 400 500 600 700 50 100 150 200 250 300 350 400 450 500 550

criterial function ncc 50 100 150 200 250 300 350 400 450 500 0.8 0.6 0.4 0.2 0 0.2 0.4 550 0.6 100 200 300 400 500 600 700

100 200 300 400 500 600 700 50 100 150 200 250 300 350 400 450 500 550

50 100 150 200 250 300 350 400 450 500 550 criterial function ssd 100 200 300 400 500 600 700 x 10 7 4 3.5 3 2.5 2 1.5 1 0.5 0

100 200 300 400 500 600 700 50 100 150 200 250 300 350 400 450 500 550

criterial function sad x 10 5 2.2 50 100 150 200 250 300 350 400 450 500 550 2 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 100 200 300 400 500 600 700

100 200 300 400 500 600 700 50 100 150 200 250 300 350 400 450 500 550

200 250 300 350 400 450 500 550 50 100 150 200 250 300 350 criterial function sad x 10 4 10 9 8 7 6 5 4 3 2 400 1

100 200 300 400 500 600 700 50 100 150 200 250 300 350 400 450 500 550

criterial function sad_truncated 50 8000 100 7000 150 6000 200 250 300 350 400 5000 4000 3000 2000 1000 200 250 300 350 400 450 500 550 0