summaryrefslogtreecommitdiffhomepage
path: root/cv/translation-calibrator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cv/translation-calibrator.cpp')
-rw-r--r--cv/translation-calibrator.cpp9
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)