Ask Your Question

Brumbazz's profile - activity

2017-01-25 09:57:07 -0600 commented answer SolvePnPRansac works in 2.4.11 but not in 3.1.0

All right, so I actually made an example, which does seem to create the error, I get through the mexopencv. So I guess the problem is not in OpenCV, sorry about that and thank everyone for the help.

2017-01-25 08:01:43 -0600 received badge  Supporter (source)
2017-01-25 07:55:25 -0600 commented answer SolvePnPRansac works in 2.4.11 but not in 3.1.0

I know there has been a change from minInliers to Confidence, but as input everything apart from 2D points, 3D points and camera matrix defaults to something, then the function should produce correct results if these are not set.

Sorry about the answer/comments mishap.

I am working on a code example

2017-01-25 03:57:17 -0600 received badge  Editor (source)
2017-01-25 03:52:54 -0600 answered a question SolvePnPRansac works in 2.4.11 but not in 3.1.0

Ok, so I'm using mexopencv, which might be the cause but all it does is wrap the opencv function.

I have tested with artificial data, that does not have noise. I use some 2D data, which I project into 3D space given a camera matrix and a transformation, while scaling the 3D points, so each 2D point is represented at several distances.

Using SolvePnP I can estimate the transformation and project my 3D points back into 2D and see if they match the original points, which they do (within tolerance) for both 2.4.11 and 3.10.

However, doing the same with SolvePnPRansac only works in 2.4.11 and not 3.10. Since there are no noisy points, this should work for the default settings, which it does not. The default/minimum settings are identical to SolvePnP, so I cannot see, where I could go wrong.

I don't really know where to start :-(

2017-01-19 10:15:53 -0600 received badge  Student (source)
2017-01-19 09:24:18 -0600 asked a question SolvePnPRansac works in 2.4.11 but not in 3.1.0

I have some code, where a camera pose is estimated using SolvePnPRansac based on 2d-3d correspondance. I backproject a pointcloud into my image so visual confirmation is easy.

I know the data is noisy but in 2.4.11, I can set the number of iterations high and the number of inliers high and get fairly consistent results. Even using the standard settings the results are ok.

Using the exact same data but 3.1.0, I cannot produce a single result, which is right regardless of settings.

Has something fundamentally changed, which means the algorithm can no longer handle noisy data?

I made the switch in order to use other functions not available in 2.4.x.