Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction To Tracking

Similar presentations


Presentation on theme: "Introduction To Tracking"— Presentation transcript:

1 Introduction To Tracking
Mario Haddad

2 What is Tracking? Estimating pose (state)
Possible from a variety of measured sensors Electrical Mechanical Inertial Optical Acoustic Magnetic

3 DYNAMIC SCENE ANALYSIS
The input to the dynamic scene analysis is a sequence of image frames 𝐹 𝑥,𝑦,𝑡 taken from the changing world. x, y are spatial coordinates. Frames are usually captured at fixed time intervals. 𝑡 represents 𝑡 𝑡ℎ frame in the sequence.

4 Typical Applications Motion detection. Often from a static camera.
Object localization. Three-dimensional shape from motion. Object tracking. 1)Common in surveillance systems. Often performed on the pixel level only (due to speed constraints). 2) Focuses attention to a region of interest in the image. 3) Called also structure from motion. Similar problems as in stereo vision. 4) A sparse set of features is often tracked, e.g., corner points.

5 Example Application אפשר להשתמש ב TRACKING למטרות סטטיסטיות כמו ספירת כמה אנשים נכנסים לרכבת ובאיזה שעות, להשתמש במצלמות שכבר פרוסות ברחובות כדי לספור מכוניות בקטע כביש מסויים, מניעת היווצרות פקקים ע"י יעול תזמוני הרמזורים ע"י שילוב מידע של כמה מכוניות באות לצומת מכל צד למשל.. השימושים הם אינסופיים

6 Object Tracking Definition
Object tracking is the problem of determining (estimating) the positions and other relevant information of moving objects in image sequences.

7 Difficulties In Reliable Object Tracking
Rapid appearance changes caused by image noise, illumination changes, non-rigid motion, ... Non-stable background Interaction between multiple objects

8 Difficulties In Reliable Object Tracking
Difficult, but not impossible! Robust Density Comparison for Visual Tracking (BMVC 2009)

9 Difficulties In Reliable Object Tracking

10 Motion Estimation

11 Block Matching Method For a given region in one frame, find the corresponding region in the next frame by finding the maximum correlation score (or other block matching criteria) in a search region

12 Block Matching Method

13 Block Matching Method

14 Optical Flow  Motion Field
(a) A smooth sphere is rotating under constant illumination. Thus the optical flow field is zero, but the motion field is not. (b) A fixed sphere is illuminated by a moving source—the shading of the image changes. Thus the motion field is zero, but the optical flow field is not. (a) (b)

15 Visible Motion and True Motion
OPTIC FLOW - apparent motion of the same (similar) intensity patterns Generally, optical flow corresponds to the motion field, but not always: Motion is going right but optic flow is going up

16 Local Features for Tracking
If strong derivatives are observed in two orthogonal directions then we can hope that this point is more likely to be unique. Many trackable features are called corners. Harris Corner Detection ! Intuitively, corners—not edges—are the points that contain enough information to be picked out from one frame to the next.

17 Aperture Problem

18 The Aperture Problem Different motions – classified as similar
source: Ran Eshel

19 The Aperture Problem Similar motions – classified as different
source: Ran Eshel

20 Tracking Methods

21 Mean-Shift The mean-shift algorithm is an efficient approach to tracking objects whose appearance is defined by histograms. (not limited to only color)

22 Motivation Motivation – to track non-rigid objects, (like
a walking person), it is hard to specify an explicit 2D parametric motion model. Appearances of non-rigid objects can sometimes be modeled with color distributions

23 Mean Shift Theory

24 Distribution of identical billiard balls
Intuitive Description Region of interest Center of mass Mean Shift vector Objective : Find the densest region Distribution of identical billiard balls Stolen from:

25 Distribution of identical billiard balls
Intuitive Description Region of interest Center of mass Mean Shift vector Objective : Find the densest region Distribution of identical billiard balls Stolen from:

26 Distribution of identical billiard balls
Intuitive Description Region of interest Center of mass Mean Shift vector Objective : Find the densest region Distribution of identical billiard balls Stolen from:

27 Distribution of identical billiard balls
Intuitive Description Region of interest Center of mass Mean Shift vector Objective : Find the densest region Distribution of identical billiard balls Stolen from:

