mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-26 21:19:35 +00:00
There are cases when iterative solvePnP method converges on a "wrong" camera position due to projectPoints not treating negative Z values properly. Other methods don't seem to be affected by that, but their results differ from the iterative method slightly. By combining these two methods we "nudge" the iterative method towards the correct camera position and get satisfactory results most of the time. Sometimes, though, even with the "nudge" the iterative method diverges catastrophically, and this is not caught by the solver. We work around that by assuming our camera position cannot be too far from the markers.