summaryrefslogtreecommitdiff
path: root/src/feature.h
diff options
context:
space:
mode:
authorMartin Miller2017-04-08 19:15:25 -0500
committerMartin Miller2017-04-08 19:15:25 -0500
commitcbc3a7a308d1edde429022a9492eeedce24c5fd9 (patch)
tree3afb83f95dcc944696be16d93bec9cd425937148 /src/feature.h
parent728cc9930cbea478ca732b6c19bab275ef50c6d0 (diff)
downloadrefslam-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/feature.h')
-rw-r--r--src/feature.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/feature.h b/src/feature.h
index d5e84b4..1c0718d 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -1,5 +1,6 @@
#ifndef feature_INC
#define feature_INC
+#include <cv.h>
#include <Eigen/Dense>
#include <iostream>
#include "types.h"
@@ -13,11 +14,11 @@
#define FEATURECOVRHO 25e-4 /* */
#define FEATURECOVRHO_MONO 0.5 /* */
#define RHO_0 1./10. /* */
-#define INLIER_THRESHOLD 5.9915 /* */
#define RANSAC_LI_THRESHOLD 4e-5 /* */
#define RANSAC_HI_THRESHOLD 5e-2 /* */
#define INITDEPTH
+using cv::Mat;
using Eigen::Dynamic;
using Eigen::Matrix;
using Eigen::MatrixXd;
@@ -40,15 +41,16 @@ class Feature
public:
/* ==================== LIFECYCLE ======================================= */
Feature ( int id, const Vector3d &xs, const Vector3d &xr,
- const Vector3d &xbw, const Quaterniond &q, double z);
+ const Vector3d &xbw, const Quaterniond &q, double z, Mat &p);
Feature ( int id, const Vector3d &xs, const Vector3d &xbw,
- const Quaterniond &q);
+ const Quaterniond &q, Mat &p);
/* ==================== ACCESSORS ======================================= */
int id();
Matrix<double,3,3> P0(measurement_type t);
Vector3d asVector();
UTM utm(Vector3d &xbw, Quaterniond &q);
+ Mat patch();
/* ==================== MUTATORS ======================================= */
void asVector(const Vector3d &m);
@@ -91,9 +93,10 @@ class Feature
/* ==================== DATA MEMBERS ======================================= */
int _id;
+ Mat _patch;
+ Quaterniond q0;
Vector3d X;
Vector3d X0;
- Quaterniond q0;
Vector3d xb0w;
}; /* ----- end of class Feature ----- */