From cbc3a7a308d1edde429022a9492eeedce24c5fd9 Mon Sep 17 00:00:00 2001 From: Martin Miller Date: Sat, 8 Apr 2017 19:15:25 -0500 Subject: Add code to perform a guided measurement. The Vision class can template match in a search region. The search region result is masked by an ellipse related to the S matrix of the feature. --- src/vision.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/vision.h') diff --git a/src/vision.h b/src/vision.h index 6f324c1..a8ed318 100644 --- a/src/vision.h +++ b/src/vision.h @@ -8,8 +8,10 @@ #include "camera.h" #include "types.h" - +#define PATCHSIZE 51 /* must be odd */ using cv::Mat; +using cv::RotatedRect; +using cv::Rect; using Eigen::Vector2d; using Eigen::Vector3d; using Eigen::Matrix; @@ -39,6 +41,11 @@ class Vision /* ==================== OPERATORS ======================================= */ void open(const char *fn, const Camera &cam); void acquireFeatures(const Camera &cam, vector &z); + void getTemplate( Mat &p, const Vector3d &pt); + void measure( const Camera &cam, const measurement_t &zin, measurement_t &zout); + void measurements( const Camera &cam, const vector &zin, + vector &zout); + void searchRegion( const Camera &cam, const measurement_t &z, cv::RotatedRect &rr); protected: /* ==================== METHODS ======================================= */ @@ -49,7 +56,7 @@ class Vision /* ==================== METHODS ======================================= */ /* ==================== DATA MEMBERS ======================================= */ - Mat original, display; + Mat original, gray, display; static int _id; }; /* ----- end of class Vision ----- */ -- cgit v1.1