How to use setInitialMask on TrackerCSRT?

asked 2018-08-21 14:29:18 -0600

I am using TrackerCSRT for object tracking in a video, and currently I use the init method on the tracker to set the region of interest

tracker = cv2.TrackerCSRT_create()
tracker.init(frame, region_of_interest)

The region of interst include my object, but it also include irrelevant pixels from the background or other objects.

I would like to use a mask to refine which pixels I'm interested in. Looking over the documentation, I can see method setInitialMask on the C++ version, but I cannot find the equivalent method in the Python wrapper.

How do I set a mask in TrackerCSRT on openCV for Python?

edit retag flag offensive close merge delete

Comments

berak gravatar imageberak ( 2018-08-28 01:04:59 -0600 )edit