After calculating the SIFT or ORB on the frame, how to track an object in a video in real time?

Basically, I want to detect an object and track it in the video (frame by frame).

I can detect it in the first frame, for example, with ORB or SIFT. But for the next frames (or, say, the next XX frames), I would like to avoid to reveal all the key points again (ORB or SIFT) in order to detect this again.

Given that I want to track it in real time video, what can I do?

+8
c ++ opencv object-detection tracking
source share
4 answers

Commonly used patchtracker . This means that you are simply looking for key points in an area, for example, 8 pixels around the previous key point of the frame. You can run cv::matchTemplate() area surrounding the cv::matchTemplate() point, instead of using SIFT.

Performing a pyramid search helps improve frame rate. First, you search on a lower scale if you cannot find the cue point that you double the scale.

If patchtracker fails because the image is moving too fast, you just need to reinitialize the system by pressing SIFT again. I would use FAST instead of SIFT. You can use SIFT for the marker, and then FAST to detect key points in real time by generating SIFT descriptors.

+7
source share

Detecting and tracking an object in a video is a very important topic, and the method is very dependent on your application. No magic bullet! If you achieve the detection part, you can try to track using the β€œcolor elevation” method (possibly the HSV color space) if the object you need to track is colored .. or try matching the pattern or .. you need to be more specific on its necessary.

+5
source share

you can use OpticalFlow for easy tracking , here are the steps for that ...

  • Find the corners of a moving object using the Harris angle detector or the SIFT function detector.

  • Give these angles and the previous image (in which you found the angles of the object to track), and the next image - in the optical flow function, it will calculate the angles of the same object in the following images.

Here are the links:

Link1

Link2

code

NOTE. If you solve problems, such as handling occlusion, tracking several people, then OpticalFlow cannot solve problems on its own. To do this, you need a Kalman filter or particle filters ...

+4
source share

You can achieve near-perfect real-time tracking with TLD or CLM. Once you find an object of interest, use this bounding box to initiate predator tracking. You can find here CMT https://www.gnebehay.com/cmt/

and TLD here https://www.gnebehay.com/tld/

0
source share

All Articles