Ask Your Question

TokaM's profile - activity

2019-06-15 09:57:53 -0500 received badge  Popular Question (source)
2015-03-29 12:13:56 -0500 received badge  Editor (source)
2015-03-29 12:12:27 -0500 asked a question What are the requirements for solvePnP and how to improve my results?

My goal is to estimate the camera pose by using a camara-matrix, a distortion matrix, and a set of image-to-object-coordinate-correspondences.

I am having issues with the solvePnP function which I do use to estimate my camera pose. My results seem to be inaccurate, especially for the pitch axis. I am using co-planar points, which even also have only a little variation in the y-axis, so that they are almost in a line.

What are the requirements for solvePnP and how to improve my results?

I am using the Calib3d.CV_ITERATIVE flag to select this of the three algorithms, because the other two performed obviously completly wrong. But P3P was closer than EPNP. I am using the latest OpenCV java-wrapper.

I created an evaluation dataset. On my Roll-Axis, and on my Yaw-Axis (in world coordinates) the median of the difference between the calculated and expected results are small. But the differences within one sample are +-5 (for roll) and +3/-7 for (yaw) expect outliners, which can be 20° off but occour seldom in my testdataset.

Big problems I observe for the pitch angle. The median of the difference between expectation and estimated values is 9.6. the accurancy drifts arround 30°.

Will I have more success with other algorithms, which solve the PnP problem, or if I do add more points, e.g. ones which are moved along the (open-cv) Z-axis to my szene?

Here is an Xml-File which contains the points of my test-dataset.

And here is an Xls-File with my current evaluation.

Here you find the images of the test-dataset and containing an (incomplete) projection of a cube.

Here you find the code I use to generate the xml file, and test solvePnP and generate my xml file.

Here you find a not yet used dataset of a test szene, with two points with variation in the Z-Axis. Do you recommend to create the full-annotations for this testset?

I assume no important information to be mentioned here, but for completness I am appending the related question I asked at the 13th of march on stackoverflow.

2015-03-24 13:29:03 -0500 commented question Is anyone using P3P or EPNP in solvePnP?

How good were your results. I am using the iterative algrorithem on Android, which turned out to be the closet of all three. Anyways my results are far from brilliant. Rotation is sometimes confused with translation. I have +-5° error in the rotation and sometimes I experience outliners with 30° drift!

2015-03-24 13:25:02 -0500 received badge  Supporter (source)