summaryrefslogtreecommitdiffhomepage
path: root/FTNoIR_Tracker_PT/point_tracker.h
diff options
context:
space:
mode:
Diffstat (limited to 'FTNoIR_Tracker_PT/point_tracker.h')
-rw-r--r--FTNoIR_Tracker_PT/point_tracker.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/FTNoIR_Tracker_PT/point_tracker.h b/FTNoIR_Tracker_PT/point_tracker.h
index 823d75c0..e05e8f98 100644
--- a/FTNoIR_Tracker_PT/point_tracker.h
+++ b/FTNoIR_Tracker_PT/point_tracker.h
@@ -21,11 +21,11 @@
class FrameTrafo
{
public:
- FrameTrafo() : R(cv::Matx33d::eye()), t(0,0,0) {}
- FrameTrafo(const cv::Matx33d& R, const cv::Vec3d& t) : R(R),t(t) {}
+ FrameTrafo() : R(cv::Matx33f::eye()), t(0,0,0) {}
+ FrameTrafo(const cv::Matx33f& R, const cv::Vec3f& t) : R(R),t(t) {}
- cv::Matx33d R;
- cv::Vec3d t;
+ cv::Matx33f R;
+ cv::Vec3f t;
};
inline FrameTrafo operator*(const FrameTrafo& X, const FrameTrafo& Y)
@@ -33,17 +33,17 @@ inline FrameTrafo operator*(const FrameTrafo& X, const FrameTrafo& Y)
return FrameTrafo(X.R*Y.R, X.R*Y.t + X.t);
}
-inline FrameTrafo operator*(const cv::Matx33d& X, const FrameTrafo& Y)
+inline FrameTrafo operator*(const cv::Matx33f& X, const FrameTrafo& Y)
{
return FrameTrafo(X*Y.R, X*Y.t);
}
-inline FrameTrafo operator*(const FrameTrafo& X, const cv::Matx33d& Y)
+inline FrameTrafo operator*(const FrameTrafo& X, const cv::Matx33f& Y)
{
return FrameTrafo(X.R*Y, X.t);
}
-inline cv::Vec3f operator*(const FrameTrafo& X, const cv::Vec3d& v)
+inline cv::Vec3f operator*(const FrameTrafo& X, const cv::Vec3f& v)
{
return X.R*v + X.t;
}
@@ -90,7 +90,7 @@ public:
// track the pose using the set of normalized point coordinates (x pos in range -0.5:0.5)
// f : (focal length)/(sensor width)
// dt : time since last call
- bool track(const std::vector<cv::Vec2f>& points, float fov, float dt, int w, int h);
+ bool track(const std::vector<cv::Vec2f>& points, float fov, float dt, int w, int h, const cv::Vec3f &headpos);
boost::shared_ptr<PointModel> point_model;
bool dynamic_pose_resolution;
@@ -136,7 +136,7 @@ protected:
void reset_velocities();
- void POSIT(float fov, int w, int h); // The POSIT algorithm, returns the number of iterations
+ void POSIT(float fov, int w, int h, const cv::Vec3f &headpos); // The POSIT algorithm, returns the number of iterations
bool init_phase;
float dt_valid; // time since last valid tracking result