summaryrefslogtreecommitdiffhomepage
path: root/cv
diff options
context:
space:
mode:
Diffstat (limited to 'cv')
-rw-r--r--cv/translation-calibrator.cpp9
-rw-r--r--cv/translation-calibrator.hpp2
2 files changed, 5 insertions, 6 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)
diff --git a/cv/translation-calibrator.hpp b/cv/translation-calibrator.hpp
index ae2ed844..d908496a 100644
--- a/cv/translation-calibrator.hpp
+++ b/cv/translation-calibrator.hpp
@@ -29,7 +29,7 @@ public:
void update(const cv::Matx33d& R_CM_k, const cv::Vec3d& t_CM_k);
// get the current estimate for t_MH
- std::tuple<cv::Vec3f, unsigned> get_estimate();
+ std::tuple<cv::Vec3f, cv::Vec3i> get_estimate();
private:
bool check_bucket(const cv::Matx33d& R_CM_k);