How to change the fps of the trackers in OpenCV 3.4.1 in C++?

asked 2018-10-18 04:15:49 -0600

meera_c gravatar image

I am using the trackers KCF, CSRT and MEDIANFLOW for multiple object tracking(the objects slightly move because of the jerkiness in the video) in a 1920x1080 resolution Video. The fps of KCF is around 30 and the tracking is done quickly(eventhough, it fails at some points.). But, for CSRT and MEDIANFLOW the fps is around 4 and so its very slow( But, very accurate in tracking). Is there any way to change the fps of these trackers? Can someone one please tell, where or how to change it? I am using OpenCV 3.4.1( along with opencv_contrib) in Visual Studio 2015(C++)

edit retag flag offensive close merge delete

Comments

to my exp. it's exactly the other way round, medianflow & csrt are fast, kcf slow.

how do you measure that ?

(also, trackers have no notion of "fps", there are only faster and slower algorithms)

berak gravatar imageberak ( 2018-10-18 04:39:10 -0600 )edit

I am using these trackers(the roi boxes position of tracked objects) to estimate the position of another object in the video. I was running these 3 trackers seperately in my project and when I use KCF , the whole process finishes in less than one minute(video is 12s long). But for the other two, it takes more time.

meera_c gravatar imagemeera_c ( 2018-10-18 05:11:09 -0600 )edit

@berak : So, is it not possible to change the fps of the trackers? And, is there any valid document which describes the properties of these trackers?

meera_c gravatar imagemeera_c ( 2018-10-18 09:16:23 -0600 )edit

hhm, wait, can it be you're using grayscale images ?

there is indeed documentation for the trackers.

unfortunately, in most cases, you'll have to tweak members of various Paramstructs, eg. here .

berak gravatar imageberak ( 2018-10-18 09:32:05 -0600 )edit
1

no, I am not using grayscale images.

meera_c gravatar imagemeera_c ( 2018-10-19 02:43:58 -0600 )edit