Ask Your Question

Revision history [back]

Have a look at that tutorial which explain how to find an object in a picture. As you describe your problem, it seems to be similar.

You need to compute some keypoints from the initial image, and to compute the keypoints in each image of the video. There is many keypoints supported by OpenCV, some non free, like SIFT/SUFT, some free like ORB, FAST, etc. See the FeatureDetector method.

After that the tutorial explains how to compute the descriptors associated with the keypoints. See the DescriptorExtractor class to undertand the principles.

The matching is done with a Matcher object, which is a Brute Force, but could also be a KNN.

You need to compute the features and descriptors on the initial image once, and compute features and descriptors of images from the video in real-time, then do the matching process. You need to define a threshold for the matching (or keep the best at the end of the video, it's up to you…)