OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Mon, 27 Jun 2016 08:45:08 -0500RQDecomp3X3 precision Losshttp://answers.opencv.org/question/97373/rqdecomp3x3-precision-loss/ I am facing precision loss while obtaining R and Q matrices using function **RQDecomp3X3** in opencv. Is there a way to improve the precision for it's output.
Or is it possible to achieve QR decomposition in manner similar to **RQDecomp3X3** using function *solve* and flag *DECOMP_QR*starlord_1Mon, 27 Jun 2016 08:45:08 -0500http://answers.opencv.org/question/97373/How can I get rotation-vector from Euler-angles?http://answers.opencv.org/question/88531/how-can-i-get-rotation-vector-from-euler-angles/If I have 3 Euler-angles then how can I get rotation-vector to use it for camera-rotation in [OpenCV-viz3d](http://docs.opencv.org/2.4/modules/viz/doc/viz3d.html#)?
I.e. how can I get `Vec3d( X, Y, Z)` from [Euler-angles](https://en.wikipedia.org/wiki/Euler_angles) (alfa, betta, gamma) to use in this code?
viz::Viz3d viz_3d_window("Viz window");
cv::Affine3d pose = viz_3d_window.getViewerPose();
viz_3d_window.setViewerPose( pose.rotate( Vec3d( X, Y, Z) ) );
cv::Affine3d::rotate(); https://github.com/Itseez/opencv/blob/f9e2b036a502309c0da5abc5e711d4cd64eb8a38/modules/core/include/opencv2/core/affine.hpp#L114
I can find Euler-angles from rotation-matrix by using [RQDecomp3x3()](http://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html?highlight=euler#rqdecomp3x3) or as shown in [that question](http://answers.opencv.org/question/8842/rotation-matrix-to-euler-angle/), but whether is there an inverse function in the OpenCV to find rotation-matrix from Euler-angles or better to find rotation-vector( `Vec3d( X, Y, Z)` )?AlexBThu, 25 Feb 2016 03:05:56 -0600http://answers.opencv.org/question/88531/RQ_decomposition is there a problem with Y 90 /270 degrees?http://answers.opencv.org/question/52615/rq_decomposition-is-there-a-problem-with-y-90-270-degrees/ Hi
I was wondering if anyone has come across a problem with the Euler angles returned by RQDecomp3X3 method when rotating by 90 or 270 degrees in the Y axis. I have tried decomposing a rotation matrix which is composed of 3 rotations in the following order starting with X (rotation matrix) multiplied by Y(rotation matrix) multiplied by Z(rotation matrix) (Z*Y*X) with any arbitrary combination of angles for the X and Z where Y = 90 and always get the following vector of Euler angles(90,90,90) or (90,-90,90) where Y=270. So regardless of my input angles for X and Z the result is always the same. Has anyone come across this, or do you know how to explain why this is occurring?
Any help with this will be greatly appreciated,
SuzanaSuzanaThu, 08 Jan 2015 14:41:35 -0600http://answers.opencv.org/question/52615/