Using gyroscopic measurement to rotate image
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello!
I have the data from a imu device of a drone and I want to use the gyroscopic measurement (gx gy gz) to rotate a image capture by the drone.
Here I got the mean of the imu data.
i_1 is the image I want to rotate.
I think I should use imrotate but I dont know what to put in the second parameter.
Here we can see the output of the imu gyroscopic measurement mean.
Does anyone know how can I do this?
Thanks!
0 commentaires
Réponses (1)
William Rose
le 12 Juin 2022
Modifié(e) : William Rose
le 12 Juin 2022
[edit: correcting my typos]
Please describe what you are trying to accomplish with imrotate. You say you have computed the mean of the angular velocities about x, y, z from time ind_1 to ind_2. Was the image taken at time 1, and you want to rotate it to what it would have looked like at time 2? Or vice versa? Or something else?
What is the orientation of the camera axis relative the the imu axes? For example, it could be that the center axis of the camera is fixed relaitve to the IMU, and is aligned with the z-axis of the IMU. However, other possibilities also exist.
imrotate can only rotate an image about the center axis of the image, i.e. about the axis pependicular to the image plane. It is highly likely that the drone movement from time 1 to time 2 is more complex that just a rotation about the central axis of the image. In the case of a more complex rotation, there is no rotation that you can do with imrotate that will adjust the image from its time 1 appearance to what would have been its time 2 appearance, or vice versa. In other words, if the camera has done anything other than roll aboiut the image axis, you can't correct it with imrotate.
Furthermore, taking the mean value of the angular velocity over a time period, about ach axis, destroys the information needed to reconstruct the actual rotation. The timing matters. For example, if you rotate 90 degrees about X, then about Y, then about Z, you end up oriented differently than if you do the same angles about the same axes, but in different order, i.e. with different timing. You will want to read about 3D rotations, Euler angles, etc., to understand this better.
If I am telling you stuff you already know, I apologize.
0 commentaires
Voir également
Catégories
En savoir plus sur MATLAB Support Package for IP Cameras dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!