'How to decode mpeg motion vector using OpenCV in C++?
I want to decode the MPEG motion vectors using OpenCV in C++.
Is there any function in OpenCV through which we can get this?
Brightness may not be constant through out the video in my case.
I am referring paper Efficient camera motion characterization for MPEG video indexing
It says use partial decoding to get motion vectors from MPEG-compressed video sequence. But I am unable to determine how to do this using OpenCV. How to proceed?
Solution 1:[1]
OpenCV uses ffmpeg, v4linux or QuickTime as backend video encoder/decoder. It cannot access internal data or partial decoding results, because it is just a wrapper over other libraries. All it does is to handle frames from the backend and convert them to IplImage or cv::Mat.
If you want to access internal data, you should play with the ffmpeg code.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Sam |