Coordinate System Transformations

3 次查看(过去 30 天)
Mark
Mark 2011-2-23
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 个评论
Jan
Jan 2011-2-23
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 2011-2-23
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?

请先登录,再进行评论。

回答(1 个)

Mark
Mark 2011-2-24
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 个评论
Mark
Mark 2011-2-24
I think it should be....
% find transfer
Resultdcm = Refdcm - Measdcm;
Jan
Jan 2011-2-24
You just need the Aerospace Toolbox to run this...

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Geometric Transformation and Image Registration 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by