diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-01-11 15:36:14 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-01-11 15:36:14 +0100 |
commit | 7105bfbc86840282569e860d7250799dcc140e32 (patch) | |
tree | 992295bd5549c3d707b589c94e4abd112a479c45 /FTNoIR_Tracker_PT/point_tracker.h | |
parent | 24287f1c4c8308678b1f7320b303548027dd8954 (diff) |
remove hack of passing fov/w/h as member vars
Diffstat (limited to 'FTNoIR_Tracker_PT/point_tracker.h')
-rw-r--r-- | FTNoIR_Tracker_PT/point_tracker.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/FTNoIR_Tracker_PT/point_tracker.h b/FTNoIR_Tracker_PT/point_tracker.h index ac43489e..741d5af4 100644 --- a/FTNoIR_Tracker_PT/point_tracker.h +++ b/FTNoIR_Tracker_PT/point_tracker.h @@ -98,16 +98,12 @@ public: FrameTrafo get_pose() const { return X_CM; }
void reset();
- float fov;
- int _w, _h;
-
protected:
- cv::Vec2f project(const cv::Vec3f& v_M)
+ cv::Vec2f project(const cv::Vec3f& v_M, float fov, int w, int h)
{
if (!rvec.empty() && !tvec.empty() && fov > 0)
{
const float HT_PI = 3.1415926535;
- const int w = _w, h = _h;
const float focal_length_w = 0.5 * w / tan(fov * HT_PI / 180);
const float focal_length_h = 0.5 * h / tan(fov * h / w * HT_PI / 180.0);
@@ -126,7 +122,7 @@ protected: return cv::Vec2f();
}
- bool find_correspondences(const std::vector<cv::Vec2f>& points);
+ bool find_correspondences(const std::vector<cv::Vec2f>& points, float fov, int w, int h);
cv::Vec2f p[PointModel::N_POINTS]; // the points in model order
cv::Vec2f p_exp[PointModel::N_POINTS]; // the expected point positions
|