solvepnp pnpTask (Bug #4260)
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