Coordinate System Transformations

3 vues (au cours des 30 derniers jours)
Mark
Mark le 23 Fév 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 commentaires
Jan
Jan le 23 Fév 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 le 23 Fév 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?

Connectez-vous pour commenter.

Réponses (1)

Mark
Mark le 24 Fév 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 commentaires
Mark
Mark le 24 Fév 2011
I think it should be....
% find transfer
Resultdcm = Refdcm - Measdcm;
Jan
Jan le 24 Fév 2011
You just need the Aerospace Toolbox to run this...

Connectez-vous pour commenter.

Catégories

En savoir plus sur Geometric Transformation and Image Registration 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!

Translated by