35 using namespace Eigen;
73 res[0] = proj[0]*focal_length + principle_point[0];
74 res[1] = proj[1]*focal_length + principle_point[1];
79 Vector2D uv_left = cam_map(trans_xyz);
80 double proj_x_right = (trans_xyz[0]-baseline)/trans_xyz[2];
81 double u_right = proj_x_right*focal_length + principle_point[0];
82 return Vector3D(uv_left[0],uv_left[1],u_right);
91 for (
int i=0; i<7; i++)
101 for (
int i=0; i<7; i++)
102 os << cam2world[i] <<
" ";
112 for (
int i=0; i<7; i++)
118 for (
int i=0; i<6; i++)
119 for (
int j=i; j<6; j++) {
129 for (
int i=0; i<7; i++)
130 os << cam2world[i] <<
" ";
131 for (
int i=0; i<6; i++)
132 for (
int j=i; j<6; j++){
146 for (
int i=0; i<2; i++){
150 for (
int i=0; i<2; i++)
151 for (
int j=i; j<2; j++){
162 for (
int i=0; i<2; i++){
165 for (
int i=0; i<2; i++)
166 for (
int j=i; j<2; j++) {
187 double z_sq = xyz[2]*xyz[2];
188 Matrix<double,2,3,Eigen::ColMajor> J;
189 J << f/xyz[2], 0, -(f*xyz[0])/z_sq,
190 0, f/xyz[2], -(f*xyz[1])/z_sq;
195 Matrix<double,3,6,Eigen::ColMajor> J;
196 J.topLeftCorner<3,3>() = -
skew(y);
197 J.bottomRightCorner<3,3>().setIdentity();
228 Matrix<double,2,3,Eigen::ColMajor> Jcam
249 for (
int i=0; i<2; i++){
252 for (
int i=0; i<2; i++)
253 for (
int j=i; j<2; j++) {
263 for (
int i=0; i<2; i++){
267 for (
int i=0; i<2; i++)
268 for (
int j=i; j<2; j++){
298 double x = xyz_trans[0];
299 double y = xyz_trans[1];
300 double z = xyz_trans[2];
305 Matrix<double,2,3,Eigen::ColMajor> tmp;
332 for (
int i=0; i<3; i++){
335 for (
int i=0; i<3; i++)
336 for (
int j=i; j<3; j++) {
345 for (
int i=0; i<3; i++){
349 for (
int i=0; i<3; i++)
350 for (
int j=i; j<3; j++){
Eigen::Matrix< double, 2, 1, Eigen::ColMajor > Vector2D
bool installParameter(ParameterType *&p, size_t argNo, int paramId=-1)
G2O_REGISTER_TYPE(VERTEX_TAG, VertexTag)
Vector2D cam_map(const Vector3D &trans_xyz) const
Eigen::Matrix< double, 3, 1, Eigen::ColMajor > Vector3D
virtual void linearizeOplus()
bool write(std::ostream &os) const
write the vertex to a stream
bool read(std::istream &is)
read the vertex from a stream, i.e., the internal state of the vertex
virtual void setMeasurement(const Measurement &m)
Eigen::Matrix< double, 7, 1 > Vector7d
Eigen::Matrix< double, 6, 6, Eigen::ColMajor > adj() const
virtual void linearizeOplus()
EIGEN_MAKE_ALIGNED_OPERATOR_NEW VertexSE3Expmap()
JacobianXiOplusType _jacobianOplusXi
SE3 Vertex parameterized internally with a transformation matrix and externally with its exponential ...
bool write(std::ostream &os) const
write the vertex to a stream
bool setParameterId(int argNum, int paramId)
Vector3D invert_depth(const Vector3D &x)
virtual bool write(std::ostream &os) const
write the vertex to a stream
bool read(std::istream &is)
read the vertex from a stream, i.e., the internal state of the vertex
bool read(std::istream &is)
read the vertex from a stream, i.e., the internal state of the vertex
Matrix3D d_Tinvpsi_d_psi(const SE3Quat &T, const Vector3D &psi)
Vector3D stereocam_uvu_map(const Vector3D &trans_xyz) const
void fromVector(const Vector7d &v)
const Eigen::Quaterniond & rotation() const
Eigen::Matrix< double, 3, 3, Eigen::ColMajor > Matrix3D
void setEstimate(const EstimateType &et)
set the estimate for the vertex also calls updateCache()
const Parameter * parameter(int argNo) const
Vector3D unproject2d(const Vector2D &v)
Matrix< double, 3, 6, Eigen::ColMajor > d_expy_d_y(const Vector3D &y)
void resizeParameters(size_t newSize)
EIGEN_STRONG_INLINE const InformationType & information() const
information matrix of the constraint
G2O_REGISTER_TYPE_GROUP(data)
const EstimateType & estimate() const
return the current estimate of the vertex
bool write(std::ostream &os) const
write the vertex to a stream
JacobianXjOplusType _jacobianOplusXj
Matrix< double, 2, 3, Eigen::ColMajor > d_proj_d_y(const double &f, const Vector3D &xyz)
virtual bool read(std::istream &is)
read the vertex from a stream, i.e., the internal state of the vertex
virtual void linearizeOplus()
G2O_TYPES_SLAM3D_API Matrix3D skew(const Vector3D &v)
EIGEN_STRONG_INLINE const Measurement & measurement() const
accessor functions for the measurement represented by the edge
bool read(std::istream &is)
read the vertex from a stream, i.e., the internal state of the vertex
bool write(std::ostream &os) const
write the vertex to a stream
Vector2D project2d(const Vector3D &v)
VertexContainer _vertices