solvepnp pnpTask (Bug #4260)


Added by Javier Barandiaran almost 10 years ago. Updated over 9 years ago.


Status:New Start date:2015-03-31
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:calibration, 3d
Target version:-
Affected version:2.4.9 (latest release) Operating System:Windows
Difficulty: HW Platform:x86
Pull request:

Description

Hi,
I think that I found a bug in method pnpTask from solvepnp.cpp in version 2.4.11
line 200
if ( (localInliers.size() > inliers.size()) || (localInliers.size() inliers.size() && curIndex > bestIndex))
should be
if ( !localInliers.empty() && ((localInliers.size() > inliers.size()) || (localInliers.size() inliers.size() && curIndex > bestIndex)))
If localInliers is empty then we have a problem with the memcpy
memcpy(&inliers0, &localInliers0, sizeof(int) * localInliers.size());


History

Updated by Vadim Pisarevsky almost 10 years ago

  • Category set to calibration, 3d

Updated by Vadim Pisarevsky almost 10 years ago

looks like the bug has been fixed in 3.0-pre; someone should backport the changes to 2.4

Updated by Maksim Shabunin over 9 years ago

Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4959

Also available in: Atom PDF