diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-07-06 02:25:50 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-07-06 02:25:50 +0200 |
commit | 3d6b9c0d3497eee46a57e0145e5552a68626fb0e (patch) | |
tree | 54225ed22414106252a6f9a4d010070feac94c90 /cv/translation-calibrator.cpp | |
parent | 6ee550ecbad85c6bce796d04b3238a4c0a491205 (diff) |
cv/calibrator: return distinct sample count for all DOF
Diffstat (limited to 'cv/translation-calibrator.cpp')
-rw-r--r-- | cv/translation-calibrator.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cv/translation-calibrator.cpp b/cv/translation-calibrator.cpp index cdd573bc..fb150bf9 100644 --- a/cv/translation-calibrator.cpp +++ b/cv/translation-calibrator.cpp @@ -54,12 +54,10 @@ void TranslationCalibrator::update(const cv::Matx33d& R_CM_k, const cv::Vec3d& t y += H_k_T * t_CM_k; } -std::tuple<cv::Vec3f, unsigned> TranslationCalibrator::get_estimate() +std::tuple<cv::Vec3f, cv::Vec3i> TranslationCalibrator::get_estimate() { cv::Vec6f x = P.inv() * y; - qDebug() << "calibrator:" << nsamples << "samples total"; - unsigned values[3] {}; vec* in[] { &used_yaw_poses, &used_pitch_poses, &used_roll_poses }; @@ -71,12 +69,13 @@ std::tuple<cv::Vec3f, unsigned> TranslationCalibrator::get_estimate() values[k]++; } - qDebug() << "samples" + qDebug() << "samples total" << nsamples << "yaw" << values[0] << "pitch" << values[1] << "roll" << values[2]; - return std::make_tuple(cv::Vec3f(-x[0], -x[1], -x[2]), nsamples); + return std::make_tuple(cv::Vec3f(-x[0], -x[1], -x[2]), + cv::Vec3i(values[0], values[1], values[2])); } bool TranslationCalibrator::check_bucket(const cv::Matx33d& R_CM_k) |