# OpenCV Rodrigues And RVECS

**URL:** <https://forum.opencv.org/t/opencv-rodrigues-and-rvecs/24348>\
**Category:** Uncategorized\
**Tags:** calib3d\
**Created:** [February 2, 2026, 9:29am UTC](https://forum.opencv.org/t/opencv-rodrigues-and-rvecs/24348 "2026-02-02T09:29:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![khwarizman](https://avatars.discourse-cdn.com/v4/letter/k/77aa72/32.png) [@khwarizman](https://forum.opencv.org/u/khwarizman)\
**Post date:** [February 2, 2026, 9:29am UTC](https://forum.opencv.org/t/opencv-rodrigues-and-rvecs/24348/1 "2026-02-02T09:29:21Z")

</div>

Based On my understanding

RVECS - Provide the axis angle representation lets say of the object in the world coordinate system.In short they provide rotation of an angle about an arbitrary axis passing through the origin.

Now when I call cv::Rodrigues opencv docs say rvecs are converted into rotation matrices, but are these rotation matrices are they in X,Y,Z plane ? I.e Is the rodrigues rotation matrix chain of the  
Rx = [1 0 0][0 cosx -sinx] [0 sinx cosx]

,similary RY and RZ is the rodrigues given rotation matrix of rvec a chaining of such form?

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [February 3, 2026, 4:26pm UTC](https://forum.opencv.org/t/opencv-rodrigues-and-rvecs/24348/2 "2026-02-03T16:26:22Z")

</div>

Rodrigues() gives you _one_ rotation matrix. it rotates around the rvec, by the angle that is equal to the vector’s length.

no Euler angles are involved.

---

<div class="post-metadata">

**Author:** ![khwarizman](https://avatars.discourse-cdn.com/v4/letter/k/77aa72/32.png) [@khwarizman](https://forum.opencv.org/u/khwarizman)\
**Post date:** [February 4, 2026, 9:10am UTC](https://forum.opencv.org/t/opencv-rodrigues-and-rvecs/24348/3 "2026-02-04T09:10:07Z")

</div>

So I could use any one representation to get roll,pitch and yaw  
Using the conventions in the below image

 ![image](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/0/0b3125e2f64f4dc0d70f30e7d725d7c5618de905.jpeg)

---

<div class="post-metadata">

**Author:** ![khwarizman](https://avatars.discourse-cdn.com/v4/letter/k/77aa72/32.png) [@khwarizman](https://forum.opencv.org/u/khwarizman)\
**Post date:** [February 4, 2026, 10:52am UTC](https://forum.opencv.org/t/opencv-rodrigues-and-rvecs/24348/4 "2026-02-04T10:52:43Z")

</div>

I use the below function to get the rvecs cv::solvePnP(objectPoints,markerCorners.at(i),matrixCoefficients,distortionCoefficients,rvec,tvec,false,cv::SOLVEPNP\_IPPE\_SQUARE);

The issue is my x rvec sometimes fluctuates between -3 and +3 due to this sign change my final calculations are being affected. What could be the issue or solution for this?

---

<div class="post-metadata">

**Author:** ![meejah](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/meejah/32/14170_2.png) [@meejah](https://forum.opencv.org/u/meejah)\
**Post date:** [March 22, 2026, 12:03am UTC](https://forum.opencv.org/t/opencv-rodrigues-and-rvecs/24348/5 "2026-03-22T00:03:51Z")

</div>

Is there an OpenCV way to convert “roll-pitch-yaw” to the rvec form (in Java) or do you just use cv::gemm() etc and do it yourself?
