# a video in which I have to get the exact motion of a moving object and calculate the coordinates of that object before and after the movement.

9 vues (au cours des 30 derniers jours)
Haniye R le 29 Mar 2022
Commenté : Haniye R le 2 Avr 2022
Hello . I have a video in which I have to get the exact motion of a moving object and obtain the coordinates of that object before and after the movement. Can you help me??
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

### Réponses (2)

William Rose le 29 Mar 2022
@Haniye R, if the object is a well defined point in image 1 and image 2, then you can compute the motion in pixel coordinates:
PixelMotion=[px2-px1,py2-py1]
where px1,py1; px2,py2 are the pixel coordinates in images 1 and 2.
If you need motion in physical units such as meters, and if you only have one camera, then you need to make some assumptions and calibrate the image. For example, you assume the object is moving in a plane perpendicular to the camera view axis, and you orient the camera so that this is approximately true. You place a meterstick in the scene at that distance, to calibrate the image. Better yet, two perpendicular meter sticks. Then you can compute how many x pixels equals 1 meter (nx) and how many y pixels equals 1 meter (ny). Use those conversion factors to convert PixelMotion to MeterMotion:
MeterMotion=[(px2-px1)/nx,(py2-py1)/ny]
For motion in 3D, you need at least two, and preferably more, cameras. Calibration is complicated, to put it mildly.
##### 6 commentairesAfficher 4 commentaires plus anciensMasquer 4 commentaires plus anciens
Haniye R le 1 Avr 2022
Thank you for your guidance .
William Rose le 1 Avr 2022
@Haniye R, you're welcome.

Connectez-vous pour commenter.

yanqi liu le 2 Avr 2022
yes，sir，may be use image background and frame diff，such as
then，we can diff background from video，and get
##### 1 commentaireAfficher -1 commentaires plus anciensMasquer -1 commentaires plus anciens
Haniye R le 2 Avr 2022
How can I extract moving object information?

Connectez-vous pour commenter.

### Catégories

En savoir plus sur Video Formats and Interfaces dans Help Center et File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by