Detection and Tracking for an AR marker
Given an image of a marker to track and a video containing it, assuming only one marker instance is present in the video at any time, this will track it within the video. Not exclusively tested, still under development. Can do detection and tracking as described within this paper: https://stacks.stanford.edu/file/druid:bf950qp8995/Toole_Dolben.pdf
Detection Process using feature matching:
- Feature detection + descriptor extraction in marker image (BRISK features as opposed to SIFT in original paper)
- Feature detection + descriptor extraction in video frame
- Matching A. Nearest neighbors based matching scheme B. Lowes ratio test
- Homography calculation between matches across video frame and marker image
- Number of inliers calculated
- If inliers above a certain number then detection successful
- Pass off feature locations to the tracking system
Tracking:
Use the KLT Tracker
At this point, you should use your own video and marker image. I'm not releasing the video / marker image I have but feel free to use your own. Replace paths for the video file and marker image as needed within the first 22 lines of the code.