Tracking drift fixes

Project Page Next project post Post History

I've been working on playing around with the tracking algorithm to try and overcome some of the drifting issues. Track drifting occurs when the build up of errors across multiple frames pushes the feature marker to a different location than the starting one.

The following video shows the improved tracking:

The track still requires some manual adjustments along the way. In this instance, some manual location stamps across some frames, and an adjustment to the search window and search box sizes. The reason for the change in window sizes was I found that the engine just simply needed more information at times to track against.

Here's an image of the starting frame verse the second last frame:

The track locations of frame 1 and frame 323, of a total of 324 frames

The image above shows the tracked positions from frame 1 and frame 323. The track window image on the right may looked stretched, but it is not. When the track failed, I manually adjusted the size of the window before continuing. So, the image is not stretched, the window has just been resized.

As for the drift fixes; I implemented some tests that test the frame against other known results to find a match. The engine can also make temporary changes to the tracking settings. Together with a bit of manual effort, they're enough to keep the track 'on track' (pun intended!).

Another small addition - I added a catch to the escape key, so if the user needs to stop tracking they can hold the escape key down and it will stop before proceeding to the next frame. Previously, I had to wait until the track finished or failed, because the engine currently runs on the main thread. This means I can't use a mouse click in the interface. I will try and change this at some point.

I'd like to add a couple more commands to the little tracker window and the popup menu too. Just little helpers to assist in the workflow, like a command that re-calibrates a manually tracked location with a previously known location.

I'm also pondering if a graph to display the results might be useful, but this will require a significant investment in the interface. Maybe one to tackle sometime later down the track (pun intended again!).