DLS perf update
authoredgarriba <edgar.riba@gmail.com>
Mon, 11 Aug 2014 15:09:26 +0000 (17:09 +0200)
committeredgarriba <edgar.riba@gmail.com>
Mon, 11 Aug 2014 15:09:26 +0000 (17:09 +0200)
modules/calib3d/perf/perf_pnp.cpp

index f12c263..200faa0 100644 (file)
@@ -10,7 +10,7 @@ using namespace perf;
 using std::tr1::make_tuple;
 using std::tr1::get;
 
-CV_ENUM(pnpAlgo, SOLVEPNP_ITERATIVE, SOLVEPNP_EPNP /*, P3P*/)
+CV_ENUM(pnpAlgo, SOLVEPNP_ITERATIVE, SOLVEPNP_EPNP, SOLVEPNP_DLS /*, P3P*/)
 
 typedef std::tr1::tuple<int, pnpAlgo> PointsNum_Algo_t;
 typedef perf::TestBaseWithParam<PointsNum_Algo_t> PointsNum_Algo;
@@ -20,7 +20,7 @@ typedef perf::TestBaseWithParam<int> PointsNum;
 PERF_TEST_P(PointsNum_Algo, solvePnP,
             testing::Combine(
                 testing::Values(/*4,*/ 3*9, 7*13), //TODO: find why results on 4 points are too unstable
-                testing::Values((int)SOLVEPNP_ITERATIVE, (int)SOLVEPNP_EPNP)
+                testing::Values((int)SOLVEPNP_ITERATIVE, (int)SOLVEPNP_EPNP, (int)SOLVEPNP_DLS)
                 )
             )
 {
@@ -117,8 +117,10 @@ PERF_TEST_P(PointsNum, DISABLED_SolvePnPRansac, testing::Values(4, 3*9, 7*13))
     Mat dist_coef(1, 8, CV_32F, cv::Scalar::all(0));
 
     vector<cv::Point2f> image_vec;
+
     Mat rvec_gold(1, 3, CV_32FC1);
     randu(rvec_gold, 0, 1);
+
     Mat tvec_gold(1, 3, CV_32FC1);
     randu(tvec_gold, 0, 1);
     projectPoints(object, rvec_gold, tvec_gold, camera_mat, dist_coef, image_vec);