user1838245
user1838245

Reputation: 33

Object tracking in OpenCV

I had been using LK algorithm in detecting corners and interested point for tracking. However, I am stucked at this point where I need to have something like a rectangle box to follow the tracked object. All I have now was just a lot of points showing my moving objects.

Is there any methods or suggestions for that? Also, any idea on adding counter into the window so that my object moving in and out the screen can be counted as well?

Thank you

Upvotes: 0

Views: 7167

Answers (1)

Chris
Chris

Reputation: 4983

There are lots of options! Within OpenCV, I'd suggest using CamShift as a starting point, since it is a relatively easy to use. CamShift uses mean shift to iteratively search for an object in consecutive frames.

Note that you need to seed the tracker with some kind of input. You could have the user draw a rectangle around the object, or use a detector to get the initial input. If you want to track faces, for example, OpenCV has a cascade classifier and training data for a face detector included.

Upvotes: 2

Related Questions