Merge pull request #3587 from vpradeep07:fix/pnpransac_race_cond
This commit is contained in:
commit
7e1068919b
@ -196,18 +196,16 @@ namespace cv
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resultsMutex.lock();
|
||||||
if (localInliers.size() > inliers.size())
|
if (localInliers.size() > inliers.size())
|
||||||
{
|
{
|
||||||
resultsMutex.lock();
|
|
||||||
|
|
||||||
inliers.clear();
|
inliers.clear();
|
||||||
inliers.resize(localInliers.size());
|
inliers.resize(localInliers.size());
|
||||||
memcpy(&inliers[0], &localInliers[0], sizeof(int) * localInliers.size());
|
memcpy(&inliers[0], &localInliers[0], sizeof(int) * localInliers.size());
|
||||||
localRvec.copyTo(rvec);
|
localRvec.copyTo(rvec);
|
||||||
localTvec.copyTo(tvec);
|
localTvec.copyTo(tvec);
|
||||||
|
|
||||||
resultsMutex.unlock();
|
|
||||||
}
|
}
|
||||||
|
resultsMutex.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pnpTask(const vector<char>& pointsMask, const Mat& objectPoints, const Mat& imagePoints,
|
static void pnpTask(const vector<char>& pointsMask, const Mat& objectPoints, const Mat& imagePoints,
|
||||||
|
Loading…
Reference in New Issue
Block a user