フィルターのクリア

How to extract/obtain motion vectors from .mp4 videos in MATLAB?

18 ビュー (過去 30 日間)
Tintumon
Tintumon 2018 年 2 月 23 日
編集済み: Tintumon 2020 年 7 月 6 日
Hello, Is there any code (or inbuilt function) for extracting motion vectors (frame-to-frame) from MPEG-4 (H.264 compressed videos)? For my work, the input video is a scene of people moving through streets/malls.
  5 件のコメント
Shahbaz Khan
Shahbaz Khan 2020 年 7 月 6 日
i have downloaded ffmpeg, how to use it to extract motion vectors? can you please guide. the file have several libraries and codes
Tintumon
Tintumon 2020 年 7 月 6 日
編集済み: Tintumon 2020 年 7 月 6 日
Note: The answer is out of scope of this thread.
But, I will explain it.
1) Build the example programs (located in "doc\examples") by using the following command (run the command while you are in the source FFmpeg directory):
make examples
2) Execute the "extract_mvs" binary file, generated as a result of Step 1, to obtain the motion vectors from an h.264 compressed video (navigate to "doc\examples" or provide the absolute path while executing). Write the motion vectors to a text-file (outputFile.txt).
.\extract_mvs inputVideoName.extension > outputFile.txt
This ".txt" file can be read in MATLAB and used for further processing!

サインインしてコメントする。

回答 (2 件)

Tintumon
Tintumon 2018 年 2 月 24 日
Thanks again for a detailed answer.
In the case of "VideoReader": 1) What if I had multiple codecs? I guess the routine chooses the default done. Can we manually change the default setting? 2) Also, Will it produce motion vectors as one of its output?

Jishnu P
Jishnu P 2018 年 4 月 28 日
I am not sure about MATLAB. But you can have a look at MV-Tractus.

カテゴリ

Help Center および File ExchangeAudio and Video Data についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by