You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello
How are you?
Thanks for contributing to this project.
I want to get a moving object's speed as single scalar value.
I see there is a velocity member in a tracked object.
But it is a 2x2-D array as vector.
[
[39.56255496 -1.89730458]
[40.79390178 -1.70833893]
]
Of course, I used object bounding boxes as tracking module's input.
How can I get an object's moving speed as single scalar value
The text was updated successfully, but these errors were encountered:
Hello! The TrackedObject.estimate_velocity is returning the horizontal and vertical velocity for each keypoint (in your case, for each corner of the bounding box) of your tracked object. If you want to give a single number, you should first average the velocities of both corners, and then take the norm of that final vector.
Here is an example of how to do that for a TrackedObject instance named obj:
Remember that this velocity is in pixels/frame units (so, how many pixels does the object move between consecutive frames). If you want to know the velocity in real units like meters/second, you will need to know
the relationship between a pixel and a meter (which might be different on each axis depending on the perspective and where your object is in the image)
the real time difference between consecutive frames in your video (typically is just the inverse of the fps, but if your video was in slow-motion or was a timelapse you would also need to contemplate that).
Once you have that information, you would have to convert the entries of obj.estimate_velocity accordingly before averaging.
Hello
How are you?
Thanks for contributing to this project.
I want to get a moving object's speed as single scalar value.
I see there is a velocity member in a tracked object.
But it is a 2x2-D array as vector.
[
[39.56255496 -1.89730458]
[40.79390178 -1.70833893]
]
Of course, I used object bounding boxes as tracking module's input.
How can I get an object's moving speed as single scalar value
The text was updated successfully, but these errors were encountered: