solvePnP return one rotate matrix. But this rotate matrix is not continuously varying when my points varies continuously. But solvePnP function use solvePnPGeneric inside ，which can return all the solutions .For instance ,solvePnPGeneric with IPPE can return two rotate matrix.

My point is that I want to get a rotate matrix which varies continuously . To achieve this ，I think about selecting one particular rotate matrix from solvePnPGeneric result.

The following picture is the rotate status calculated by solvePnP IPPE. In the right sides lies the Quaternion result. The first solution on the top. The second solution on the buttom. I wonder which one is the better and how to differentiate the two rotate matrix.

I beg your help.

just curious, where do you see 2 output rotations here ?

https://docs.opencv.org/4.x/d9/d0c/group__calib3d.html#ga624af8a6641b9bdb487f63f694e8bb90

solvePnPGenetic return std::vectorcv::Mat m_rvec. My picture shows that the same pixel points

can lead to two rotations. The top is the first rotation, the bottom is the second rotation.

1 Like