g2o
Toggle main menu visibility
Loading...
Searching...
No Matches
g2o
types
slam3d
parameter_camera.h
Go to the documentation of this file.
1
// g2o - General Graph Optimization
2
// Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard
3
// All rights reserved.
4
//
5
// Redistribution and use in source and binary forms, with or without
6
// modification, are permitted provided that the following conditions are
7
// met:
8
//
9
// * Redistributions of source code must retain the above copyright notice,
10
// this list of conditions and the following disclaimer.
11
// * Redistributions in binary form must reproduce the above copyright
12
// notice, this list of conditions and the following disclaimer in the
13
// documentation and/or other materials provided with the distribution.
14
//
15
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
16
// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17
// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
18
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19
// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
21
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
27
#ifndef G2O_CAMERA_PARAMETERS_H_
28
#define G2O_CAMERA_PARAMETERS_H_
29
30
#include "
g2o/core/hyper_graph_action.h
"
31
#include "
g2o_types_slam3d_api.h
"
32
#include "
parameter_se3_offset.h
"
33
34
namespace
g2o
{
38
class
G2O_TYPES_SLAM3D_API
ParameterCamera
:
public
ParameterSE3Offset
{
39
public
:
40
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
;
41
ParameterCamera
();
42
void
setKcam
(
double
fx,
double
fy,
double
cx,
double
cy);
43
void
setOffset
(
const
Isometry3
& offset_ = Isometry3::Identity());
44
45
virtual
bool
read
(std::istream& is);
46
virtual
bool
write
(std::ostream& os)
const
;
47
48
const
Matrix3
&
Kcam
()
const
{
return
_Kcam
; }
49
const
Matrix3
&
invKcam
()
const
{
return
_invKcam
; }
50
const
Matrix3
&
Kcam_inverseOffsetR
()
const
{
return
_Kcam_inverseOffsetR
; }
51
52
protected
:
53
Matrix3
_Kcam
;
54
Matrix3
_invKcam
;
55
Matrix3
_Kcam_inverseOffsetR
;
56
};
57
58
class
G2O_TYPES_SLAM3D_API
CacheCamera
:
public
CacheSE3Offset
{
59
public
:
60
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
;
62
const
ParameterCamera
*
camParams
()
const
{
return
params
; }
64
const
Affine3
&
w2i
()
const
{
return
_w2i
; }
65
66
protected
:
67
virtual
void
updateImpl();
68
virtual
bool
resolveDependencies();
69
Affine3
_w2i
;
70
ParameterCamera
*
params
;
71
};
72
73
#ifdef G2O_HAVE_OPENGL
74
class
G2O_TYPES_SLAM3D_API
CacheCameraDrawAction :
public
DrawAction
{
75
public
:
76
CacheCameraDrawAction();
77
virtual
HyperGraphElementAction
* operator()(
78
HyperGraph::HyperGraphElement
* element,
79
HyperGraphElementAction::Parameters
* params_);
80
81
protected
:
82
virtual
bool
refreshPropertyPtrs(
83
HyperGraphElementAction::Parameters
* params_);
84
FloatProperty
*_cameraZ, *_cameraSide;
85
};
86
#endif
87
88
}
// namespace g2o
89
90
#endif
g2o::CacheCamera
Definition
parameter_camera.h:58
g2o::CacheCamera::_w2i
Affine3 _w2i
world to image transform
Definition
parameter_camera.h:69
g2o::CacheCamera::EIGEN_MAKE_ALIGNED_OPERATOR_NEW
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Definition
parameter_camera.h:60
g2o::CacheCamera::camParams
const ParameterCamera * camParams() const
parameters of the camera
Definition
parameter_camera.h:62
g2o::CacheCamera::w2i
const Affine3 & w2i() const
return the world to image transform
Definition
parameter_camera.h:64
g2o::CacheCamera::params
ParameterCamera * params
Definition
parameter_camera.h:70
g2o::CacheSE3Offset::CacheSE3Offset
CacheSE3Offset()
Definition
parameter_se3_offset.cpp:60
g2o::DrawAction
draw actions
Definition
hyper_graph_action.h:201
g2o::HyperGraphElementAction
Abstract action that operates on a graph entity.
Definition
hyper_graph_action.h:74
g2o::ParameterCamera
parameters for a camera
Definition
parameter_camera.h:38
g2o::ParameterCamera::_invKcam
Matrix3 _invKcam
Definition
parameter_camera.h:54
g2o::ParameterCamera::EIGEN_MAKE_ALIGNED_OPERATOR_NEW
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Definition
parameter_camera.h:40
g2o::ParameterCamera::Kcam
const Matrix3 & Kcam() const
Definition
parameter_camera.h:48
g2o::ParameterCamera::_Kcam_inverseOffsetR
Matrix3 _Kcam_inverseOffsetR
Definition
parameter_camera.h:55
g2o::ParameterCamera::_Kcam
Matrix3 _Kcam
Definition
parameter_camera.h:53
g2o::ParameterCamera::invKcam
const Matrix3 & invKcam() const
Definition
parameter_camera.h:49
g2o::ParameterCamera::setKcam
void setKcam(double fx, double fy, double cx, double cy)
Definition
parameter_camera.cpp:52
g2o::ParameterCamera::Kcam_inverseOffsetR
const Matrix3 & Kcam_inverseOffsetR() const
Definition
parameter_camera.h:50
g2o::ParameterCamera::read
virtual bool read(std::istream &is)
read the data from a stream
Definition
parameter_camera.cpp:63
g2o::ParameterCamera::setOffset
void setOffset(const Isometry3 &offset_=Isometry3::Identity())
Definition
parameter_camera.cpp:47
g2o::ParameterCamera::ParameterCamera
ParameterCamera()
Definition
parameter_camera.cpp:41
g2o::ParameterCamera::write
virtual bool write(std::ostream &os) const
write the data to a stream
Definition
parameter_camera.cpp:76
g2o::ParameterSE3Offset::ParameterSE3Offset
ParameterSE3Offset()
Definition
parameter_se3_offset.cpp:39
g2o_types_slam3d_api.h
G2O_TYPES_SLAM3D_API
#define G2O_TYPES_SLAM3D_API
Definition
g2o_types_slam3d_api.h:55
hyper_graph_action.h
g2o
Definition
dl_wrapper.cpp:55
g2o::Matrix3
MatrixN< 3 > Matrix3
Definition
eigen_types.h:72
g2o::Affine3
Eigen::Transform< double, 3, Eigen::Affine, Eigen::ColMajor > Affine3
Definition
eigen_types.h:79
g2o::Isometry3
Eigen::Transform< double, 3, Eigen::Isometry, Eigen::ColMajor > Isometry3
Definition
eigen_types.h:77
g2o::FloatProperty
Property< float > FloatProperty
Definition
property.h:150
parameter_se3_offset.h
g2o::HyperGraphElementAction::Parameters
Definition
hyper_graph_action.h:76
g2o::HyperGraph::HyperGraphElement
Definition
hyper_graph.h:80
Generated on
for g2o by
1.17.0