Question

I have a rotation matrix calculated from the calibration of the PTZ camera mount.

Given the rotation matrix, how can I calculate the roll angle of the video image at the current Pan/Tilt position?

Was it helpful?

Solution

I think I figured it out.

If I cross the Up Vector, from my rotation matrix, with the Forward Vector, calculated from the camera current Pan/Tilt, I will get the Side Vector which I can use to calculate the Roll angle.

double roll = Math.atan(side.z / Math.sqrt(side.x * side.x + side.y * side.y));
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top