-
Notifications
You must be signed in to change notification settings - Fork 0
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
Comments
You need to install libavutil. I don't know what machine you're building on
so I can't tell you how. If you google for the name of the missing library
together with the name of the OS you're using, you should find instructions.
Let me warn you that motion vectors extracted from mpeg streams are not
very good indicators of motion. They respond more strongly to small
movements than big ones, cos with big ones the algorithm gives up and makes
the next frame from scratch.
…On Thu, 5 Aug 2021 at 07:54, alanzyt311 ***@***.***> wrote:
Hi @adrianmay <https://github.com/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.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAARMR7ILYL45IP7SZY7E6DT3IYTDANCNFSM5BS5T7ZA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
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! |
What I'd warn you about is that if the cars are moving fast, you might get
a *lower* measurement than if they are moving slowly.
The reason is that these motion vectors are not trying to measure the
degree of motion. They're used when they provide a way to describe the next
frame in terms of the last one using fewer bytes than if the next frame was
described from scratch. That condition applies if motion is slight, but if
motion is great, they might as well describe the next frame from scratch.
If you want to distinguish zero motion from any motion, you might succeed.
But you will not get a measurement that's proportional to the average speed
of vehicles in the scene. Quite the reverse I expect.
…On Tue, 17 Aug 2021 at 15:21, alanzyt311 ***@***.***> wrote:
Thx Adrian, @adrianmay <https://github.com/adrianmay>. 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!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAARMRYBVOVBWYSD3RYAIMDT5JV4XANCNFSM5BS5T7ZA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
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 resultsAnd 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. : )
|
There there are two ways of describing a rectangle of frame 2:
a) it's yellow
b) it's like the rectangle in frame 1 at 2 pixels to the left.
Which is more efficient? That depends on the video.
The encoder makes that decision.
In case b, a motion vector is used.
Case a is what I'm calling "from scratch".
You just can't interpret motion vectors as a"degree of motion."
In reality, they're a degree of how much better b is than a, and that is
optimal when the motion is moderate. With a lot of fast motion, a is
better, so there are fewer motion vectors.
I realise this isn't what you were hoping for, but if you're trying to get
a measure of how fast how many cars are moving about, mpeg is not gonna
give you that on a plate.
Good luck with plan B,
Adrian.
…On Sat, 21 Aug 2021, 11:02 alanzyt311, ***@***.***> wrote:
Thanks so much for your help @adrianmay <https://github.com/adrianmay>! 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"?
About the "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
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAARMR2NWJRI3AJ52BD2GXLT552TFANCNFSM5BS5T7ZA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
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.
The text was updated successfully, but these errors were encountered: