Coordinate System Transformations

3 visualizzazioni (ultimi 30 giorni)
Mark
Mark il 23 Feb 2011
I have an image of two objects (reference & measurement object). I have the rotational data (yaw, pitch and roll) on both objects with reference to the camera. If we transfer reference to the reference object (this becomes 0,0,0), how do I determine the measurement objects rotation with respect of the reference object (0,0,0)?
Thanks!
  2 Commenti
Jan
Jan il 23 Feb 2011
Please describe information you can get fromnthe "images". If you have the rotational data, where is the problem for determination of the rotation? Are you searching for the direction-cosine-matrix, which transforms one reference from to another? Does the question concern the images in any way?
Mark
Mark il 23 Feb 2011
Hi Jan, thanks for helping me. From the image I get the yaw, pitch and roll (degrees) for object 1 and 2 with respect to the camera. If I make object 1 my reference (0,0,0), how do I determine the position of object 2?
Example... Object 1 (-12, -5, -2) and Object 2 ( +13, -10, +20). How would I use the DCM to solve this problem?

Accedi per commentare.

Risposte (1)

Mark
Mark il 24 Feb 2011
Does this look correct?
% Reference data
RefYaw = toRadians('degrees', 1);
RefPitch = toRadians('degrees', 0);
RefRoll = toRadians('degrees', 0);
% convert to a Reference dcm
Refdcm = angle2dcm(RefYaw, RefPitch, RefRoll);
% Measurement data
MeasYaw = toRadians('degrees', 15);
MeasPitch = toRadians('degrees', 0);
MeasRoll = toRadians('degrees', 0);
% convert to a Measurement dcm
Measdcm = angle2dcm(MeasYaw, MeasPitch, MeasRoll);
% find transfer
Resultdcm = Refdcm * Measdcm;
[y p r] = dcm2angle(Resultdcm);
yaw = toDegrees('radians', y)
pitch = toDegrees('radians', p)
roll = toDegrees('radians', r)
  2 Commenti
Mark
Mark il 24 Feb 2011
I think it should be....
% find transfer
Resultdcm = Refdcm - Measdcm;
Jan
Jan il 24 Feb 2011
You just need the Aerospace Toolbox to run this...

Accedi per commentare.

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by