不知道是不是因為大部分的人需要的都是 video 的 frame,而不是 motion vector(其實在解壓縮時只差一步),我 google 了好久都找不到工具可以用。後來發現 ffmpeg 的 ffplay 可以直接把 motion vector 邊撥邊畫出來,但是還是沒辦法 dump 出來。
$ ffplay -vismv 3 xxx.mpg
vismv 那個參數其實是三個 bit,第一個 bit 代表 P-Frame,第二個代表 B-Frame 的 forward motion vector,第三個 bit 則是 B-Frame 的 backward vector。
不過,這只能看。所以我參考 Using libavformat and libavcodec 跟 ffplay 的 source code 寫了一個程式。這個程式可以把 video 每個 frame (除了沒有 motion vector 的 I-Frame)的 motion vector 取出來。如果要改成取第幾個 frame、或是某個 range 之類的,也很好改。
g++ compile 時需要加上 -lavcodec -lavformat 兩個參數,當然也要先裝上 libavcodec 跟 libavformat 兩個 library。有裝 ffmpeg 就會有。
http://cmlab.csie.org/~victor/archive/motion_vector.cpp
15 則留言:
Hey there. I discovered your web site by way of Google at the same time as searching for a similar subject, your site got here up. It looks great. I have bookmarked it in my google bookmarks to come back then. 온라인경마
I really loved reading your blog. I also found your posts very interesting. 바카라사이트인포
Thanks for your outstanding article. You know how to get your readers' attention. 바카라사이트윈
I have taken this blog that written very well. I like you.
카지노사이트위키
온라인카지노사이트
카지노사이트탑
바카라사이트
Thanks for sharing nice information here. Keep it up
카지노사이트
온라인카지노
카지노
바카라
This is the perfect post. It helped me a lot.
안전토토사이트
먹튀검증
You make so many great points here that I read your article a couple of times. Your views are in accordance with my own for the most part. This is great content for your readers. Feel free to visit my website;
카지노사이트원
카지노사이트
바카라사이트
I was very pleased to find this page. I wanted to thank you for your time due to this wonderful read!! I definitely loved every part of it and I have you bookmarked to check out new information on your blog 카지노사이트777
카지노사이트
바카라사이트
Everything is very open with a precise clarification of the issues. It was really informative.
카지노사이트존
카지노사이트
바카라사이트
I AM VERY COMFORTABLE TO THIS BEAUTIFUL CONTENT FROM THE PURE READING.THANKS FOR KEEN UP THE GOOD WORK.
*******
I really enjoyed reading the above article. It is very pleasant to read. Shenandoah Traffic Lawyer
winchester traffic lawyer
A Winchester traffic lawyer assists clients facing traffic violations in Winchester, Virginia. They navigate legal proceedings, negotiate with prosecutors, and strive to minimize penalties or dismiss charges when possible.
The author needs more context to write a review comment on motion vector extraction. They suggest referring to specific tools like OpenCV, PyTorch, and TensorFlow, and evaluating their accuracy, efficiency, ease of use, and documentation. When evaluating a tool, consider accuracy, efficiency, ease of use, features, and community and support. The tool should capture the movement of objects in video, be fast, easy to use, offer advanced features, and have a large user community.
motorcycle accident attorneys
Reducing a reckless driving ticket in Virginia can be challenging, but it's not impossible with the right approach. Reckless driving is a serious offense in the state, often carrying severe penalties such as fines, license suspension, and even jail time. How to reduce a reckless driving ticket in Virginia
The technique of figuring out how objects or pixels move between two successive frames in a video or image series is known as motion vector extraction. It is a crucial method for motion tracking, computer vision, and video compression applications. Motion vectors are created by examining the variations in pixel locations between frames to explain how elements of an image move, including the motion's direction and magnitude.Prostitution for money
張貼留言