1

This week-end I tried some experiments to improve the automatic tracking feature.
Currently the tracking is done by comparing "pixel to pixel" the images, trying to locate the best "look-alike" zone.

This has a number of drawbacks, it get lost easily when the object or point of view rotates, when blur happens, luminosity changes, etc. and even in "normal" conditions.
In the following pictures you can see how the program fails on what should be a straightforward task (snooker).

http://www.kinovea.org/screencaps/0.8.x/template-matching.jpg

On the left the tracking follows, but it slowly shifts away from the ball and ends up on its side.
On the right, the tracking got lost after a while.

These two were done with very similar set up for the initial point to track.
It looks like this technique is highly dependant on starting conditions and small errors accumulates… sad


The new method I'm trying is called SURF. It's a very powerful algorithm, I'm leveraging open source code from the OpenSURF project.

The idea is to describe the initial point and the candidates by a set of 64 descriptors parameters, and then compare the points using the descriptors.
The main advantage is that it is invariant to rotation, blur, etc.

However the way I need to use it makes it really slow compared to the original "template matching", and as you will see I couldn't get it to work in a satisfying way yet lol

http://www.kinovea.org/screencaps/0.8.x/opensurf.jpg

These are just done with varying some internal parameters.
What happens apparently is that the target attaches itself to the border of the ball, and then finds that the best match is on the other side of the ball !
Maybe it's considering the ball rotation hmm
It didn't get lost, but the output path in unusable…

So, this is not conclusive and this will need more experimentation to get something working. But I wanted to share these with you anyway.

I'm afraid we'll have to resort to manual tracking for a little longer tongue.

2 (edited by bowl1820 2011-01-22 01:15:54)

I'm a new user and was wondering how the development of the motion tracking is progressing.

I'm trying the motion tracking with tracking a bowling balls path down a lane. I've noticed some of things you mentioned above like the tracking slowly shifts away from the ball or the tracking jumping off the ball to a reflection on the lane etc. happening. (I make manual adjustments to the track when this happens).

I was wondering if it would be possible to have a circular bounding box (preferably a variable size one(handles could be added to the box so as not to interfere with the manual dragging of the box.)  that could be confined to the object being tracked) and/or maybe a way to highlight elements not to be tracked (like in part of photoshop they have a way to highlight areas to select and not select.)

3

bowl1820 wrote:

I'm a new user and was wondering how the development of the motion tracking is progressing.

Hi,
The algorithm itself is more or less established (see similar snooker snapshot with version 0.8.6). There is still room for improvement, but it's considered of a lesser priority with regards to other areas. The next improvements regarding tracking will be the implementation of multi point tracking, to be able to track lines, angles, etc.

bowl1820 wrote:

I'm trying the motion tracking with tracking a bowling balls path down a lane. I've noticed some of things you mentioned above like the tracking slowly shifts away from the ball or the tracking jumping off the ball to a reflection on the lane etc. happening. (I make manual adjustments to the track when this happens).

The issue with slow drift from the target and problems highlighted in the original message should be fixed in recent versions. (Unless you are using version older than 0.8.7) so it may be something special (like attaching to a small spot on the ball).

Attaching to reflection instead of the real thing is really hard to prevent. Sometimes the reflection just look more similar to the previous image than the object itself. In any case, the automation of tracking is really meant to be an aid to manual tracking.

bowl1820 wrote:

I was wondering if it would be possible to have a circular bounding box (preferably a variable size one(handles could be added to the box so as not to interfere with the manual dragging of the box.)  that could be confined to the object being tracked) and/or maybe a way to highlight elements not to be tracked (like in part of photoshop they have a way to highlight areas to select and not select.)

The internal pattern window must be rectangular. I'm not familiar with this specific Photoshop function.

Hopefully, the ability to resize the search window should be enough to avoid these issues.