solvePnP: is not handling all degenerated cases (Bug #3984)
Description
Depending on the point configuration and the selected method solvePnP returns wrong solutions
(deviation > 1-e3)
1000 Tests with four fixed scene points (A;B,C,D) and random camera positions
case 1 right angle between ABC; all scene points are coplanar:
SOLVEPNP_ITERATIVE - 0 wrong solutions
SOLVEPNP_P3P - 445 wrong solutions
SOLVEPNP_EPNP - 0 wrong solutions
SOLVEPNP_DLS - 4 wrong solutions
SOLVEPNP_UPNP - 1000 wrong solutions
case 2 right angle between ABC (D is not coplanar to ABC);
SOLVEPNP_ITERATIVE - 634 wrong solutions
SOLVEPNP_P3P - 397 wrong solutions
SOLVEPNP_EPNP - 884 wrong solutions
SOLVEPNP_DLS - 0 wrong solutions
SOLVEPNP_UPNP - 1000 wrong solutions
case 3 (general configuration)
SOLVEPNP_ITERATIVE - 701 wrong solutions
SOLVEPNP_P3P - 0 wrong solutions
SOLVEPNP_EPNP - 613 wrong solutions
SOLVEPNP_DLS - 0 wrong solutions
SOLVEPNP_UPNP - 1000 wrong solutions
case 4 (general configuration + 2 additional points)
SOLVEPNP_ITERATIVE - 0 wrong solutions
SOLVEPNP_P3P -
SOLVEPNP_EPNP - 0 wrong solutions
SOLVEPNP_DLS - 0 wrong solutions
SOLVEPNP_UPNP - 6 wrong solutions
The main problem might be a lack of documentation because P3P is only handling the main case and should only be used in combination with RANSAC and environments having only a few right angles.
Associated revisions
Merge pull request #3984 from LaurentBerger:ExampleCppORB
History
Updated by Maksim Shabunin over 9 years ago
Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4854