Ask Your Question

Revision history [back]

SolvePnp: similar input returns very different output


I am using a planar object (composed of 16 3D points, all with Z=0). When I use SolvePnp with 16 2D points, I usually get results that make sense. However, if I move my planar object, for example translating it along the Y axis (up-down), at a certain configuration the output changes abruptly. If I keep moving in the same direction, the reconstructed 3D pose keeps changing smoothly from the new values.

I plotted the 3D position of my 16 points, and I notice that when the abrupt change happens, the reconstruction is still plausible, except that it is rotated by about 30 degrees along some axis in the middle of the object.

This is highly repeatable, and always happens at about the same point (i.e. the same Y axis location).

Any thoughts why this happens and how it can be avoided?