Ask Your Question

Adding an overlaid line on video footage following the center of the frames via video processing/pattern recognition

asked 2018-06-10 08:14:10 -0500

I have multiple 1-minute videos taken outside (a building, a sea cliff, etc). The camera is not fixed, the footage is taken by a drone very slowly going up a cliff for example.

What I need to do, if even possible, is use OpenCV to automatically add a path to each of those video, a red line. The red line would follow the location pointed by the centre of the video frame.

It means that on each frame, I must find the locations pointed at on the previous/next frames via some sort of pattern recognition and somehow link them with an overlaid red line path.

Is there some sort of algorithm or tool that facilitate this process? How would you approach this problem?


From those frames:

* * * *

To those frames:

(in the real, slow, footage, the consecutive frames would be much closer to each other)

Looks like for all frames, I must try to locate all the previous/next frames and link their centres as an rightly ordered line. Surely, that must have been done before?

edit retag flag offensive close merge delete


some sort of image/panorama stitching applied to frames?

the_mad_engineer gravatar imagethe_mad_engineer ( 2018-06-10 08:50:37 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2018-06-11 21:20:36 -0500

Tetragramm gravatar image

You want optical flow. See THIS tutorial. Pick a bunch of points in one frame, follow them to the next, and take the average. Then add that to all the previous steps, and that gives you a list of every center relative to the current frame.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-06-10 08:14:10 -0500

Seen: 52 times

Last updated: Jun 11 '18