1 | initial version |
For R_y and R_z. You can't used index 0. //next we need to compose the 3 rotations into their matrix forms cv::Mat_<double> R_x(3,3);
R_x << 1, 0, 0,
0, cos(E_x[0]), -sin(E_x[0]),
0, sin(E_x[0]), cos(E_x[0]);
cv::Mat_<double> R_y(3,3);
R_y << cos(E_y[1]), 0, sin(E_y[1]),
0, 1, 0
-sin(E_y[1]), 0, cos(E_y[1]);
cv::Mat_<double> R_z(3,3);
R_z << cos(E_z[2]), -sin(E_z[2]), 0,
sin(E_z[2]), cos(E_z[2]), 0,
0, 0, 1;
R = R_x * R_y * R_z;
2 | No.2 Revision |
For R_y and R_z. You can't used index 0.
0.
//next we need to compose the 3 rotations into their matrix forms
cv::Mat_<double> R_x(3,3);R_x(3,3);
R_x << 1, 0, 0,
0, cos(E_x[0]), -sin(E_x[0]),
0, sin(E_x[0]), cos(E_x[0]);
cv::Mat_<double> R_y(3,3);
R_y << cos(E_y[1]), 0, sin(E_y[1]),
0, 1, 0
-sin(E_y[1]), 0, cos(E_y[1]);
cv::Mat_<double> R_z(3,3);
R_z << cos(E_z[2]), -sin(E_z[2]), 0,
sin(E_z[2]), cos(E_z[2]), 0,
0, 0, 1;
R = R_x * R_y * R_z;