From 44f906eb356f1de71517a82904d897186dbf6e96 Mon Sep 17 00:00:00 2001 From: Hamid Bazargani Date: Fri, 13 Feb 2015 00:38:19 -0500 Subject: [PATCH] Fix sacCalcJacobianErrors arguments. (curr.inl replaced with best.inl) Fix the issue given NULL inlMask --- modules/calib3d/src/fundam.cpp | 2 +- modules/calib3d/src/rhorefc.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/calib3d/src/fundam.cpp b/modules/calib3d/src/fundam.cpp index af7c4dfb0a..584ba5af1b 100644 --- a/modules/calib3d/src/fundam.cpp +++ b/modules/calib3d/src/fundam.cpp @@ -398,7 +398,7 @@ cv::Mat cv::findHomography( InputArray _points1, InputArray _points2, { tempMask = Mat::ones(npoints, 1, CV_8U); result = cb->runKernel(src, dst, H) > 0; - } + } else if( method == RANSAC) result = createRANSACPointSetRegistrator(cb, 4, ransacReprojThreshold, confidence, maxIters)->run(src, dst, H, tempMask); else if( method == LMEDS ) diff --git a/modules/calib3d/src/rhorefc.cpp b/modules/calib3d/src/rhorefc.cpp index 2fffadac8a..8a7b57feaa 100644 --- a/modules/calib3d/src/rhorefc.cpp +++ b/modules/calib3d/src/rhorefc.cpp @@ -624,8 +624,8 @@ unsigned RHO_HEST_REFC::rhoRefC(const float* src, /* Source points */ if(isFinalRefineEnabled() && canRefine()){ refine(); } - outputModel(); - finiRun(); + outputModel(); + finiRun(); return isBestModelGoodEnough() ? best.numInl : 0; } @@ -1346,7 +1346,7 @@ inline void RHO_HEST_REFC::nStarOptimize(void){ */ inline void RHO_HEST_REFC::updateBounds(void){ - arg.maxI = sacCalcIterBound(arg.cfd, + arg.maxI = sacCalcIterBound(arg.cfd, (double)best.numInl/arg.N, SMPL_SIZE, arg.maxI);