Search code examples
opencvfeature-detectionsurfobject-detectionvideo-tracking

Combination of camshift and opencv


I'm trying to do object detecting jobs using OpenCV. But there is something confuses me. Tracking & predicting algorithm like camshift and kalman filters can fulfill the task of tracking while SURF matching methods can also do that.

I don't quite understand the difference between the two approaches. I have done some codings based on feature2d (SURF is used) and motion_analysis_and_object_tracking (camshift is used) of OpenCV tutorial. It seems like they're just two means of one purpose. Am I right or am I missing out some concept?

And is it a good way to combine camshift tracking with SURF feature matching?...maybe more stuff can be applied, like contour matching?


Solution

  • Short answer is:

    1. Detect interesting object using keypoint (SURF) or any other approach.
    2. Get bounding rectangle of object and pass it as input for object tracker (e.g. CAMShift).
    3. Use object tracker unless object will not lost.

    Object tracking is process of finding the position of an object using the information in previous frames. The difference between tracking and detection is that while both the process localize the position of the object, detection does not used any information from previous frames to localize the object.

    Look at "Object Tracking: A Survey" by Alper Yilmaz, Omar Javed and Mubarak Shah. This paper contains comprehensive overview of detection and tracking techniques.