summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-07-20 14:29:02 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-07-20 14:29:02 +0200
commit56dd856405ebf26f8243880035fed2dd688b14a6 (patch)
tree9098f67afb93e7d95f7043a2c909d2f39a1e9c10 /ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
parent0c1b4510b3f7a744cc4cad94e0d4dde45925269d (diff)
for now remove calibration support
PT tracker returns garbage when calibrating, Z is zero. Maybe can be reverted and fixed later.
Diffstat (limited to 'ftnoir_tracker_pt/ftnoir_tracker_pt.cpp')
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt.cpp28
1 files changed, 1 insertions, 27 deletions
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
index 48a62c2c..d166ad01 100644
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
+++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
@@ -12,7 +12,6 @@
#include <QFile>
#include <QCoreApplication>
#include "opentrack/camera-names.hpp"
-#include "opentrack/opencv-calibration.hpp"
using namespace std;
using namespace cv;
@@ -55,8 +54,6 @@ void Tracker_PT::reset_command(Command command)
float Tracker_PT::get_focal_length()
{
QMutexLocker l(&camera_mtx);
- if (!intrinsics.empty())
- return intrinsics.at<float>(0, 0);
CamInfo info = camera.get_info();
const int w = info.res_x, h = info.res_y;
static constexpr double pi = 3.1415926f;
@@ -99,16 +96,7 @@ void Tracker_PT::run()
if (success)
{
- if (!intrinsics.empty())
- {
- std::vector<cv::Vec2f> points_;
- cv::undistortPoints(points, points_, intrinsics, dist_coeffs);
- point_tracker.track(points_, PointModel(s), get_focal_length(), s.dynamic_pose, s.init_phase_timeout);
- }
- else
- {
- point_tracker.track(points, PointModel(s), get_focal_length(), s.dynamic_pose, s.init_phase_timeout);
- }
+ point_tracker.track(points, PointModel(s), get_focal_length(), s.dynamic_pose, s.init_phase_timeout);
}
{
@@ -159,20 +147,6 @@ void Tracker_PT::apply_settings()
camera.set_res(s.cam_res_x, s.cam_res_y);
camera.set_fps(s.cam_fps);
camera.start();
- cv::Mat intrinsics_ = cv::Mat::eye(3, 3, CV_32FC1);
- cv::Mat dist_coeffs_ = cv::Mat::zeros(5, 1, CV_32FC1);
- intrinsics = cv::Mat();
- dist_coeffs = cv::Mat();
- auto info = camera.get_info();
- if (info.res_x == 0 || info.res_y == 0)
- return;
- if (get_camera_calibration(s.camera_name, intrinsics_, dist_coeffs_, info.res_x, info.res_y, s.fov))
- {
- intrinsics = intrinsics_.clone();
- dist_coeffs = dist_coeffs_.clone();
- qDebug() << s.camera_name << "calibrated";
- }
-
qDebug()<<"Tracker::apply ends";
}