Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile/Make Failed #1

Open
alanzyt311 opened this issue Aug 5, 2021 · 5 comments
Open

Compile/Make Failed #1

alanzyt311 opened this issue Aug 5, 2021 · 5 comments

Comments

@alanzyt311
Copy link

Hi @adrianmay , I try to follow your instruction for this project.

When I go to make step, an error pop out and says:

/home/alan/Desktop/jishmo/jishmo.c:33:10: fatal error: libavutil/motion_vector.h: No such file or directory #include <libavutil/motion_vector.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
CMakeFiles/jishmo.dir/build.make:62: recipe for target 'CMakeFiles/jishmo.dir/jishmo.c.o' failed

make[2]: *** [CMakeFiles/jishmo.dir/jishmo.c.o] Error 1

CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/jishmo.dir/all' failed

make[1]: *** [CMakeFiles/jishmo.dir/all] Error 2

Makefile:83: recipe for target 'all' failed

make: *** [all] Error 2

Could you plz give me some hints on how to solve it? Thank you very much.

@adrianmay
Copy link
Owner

adrianmay commented Aug 5, 2021 via email

@alanzyt311
Copy link
Author

alanzyt311 commented Aug 17, 2021

Thx Adrian, @adrianmay. And so sorry about the late reply.

Actually, I want to use Motion Vector as an indicator of the Degree of Motion in a frame/video.

For example, if there are many cars moving quite fast in a surveillance video clip, then the motion vector of this specific frame tends to be larger. On the contrary, if there are barely any moving objects in the video, the motion vector will be smaller. Does this idea sound reasonable or applicable to you? Since I am not very familiar with this area, I would really appreciate it if you could leave some comments. Thx in advance!

@adrianmay
Copy link
Owner

adrianmay commented Aug 18, 2021 via email

@alanzyt311
Copy link
Author

alanzyt311 commented Aug 21, 2021

Thanks so much for your help @adrianmay!

About the "Scratch"

I kinda got what you mean. But could you please explain a little bit more about what does "when motion is great, it will describe the next frame from scratch"? Since in each motion vector we need both source and destination coordinates in the image to form a vector. In the condition of "desrcibe from scratch", what will be the scratch, i.e the source that used to calculate motion vectors? Will it be the very first frame in current video clip? Or this scratch will change in the process of calculation.

About my demo results

And the following is a demo result. What I did is that I sum up all the magnitude of vectors with the same frame id. (The magnitude is calculated by Euclidean distance between source point and destination point of a vector)

You could see that the total mv of each frame varies a lot. And from the raw mv data, the source equal of each macroblock is -1, which means that each frame use it past frame as the source. So what I am confused here is that what kinds of conclusion (related to the degree of motion) could I draw from such results? For example, frame #2 has a larger degree of motion than frame #3 due to a larger total mv value (not sure whether it's correct).

I'll appreciate it if you could leave some of your comments on them. That would do me a huge favor. : )

FRAME ID-2: mv=98.81913190966075
FRAME ID-3: mv=1123.171597074369
FRAME ID-4: mv=438.18064369451434
FRAME ID-5: mv=98.5477888107424
FRAME ID-6: mv=2500.5595528493914
FRAME ID-7: mv=4733.279093749514
FRAME ID-8: mv=3008.052276058058
FRAME ID-9: mv=14.0
FRAME ID-10: mv=1.0
FRAME ID-11: mv=12.0
FRAME ID-12: mv=1826.7209391373383
FRAME ID-14: mv=357.05479230631863
FRAME ID-15: mv=3.0
FRAME ID-16: mv=0.0
FRAME ID-17: mv=0.0
FRAME ID-18: mv=291.17039913835464
FRAME ID-19: mv=462.70365132974763
FRAME ID-20: mv=191.35358610873433
FRAME ID-21: mv=1.0
FRAME ID-22: mv=0.0
FRAME ID-23: mv=0.0
FRAME ID-24: mv=198.24961989978206
FRAME ID-26: mv=313.28921870842674

@adrianmay
Copy link
Owner

adrianmay commented Aug 21, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants