I am using opencv solvePnP to get the rotation and translation vectors for an image. I am not sure how to use the rotation vector. I would like to convert the rotational vector to two angles, the inclination angle and the azimuth angle (like in spherical coordinates) because then it would be easier for me to use.
I created some test cases: 3d point locations: (0,0,0) (0,0,1) (1,0,1) (1,0,0) camera location: (.5, -1, .5) rotation vector: (1.57, 0, 0) (facing the positive y direction)
and when I flip the corresponding pixel location corresponding points so the camera is located at (.5, 1, .5) (facing the negative y direction) the rotation vector is (1.2, 1.2, -1.2). I am not sure how this last vector makes it face the negative y direction...
Any advice on how this works or how to convert it to inclination and azimuth would be much appreciated.
I used opencv rodrigues to turn it into a rotation matrix, then I multiplied by the point 0,0,1 and used the new location of the point to tell where I am looking