summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Miller2017-08-15 15:48:51 -0500
committerMartin Miller2017-08-15 15:48:51 -0500
commit29ae7e02e2c30921ae296cfd39407670710c3f2e (patch)
tree184b119421ff0aa651c57efde219fe05606effd5
parent57ff46946058706f5a08da9c2ab761d26908383a (diff)
downloadrefslam-29ae7e02e2c30921ae296cfd39407670710c3f2e.zip
refslam-29ae7e02e2c30921ae296cfd39407670710c3f2e.tar.gz
add monocular option to cli
-rw-r--r--src/main.cpp7
-rw-r--r--src/state.cpp2
-rw-r--r--src/types.h1
3 files changed, 7 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index edfc107..ce99968 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -52,6 +52,7 @@ double xcorrsrc = 0.9;
double xcorrref = 0.4;
bool donew=true;
+bool domono=false;
using std::cout;
using std::endl;
@@ -508,8 +509,10 @@ main(int argc, char **argv)
if (argc==4) {
if (!strcmp(argv[3],"false")) {
donew=false;
- cout << "setting old process noise" << endl;
- exit(EXIT_FAILURE);
+ cerr << "setting old process noise" << endl;
+ } else if (!strcmp(argv[3],"mono")) {
+ domono=true;
+ cerr << "setting all measurements to monocular" << endl;
}
}
// Read sensors from file
diff --git a/src/state.cpp b/src/state.cpp
index 80cfc59..b7ac67a 100644
--- a/src/state.cpp
+++ b/src/state.cpp
@@ -1104,7 +1104,7 @@ State::featuresAsMeasurements ( vector<measurement_t> &yk, const Camera &cam,
z.id = (*i)->id();
z.source = (*i)->p2x(pbs);
z.reflection = (*i)->p2x(pbr);
- z.z_type = BOTH;
+ z.z_type = (domono) ? MONO : BOTH;
z.patch = (*i)->warpedPatch(cam, q);
z.refpatch = (*i)->reflectedPatch(cam, q);
diff --git a/src/types.h b/src/types.h
index 86d9398..93e8822 100644
--- a/src/types.h
+++ b/src/types.h
@@ -44,6 +44,7 @@ extern double xcorrsrc;
extern double xcorrref;
extern bool donew;
+extern bool domono;
typedef Eigen::Matrix<double,2,1,Eigen::DontAlign> UVector2d;
// A struct for storing measurements.