Adding hog feature to KCF tracker [closed]

asked 2018-09-24 11:36:21 -0600

Nuser gravatar image

updated 2020-10-07 19:25:28 -0600

Hello, I want to add HOG feature to my KCF tracker. How can I do this? I searched a bit but found "setFeatureExtractor()". How can implement this?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by sturkmen
close date 2020-10-04 13:07:03.229041

Comments

you've seen this tutorial ?

(please try and report back !)

but oh, wait. it's expecting a feature in the whole size of the image, not an "embedding", like HOG.

(but you could still try adding "gradient / magnitude" features (instead of "binning it on patches", like HOG does)

berak gravatar imageberak ( 2018-09-24 11:38:07 -0600 )edit

I'm using Python, maybe it's impossible to declare parameters to tracker because it says 'unexpected arguments'. Do you know any Python tut for this? tracker = cv2.TrackerKCF_create(cv2.TrackerKCF_GRAY | cv2.TrackerKCF_CN, 0, True,2 )

Nuser gravatar imageNuser ( 2018-09-24 12:54:00 -0600 )edit

the last 2 letters iin KCF stand for "color features" (it's like blowing up 3 RGB colors into 9 channels, using a lookup table, and if you do that on grayscale, you're actually defeating that

being unable to enforce "grayscale images" from python is might be a minor problem here. (rather look up the whitepaper on this)

(and also, while you can't setcv2.TrackerKCF_GRAY from python (if i recall this corectly), feeding a grayscale image* into the algorithm will achieve the same.

berak gravatar imageberak ( 2018-09-24 13:00:23 -0600 )edit

if you want my 2ct.:

write your own tracker (there's a VERY successful MOSSE example here.

berak gravatar imageberak ( 2018-09-24 13:10:40 -0600 )edit

Thanks for answers, I'll look at example and try to make my tracker, otherwise it doesn't work :)

Nuser gravatar imageNuser ( 2018-09-24 13:16:01 -0600 )edit