Ask Your Question
1

SolvePnp: similar input returns very different output

asked 2013-04-18 14:35:01 -0600

percepticat gravatar image

Hello,

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?

Thanks!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-04-18 15:38:08 -0600

Is the jump really related to y-location? I believe it is caused by the pose of the object, which also changes as you move the object up. Can you fix the object location and change only its pose?

The solution of solvePnP is not constrained sufficiently in that particular pose which may cause instability. You can consider some temporal smoothing to reduce this effect.

edit flag offensive delete link more

Comments

I repeated the test by translating the camera (very accurate) while keeping the object stationary. I see the same results.

I am thinking that it's maybe related to the configuration of the points used. Imagine that I have 4 points on a plane as follows: A(0,0,0) ====== B(10,0,0) || \ C(0,10,0)=============D(15,10,0)

I can see how a rotation of the object about a line parallel to AB and CD and in between them would still make all the points project to the same 2D positions. So this can create an ambiguity.... right? And if you agree, what would be a good set of points to use?

percepticat gravatar imagepercepticat ( 2013-04-18 16:06:17 -0600 )edit

I had similar problem when testing detection/pose recognition of AR markers from AR Toolkit. In that case, when the marker is viewed from top (without any perspective distortion) the solution to the pose estimation was unstable. In contrast when the marker was viewed from angle, the estimation was accurate. This is caused by the fact that the points are on plain and the estimation is done in 3D. When the plane is facing you, it will have the same projection to 2D plain as if facing other way round. Note, the estimation was done from 4 points only. Hope this helps.

Ekalic gravatar imageEkalic ( 2013-04-20 13:56:17 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-04-18 14:35:01 -0600

Seen: 2,878 times

Last updated: Apr 18 '13