28 Distribution of identical billiard balls
Intuitive Description Region of interest Center of mass Mean Shift vector Objective : Find the densest region Distribution of identical billiard balls Stolen from:

29 Distribution of identical billiard balls
Intuitive Description Region of interest Center of mass Mean Shift vector Objective : Find the densest region Distribution of identical billiard balls

30 Distribution of identical billiard balls
Intuitive Description Region of interest Center of mass Objective : Find the densest region Distribution of identical billiard balls Stolen from:

31 Mean Shift Vector Given:
Data points and approximate location of the mean of this data: Task: Estimate the exact location of the mean of the data by determining the shift vector from the initial mean. We keep doing this iteratively until we do not have to move any more. Until the shift vector is zero.

32 Mean Shift Vector Nx = the number of points
We find the mean by adding up all the points, which are represented by a two dimensional vector (x,y) and dividing by the total number of points. Then we substract the point where we started, so we get a vector. The mean shift vector always points to the direction of the densest point of data points

33 A Quick PDF Definition A probability density function (pdf), is a function that describes the relative likelihood for this random variable to take on a given value. פונקציית צפיפות של משתנה מקרי היא פונקציה המתארת את צפיפות המשתנה בכל נקודה במרחב המדגם. ההסתברות שמשתנה מקרי יימצא בקטע מסוים היא האינטגרל של הצפיפות בקטע ולכן המשתנה נוטה יותר לקבל ערכים שבהם הצפיפות גבוהה.

34 Mean-Shift Object Tracking Target Representation
Choose a reference target model Represent the model by its PDF in the feature space Quantized Color Space Choose a feature space Stolen from:

35 Mean-Shift Object Tracking PDF Representation
Target Model (centered at 0) Target Candidate (centered at y) Similarity Function: Q is the target histogram, P is the object histogram (depends on location y) Stolen from:

36 Mean-Shift Object Tracking Target Localization Algorithm
Start from the position of the model in the current frame Search in the model’s neighborhood in next frame Find best candidate by maximizing a similarity func. Stolen from:

37 Mean Shift Mean-Shift in tracking task:
track the motion of a cluster of interesting features. 1. choose the feature distribution to represent an object (e.g., color + texture), 2. start the mean-shift window over the feature distribution generated by the object 3. finally compute the chosen feature distribution over the next video frame.

38 Mean Shift Starting from the current window location, the
mean-shift algorithm will find the new peak or mode of the feature distribution, which (presumably) is centered over the object that produced the color and texture in the first place. In this way, the mean-shift window tracks the movement of the object frame by frame.

39 Examples

40 Examples

41 Other Mean Shift Applications

42 Edge Preserving Smoothing

43 Segmentation

44 Contour Detection

45 Kalman Filter Rudolf Emil Kalman Born in 1930 in Hungary
BS and MS from MIT PhD 1957 from Columbia Filter developed in Now retired THE KALMAN FILTER IS OVER 50 YEARS OLD BUT IS STILL ONE OF THE MOST IMPORTANT AND COMMON DATA FUSION ALGORITHMS IN USE TODAY.

46 Kalman Filter Noisy data in hopefully less noisy data out
The Kalman filter operates recursively on streams of noisy input data to produce a statistically optimal estimate of the underlying system state. הוא אלגוריתם, המקבל כקלט סדרה של מדידות מורעשות של ערכים שונים המייצגים מצב של מערכת בזמן מסוים, ומייצר הערכה, בדרך כלל מדויקת יותר, של אותם הערכים על סמך תוצאת הפילטר בעבר. הפילטר עובד בצורה רקורסיבית על קלט מורעש ומייצר הערכה סטטיסטית של מצב המערכת.

47 Motivation נשים לב שאחרי מספר קטן יחסית של איטרציות הערכים שהפילטר "חישב" נהיו קרובים מאוד לערך האמיתי. כאילו באיזשהי דרך הצליח להתעלם מרעשי המדידה.

