kcf tracker in python
Using opencv3.x, the following code works in python:
import cv2
p_img = '' # path of the image
bb = [] # bounding box of the image here
tracker = cv2.Tracker_create('MIL')
pix = cv2.imread(p_img)
pix = cv2.convertScaleAbs(pix, cv2.COLOR_GRAY2BGR)
ok = tracker.init(pix, bb)
tracker.update(pix)
If I change it to 'KCF' instead of 'MIL' though it returns an empty bounding box. Tried to figure out from the file here, but couldn't figure out why it should be different call.
Any help would be appreciated.
Thanks
a test image would be nice..
also, i hope you gave it a valid bb in tracker.init()
can you try the python sample in the tracking folder ?
(but yea, nothing detected for KCF here, too.)