mirror of
https://github.com/opencv/opencv.git
synced 2026-11-09 18:04:29 -06:00
PoseSolver::rot2vec reads the rotation axis from R - R^T and divides by sin(theta). Both vanish when the rotation is close to 180 degrees, which is the pose of a square tag seen exactly head-on, so SOLVEPNP_IPPE_SQUARE returned a pose flipped by 180 degrees. Fall back to Rodrigues in that case and clamp the acos argument. The fast path for all other rotations is unchanged.