48 Kalman Filter Applications
Tracking objects (e.g., missiles, faces, heads, hands) Navigation Many computer vision applications – Stabilizing depth measurements – Feature tracking – Cluster tracking – Fusing data from radar, laser scanner and stereo-cameras for depth and velocity measurements – Many more

49 Intuition Robot Sand We may encounter: Wheel spin Previous state
Odometer GPS Sand We may encounter: Wheel spin GPS inaccuracy Previous state הרובוט מצוייד ב ... הרובוט חושב שהוא נמצא ב PREVIOUS STATE, יכול להיות שיש סטיות או טעויות בחישוב המיקום שלו, בגלל זה הגרף הוא גרף הסתברות הימצאות במקום מסוים. אז הוא רוצה להתקדם למקום הבא. הODOMETER הצביע שהרובוט הגיע למקום והGPS הצביע שהוא במקום קצת שונה ממה שה ODOMETER הראה, אז באמצעות קלמן פילטר נוכל לשלב בין שני המדידות כדי לבנות הערכה חדשה לגבי מיקום הרובוט. אם במקרה היו תקלות בGPS באותו יום והוא קצת מזייף אז קלמן פילטר יודע גם למזער את המשקל הניתן לGPS אז הערכת המיקום תהיה קרובה יותר ל ODOMETER. Odometer GPS

50 Kalman Filter A𝐬𝐬𝐮𝐦𝐞 𝑲 𝒌 =𝟎.𝟓 , what would we get?
Not perfectly sure. Why ? זו היא משוואה מופשטת שעוזרת לנו להבין איך הקלמן פילטר עובד. אם היינו בטוחים ב 100 אחוז במדידות אז לא היינו צריכים את הקלמן פילטר בכלל. A𝐬𝐬𝐮𝐦𝐞 𝑲 𝒌 =𝟎.𝟓 , what would we get?

51 Kalman Filter Kalman filter finds the most optimum averaging factor for each consequent state. “somehow” remembers a little bit about the past states.       קלמן מחשב ומוצא את ה

52 Kalman Filter State Prediction: Measurement Prediction:
𝑢 𝑘 - control signal (Most of the time there is no control signal) 𝑤 𝑘 - process noise A,B,H - define the physics of interest ( acceleration, position, speed… ) 𝑧 𝑘 - measurement prediction 𝑣 𝑘 - measurement noise נשים לב תחילה שהמשוואות ליניאריות כלומר אנו יכולים לחשב את כל הסיגנלים שלנו X K במערכת משוואות סטוכסטית ליניארית.

53 Kalman Filter Two groups of the equations for the Kalman filter:
Time update equations (Prediction) Measurement update equations. (Correction) The time update equations are responsible for projecting forward (in time) the current state and error covariance estimates to obtain the a priori estimates for the next time step. The measurement update equations are responsible for the feedback—i.e. for incorporating a new measurement into the a priori estimate to obtain an improved a posteriori estimate. האלגוריתם מכיל מערכת משוואות והוא עובד בשני שלבים: ראשית, האלגוריתם מייצר הערכה של מצב המערכת (כלומר, ערכי המדדים שלה) ושל ערכי אי הוודאות שלהם. בשלב השני, נקלטות התוצאות של המדידות הבאות (בדרך כלל כולל שגיאות מדידה מסוימות). תוצאות אלו מקבלות כל אחד משקל משלה והוא מעדכן באמצעותן את מצב המערכת. משקל כל תוצאה תלוי ברמת האמינות אותה מייחס האלגוריתם לאותה מדידה. המשקלים יכולים להשתנות במשך פעולת המסנן בהתאם לתוצאות המתקבלות בכל מדידה. כך למשל, במידה שמתקבל הפרש גבוה בין ההערכה לבין המדידה, המסנן עשוי להפחית את המשקל שהוא נותן להערכות הקודמות שלו ולהגביר את המשקל הניתן לתוצאה, ולהפך.

54 Brace Yourselves..

55 Kalman Filter Predict Update Predict the state ahead:
Predict the error covariance ahead: Update Update the state estimate: Update the error covariance: where Kalman gain Kt is: למה אנחנו משתמשים בשונות משותפת ? כי למשל אם ניקח


Download ppt "Introduction To Tracking"

Similar presentations


Ads by Google