From 6d27d488bf98bbf9698787f5aea33e9f9747026e Mon Sep 17 00:00:00 2001 From: Olexa Bilaniuk Date: Wed, 18 Mar 2015 02:21:16 -0400 Subject: [PATCH] Bugfix in n* optimization. Similar to the problem in LevMarq, arg.inl was being used instead of best.inl. This opened us up to a potential segfault. --- modules/calib3d/src/rho.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/calib3d/src/rho.cpp b/modules/calib3d/src/rho.cpp index 8ac22df33c..81d641c3fc 100644 --- a/modules/calib3d/src/rho.cpp +++ b/modules/calib3d/src/rho.cpp @@ -1664,7 +1664,7 @@ inline void RHO_HEST_REFC::nStarOptimize(void){ best_n = test_n; bestNumInl = testNumInl; } - testNumInl -= !!arg.inl[test_n-1];/* FIXME: Probable bug! */ + testNumInl -= !!best.inl[test_n-1]; } if(bestNumInl*ctrl.phMax > ctrl.phNumInl*best_n){