Merge pull request #3587 from vpradeep07:fix/pnpransac_race_cond

pull/3655/head
Vadim Pisarevsky 10 years ago
commit 7e1068919b
  1. 6
      modules/calib3d/src/solvepnp.cpp

@ -196,18 +196,16 @@ namespace cv
}
}
resultsMutex.lock();
if (localInliers.size() > inliers.size())
{
resultsMutex.lock();
inliers.clear();
inliers.resize(localInliers.size());
memcpy(&inliers[0], &localInliers[0], sizeof(int) * localInliers.size());
localRvec.copyTo(rvec);
localTvec.copyTo(tvec);
resultsMutex.unlock();
}
resultsMutex.unlock();
}
static void pnpTask(const vector<char>& pointsMask, const Mat& objectPoints, const Mat& imagePoints,

Loading…
Cancel
Save