diff options
author | Martin Miller | 2017-04-08 19:15:25 -0500 |
---|---|---|
committer | Martin Miller | 2017-04-08 19:15:25 -0500 |
commit | cbc3a7a308d1edde429022a9492eeedce24c5fd9 (patch) | |
tree | 3afb83f95dcc944696be16d93bec9cd425937148 /src/vision.h | |
parent | 728cc9930cbea478ca732b6c19bab275ef50c6d0 (diff) | |
download | refslam-cbc3a7a308d1edde429022a9492eeedce24c5fd9.zip refslam-cbc3a7a308d1edde429022a9492eeedce24c5fd9.tar.gz |
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.
Diffstat (limited to 'src/vision.h')
-rw-r--r-- | src/vision.h | 11 |
1 files changed, 9 insertions, 2 deletions
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<measurement_t> &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<measurement_t> &zin, + vector<measurement_t> &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 ----- */ |