PnP - rotation vector interpretation
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I work on the Perspective-n-Point problem. From 4 img points in img CS (2D) and 4 corresponding points in world CS (3D, XYZ), I want to get the rotation and translation of the camera.
In fact, opencv function cv2.solvePnP() solves that problem for me. It returns rotation as rotation vector [3x1] and translation vector.
I would like to ask for help with interpreting the rotation vector.
As far as I understand the rotation vector representation:
- the rotation vector is the axis of the rotation
- the length of rotation vector is the rotation angle ø in radians
[around axis, which is rotation vector]
Lets' say the function returns rotation vector rvec as below:
$$rvec = [-1.5147142; 0.11365167; 0.10590861]]$$
Then:
$$theta_rvec = sqrt(-1.5147142^2 + 0.11365167^2 + 0.10590861^2) [rad] = 1.52266 [rad] = frac1.52266*1803.14 [deg] = 87.286 [deg]$$
1. Does three rvec components (-1.5147142; 0.11365167; 0.10590861) correspond to world coordinates?
2. Can I interpret the vector components as separate rotation angles in radians around components directions?
My rvec components interpretation:
$$alpha_X = -1.5147142 [rad] = frac-1.5147*1803.14 [deg] = -86.83 [deg]$$
$$beta_Y = 0.11365167 [rad] = frac0.11365167*1803.14 [deg] = 6.52 [deg]$$
$$gamma_Z = 0.10590861 [rad] = frac0.10590861*1803.14 [deg] = 6.07 [deg]$$
$alpha_X$ - angle around X (direction of first component)
$beta_X$ - angle around Y (direction of second component)
$gamma_X$- angle around Z (direction of third component)
My usecase: I have coordinates of four image points. I know the coordinates of these points in the real world. I know camera intrinsic matrix. I use PnP3 to get rotation and translation vector. From rotation matrix, I would like to find out what are the angles around fixed global/world axes: X, Y, Z. I am NOT interested in Euler angles. I want to find out how an object is being rotated around the fixed world coordinates (not it's own coordinate system).
I would really appreciate your help. I feel lost in rotation. Thank you in advance.
coordinate-systems rotations projection
add a comment |Â
up vote
0
down vote
favorite
I work on the Perspective-n-Point problem. From 4 img points in img CS (2D) and 4 corresponding points in world CS (3D, XYZ), I want to get the rotation and translation of the camera.
In fact, opencv function cv2.solvePnP() solves that problem for me. It returns rotation as rotation vector [3x1] and translation vector.
I would like to ask for help with interpreting the rotation vector.
As far as I understand the rotation vector representation:
- the rotation vector is the axis of the rotation
- the length of rotation vector is the rotation angle ø in radians
[around axis, which is rotation vector]
Lets' say the function returns rotation vector rvec as below:
$$rvec = [-1.5147142; 0.11365167; 0.10590861]]$$
Then:
$$theta_rvec = sqrt(-1.5147142^2 + 0.11365167^2 + 0.10590861^2) [rad] = 1.52266 [rad] = frac1.52266*1803.14 [deg] = 87.286 [deg]$$
1. Does three rvec components (-1.5147142; 0.11365167; 0.10590861) correspond to world coordinates?
2. Can I interpret the vector components as separate rotation angles in radians around components directions?
My rvec components interpretation:
$$alpha_X = -1.5147142 [rad] = frac-1.5147*1803.14 [deg] = -86.83 [deg]$$
$$beta_Y = 0.11365167 [rad] = frac0.11365167*1803.14 [deg] = 6.52 [deg]$$
$$gamma_Z = 0.10590861 [rad] = frac0.10590861*1803.14 [deg] = 6.07 [deg]$$
$alpha_X$ - angle around X (direction of first component)
$beta_X$ - angle around Y (direction of second component)
$gamma_X$- angle around Z (direction of third component)
My usecase: I have coordinates of four image points. I know the coordinates of these points in the real world. I know camera intrinsic matrix. I use PnP3 to get rotation and translation vector. From rotation matrix, I would like to find out what are the angles around fixed global/world axes: X, Y, Z. I am NOT interested in Euler angles. I want to find out how an object is being rotated around the fixed world coordinates (not it's own coordinate system).
I would really appreciate your help. I feel lost in rotation. Thank you in advance.
coordinate-systems rotations projection
You could start by reading the documentation forcv2.solvePnP
, which, if you follow the links in it, explains how to interpret the rotation vector.
â amd
Aug 26 at 16:25
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I work on the Perspective-n-Point problem. From 4 img points in img CS (2D) and 4 corresponding points in world CS (3D, XYZ), I want to get the rotation and translation of the camera.
In fact, opencv function cv2.solvePnP() solves that problem for me. It returns rotation as rotation vector [3x1] and translation vector.
I would like to ask for help with interpreting the rotation vector.
As far as I understand the rotation vector representation:
- the rotation vector is the axis of the rotation
- the length of rotation vector is the rotation angle ø in radians
[around axis, which is rotation vector]
Lets' say the function returns rotation vector rvec as below:
$$rvec = [-1.5147142; 0.11365167; 0.10590861]]$$
Then:
$$theta_rvec = sqrt(-1.5147142^2 + 0.11365167^2 + 0.10590861^2) [rad] = 1.52266 [rad] = frac1.52266*1803.14 [deg] = 87.286 [deg]$$
1. Does three rvec components (-1.5147142; 0.11365167; 0.10590861) correspond to world coordinates?
2. Can I interpret the vector components as separate rotation angles in radians around components directions?
My rvec components interpretation:
$$alpha_X = -1.5147142 [rad] = frac-1.5147*1803.14 [deg] = -86.83 [deg]$$
$$beta_Y = 0.11365167 [rad] = frac0.11365167*1803.14 [deg] = 6.52 [deg]$$
$$gamma_Z = 0.10590861 [rad] = frac0.10590861*1803.14 [deg] = 6.07 [deg]$$
$alpha_X$ - angle around X (direction of first component)
$beta_X$ - angle around Y (direction of second component)
$gamma_X$- angle around Z (direction of third component)
My usecase: I have coordinates of four image points. I know the coordinates of these points in the real world. I know camera intrinsic matrix. I use PnP3 to get rotation and translation vector. From rotation matrix, I would like to find out what are the angles around fixed global/world axes: X, Y, Z. I am NOT interested in Euler angles. I want to find out how an object is being rotated around the fixed world coordinates (not it's own coordinate system).
I would really appreciate your help. I feel lost in rotation. Thank you in advance.
coordinate-systems rotations projection
I work on the Perspective-n-Point problem. From 4 img points in img CS (2D) and 4 corresponding points in world CS (3D, XYZ), I want to get the rotation and translation of the camera.
In fact, opencv function cv2.solvePnP() solves that problem for me. It returns rotation as rotation vector [3x1] and translation vector.
I would like to ask for help with interpreting the rotation vector.
As far as I understand the rotation vector representation:
- the rotation vector is the axis of the rotation
- the length of rotation vector is the rotation angle ø in radians
[around axis, which is rotation vector]
Lets' say the function returns rotation vector rvec as below:
$$rvec = [-1.5147142; 0.11365167; 0.10590861]]$$
Then:
$$theta_rvec = sqrt(-1.5147142^2 + 0.11365167^2 + 0.10590861^2) [rad] = 1.52266 [rad] = frac1.52266*1803.14 [deg] = 87.286 [deg]$$
1. Does three rvec components (-1.5147142; 0.11365167; 0.10590861) correspond to world coordinates?
2. Can I interpret the vector components as separate rotation angles in radians around components directions?
My rvec components interpretation:
$$alpha_X = -1.5147142 [rad] = frac-1.5147*1803.14 [deg] = -86.83 [deg]$$
$$beta_Y = 0.11365167 [rad] = frac0.11365167*1803.14 [deg] = 6.52 [deg]$$
$$gamma_Z = 0.10590861 [rad] = frac0.10590861*1803.14 [deg] = 6.07 [deg]$$
$alpha_X$ - angle around X (direction of first component)
$beta_X$ - angle around Y (direction of second component)
$gamma_X$- angle around Z (direction of third component)
My usecase: I have coordinates of four image points. I know the coordinates of these points in the real world. I know camera intrinsic matrix. I use PnP3 to get rotation and translation vector. From rotation matrix, I would like to find out what are the angles around fixed global/world axes: X, Y, Z. I am NOT interested in Euler angles. I want to find out how an object is being rotated around the fixed world coordinates (not it's own coordinate system).
I would really appreciate your help. I feel lost in rotation. Thank you in advance.
coordinate-systems rotations projection
asked Aug 26 at 12:21
Kingkin
1
1
You could start by reading the documentation forcv2.solvePnP
, which, if you follow the links in it, explains how to interpret the rotation vector.
â amd
Aug 26 at 16:25
add a comment |Â
You could start by reading the documentation forcv2.solvePnP
, which, if you follow the links in it, explains how to interpret the rotation vector.
â amd
Aug 26 at 16:25
You could start by reading the documentation for
cv2.solvePnP
, which, if you follow the links in it, explains how to interpret the rotation vector.â amd
Aug 26 at 16:25
You could start by reading the documentation for
cv2.solvePnP
, which, if you follow the links in it, explains how to interpret the rotation vector.â amd
Aug 26 at 16:25
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2894985%2fpnp-rotation-vector-interpretation%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
You could start by reading the documentation for
cv2.solvePnP
, which, if you follow the links in it, explains how to interpret the rotation vector.â amd
Aug 26 at 16:25