summaryrefslogtreecommitdiff
path: root/src/camera.h
diff options
context:
space:
mode:
authorMartin Miller2017-03-24 13:32:25 -0500
committerMartin Miller2017-03-24 13:32:25 -0500
commitbd2b2ae18c2c9416fd57a02b187d42b805969af0 (patch)
tree6d73c31142ddda14413b5f437e3cecd8d57893ce /src/camera.h
parent9458b30126e346c9e0d373c9df5690655bf7f8ab (diff)
downloadrefslam-bd2b2ae18c2c9416fd57a02b187d42b805969af0.zip
refslam-bd2b2ae18c2c9416fd57a02b187d42b805969af0.tar.gz
Move feature depth calculation to Feature class.
And also fixed F computation for features. I realized that the features were transformed from image to body frame prior to being passed to State. This makes sense because the State really doesn't need to know about Camera objects. Since the camera was no longer necessary inside of State it made sense to move the depth computation from Camera::ref2body() into a method in the Feature class that does not rely on camera parameters. Additionally, the depth solver was changed from a simple matrix inversion to a least squares calculation. Fx in the feature class was fixed to take into account dt. Updating Pkk1 is in the process of being modified to handle features.
Diffstat (limited to 'src/camera.h')
-rw-r--r--src/camera.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/camera.h b/src/camera.h
index be0bd54..bee8246 100644
--- a/src/camera.h
+++ b/src/camera.h
@@ -1,6 +1,7 @@
#ifndef camera_INC
#define camera_INC
#include <Eigen/Dense>
+#include <iostream>
#include <yaml-cpp/yaml.h>
#define BINNING 0.5 // set the binning factor
@@ -8,6 +9,9 @@ using Eigen::Matrix;
using Eigen::Vector4d;
using Eigen::Vector3d;
using Eigen::Quaterniond;
+using std::cout;
+using std::cerr;
+using std::endl;
/*
* =====================================================================================
@@ -32,8 +36,6 @@ class Camera
/* ==================== OPERATORS ======================================= */
Vector3d img2body(Vector3d &xi);
- Vector3d ref2body(double z, const Quaterniond &qbw, const Vector3d &xs,
- const Vector3d &xr);
protected:
/* ==================== METHODS ======================================= */