Search code examples
c++opencvcomputer-visionvideo-processing

jumpy video processing in opencv


heylo!

I have a bunch of old video files converted from old vhs tapes. The problem is, since those tapes were really old, the videos are jumpy (sometimes the bottom of the frame is in the middle of the screen followed by the top of the next frame)

My goal is to write something in opencv to automatically remove the frames where the image is not lined up properly.

My idea is to detect the difference between the previous frame and the next frame. If the video were smooth, the difference would be minimal. If the frame is jumpy then the difference would be noticeable.

My question: how would opencv calculate this difference between two frames?

Thx!!!!


Solution

  • I hope you know how to grab frames from video. If not, check here. Fortunately, it also finds similarity between two videos.

    What you will learn in this tutorial:

    • How to open and read video streams

    • Two ways for checking image similarity: PSNR and SSIM

    I think you can just make small adaptations to it as per your requirements. This tutorial has all enough information about it.

    You can also check this SOF : Simple and fast method to compare images for similarity