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.
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (2)
William Rose
il 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 Commenti
yanqi liu
il 2 Apr 2022
yes,sir,may be use image background and frame diff,such as

then,we can diff background from video,and get

Vedere anche
Categorie
Scopri di più su Tracking and Motion Estimation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!