in solvePnPRansac call the solvePnP in the end with all the inliers to get more precise estimate

This commit is contained in:
Vadim Pisarevsky
2015-03-16 16:56:26 +03:00
parent 5c352c9146
commit ca19ae8b5a
6 changed files with 97 additions and 61 deletions

View File

@@ -102,6 +102,19 @@ CV_EXPORTS Ptr<PointSetRegistrator> createRANSACPointSetRegistrator(const Ptr<Po
CV_EXPORTS Ptr<PointSetRegistrator> createLMeDSPointSetRegistrator(const Ptr<PointSetRegistrator::Callback>& cb,
int modelPoints, double confidence=0.99, int maxIters=1000 );
template<typename T> inline int compressElems( T* ptr, const uchar* mask, int mstep, int count )
{
int i, j;
for( i = j = 0; i < count; i++ )
if( mask[i*mstep] )
{
if( i > j )
ptr[j] = ptr[i];
j++;
}
return j;
}
}
#endif