Ask Your Question
0

How can I re-track an object after coming back from disappearance using KCF

asked 2017-05-21 02:16:41 -0600

updated 2020-10-07 19:32:16 -0600

I try to track an object using "KCF" algorithm and it go very well, but at some times that object disappears and then appears again and unfortunately the tracking box fails to track that object again. thanks.

edit retag flag offensive close merge delete

Comments

how do you initialize the tracker's boundingbox ?

berak gravatar imageberak ( 2017-05-21 05:28:13 -0600 )edit

using selectROI method.

M.Yasin gravatar imageM.Yasin ( 2017-05-21 06:24:34 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-05-21 05:40:55 -0600

berak gravatar image

right now, this is a bit difficult.

the Tracker::update() method should return false, if it lost the object, you would call Tracker::init() again with a new box.

unfortunately, the KCF tracker does not return anything meaningful currently, it just gets stuck. you should get this fix once, it's merged.

i don't know, what object you're tracking, but most use a cascade or hogdescriptor for the initial detection, and this would be run again, to re-init the tracker.

edit flag offensive delete link more

Comments

I tried and found that Tracker::update() method doesn't return false when the object disappears but when the tracking box itself disappears.

But how can I download the modified lib ?

M.Yasin gravatar imageM.Yasin ( 2017-05-21 06:14:08 -0600 )edit

if you have git:

cd opencv_contrib
git pull upstream master

else download the zipped opencv_contrib master src tree

berak gravatar imageberak ( 2017-05-22 10:17:01 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-05-21 02:16:41 -0600

Seen: 1,215 times

Last updated: May 21 '17