Ask Your Question

grigoris's profile - activity

2018-01-23 21:07:38 -0600 received badge  Notable Question (source)
2017-09-17 21:46:54 -0600 received badge  Popular Question (source)
2016-02-01 09:52:33 -0600 received badge  Student (source)
2016-02-01 07:47:39 -0600 asked a question 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