Search code examples
c++cvideo-capturevideo-processing

Video upsampling with C/C++


I want to upsample an array of captured (from webcam) OpenCV images or corresponding float arrays (Pixel values don't need to be discrete integer). Unfortunately the upsampling ratio is not always integer, so I cannot figure myself how to do it with simple linear interpolation. Is there an easier way or a library to do this?


Solution

  • Well, I dont know a library to to do framerate scaling.

    But I can tell you that the most appropriate way to do it yourself is by just dropping or doubling frames.

    Blending pictures by simple linear pixel interpolation will not improve quality, playback will still look jerky and even also blurry now.

    To proper interpolate frame rates much more complicated algorithms are needed. Modern TV's have build in hardware for that and video editing software like e.g. After-Effects has functions that do it.

    These algorithms are able to create in beetween pictures by motion analysis. But that is beyond the range of a small problem solution.

    So either go on searching for an existing library you can use or do it by just dropping/doubling frames.