MatrixTypes.hpp
Go to the documentation of this file.
1 
37 #ifndef LVR2_TYPES_MATRIXTYPES_HPP
38 #define LVR2_TYPES_MATRIXTYPES_HPP
39 
40 #include <Eigen/Dense>
41 
42 namespace lvr2
43 {
45 template<typename T>
46 using Matrix4RM = Eigen::Matrix<T, 4, 4, Eigen::RowMajor>;
47 
50 
53 
55 template<typename T>
56 using Matrix3RM = Eigen::Matrix<T, 3, 3, Eigen::RowMajor>;
57 
62 
64 template<typename T>
65 using Transform = Eigen::Matrix<T, 4, 4>;
66 
69 
72 
74 template<typename T>
75 using Rotation = Eigen::Matrix<T, 3, 3>;
76 
79 
82 
84 template<typename T>
85 using Extrinsics = Eigen::Matrix<T, 4, 4>;
86 
89 
92 
94 template<typename T>
95 using Intrinsics = Eigen::Matrix<T, 3, 3>;
96 
99 
102 
104 template<typename T>
105 using Distortion = Eigen::Matrix<T, 6, 1>;
106 
109 
112 
114 template<typename T>
115 using Vector3 = Eigen::Matrix<T, 3, 1>;
116 
119 
122 
125 
127 template<typename T>
128 using Vector4 = Eigen::Matrix<T, 4, 1>;
129 
132 
135 
137 template<typename T>
138 using Vector2 = Eigen::Matrix<T, 2, 1>;
139 
142 
145 
148 
151 
153 using Matrix6f = Eigen::Matrix<float, 6, 6>;
154 
156 using Vector6f = Eigen::Matrix<float, 6, 1>;
157 
159 using Matrix6d = Eigen::Matrix<double, 6, 6>;
160 
162 using Vector6d = Eigen::Matrix<double, 6, 1>;
163 
164 template<typename T>
166 {
167  Vector4<T> ret(p.coeff(0), p.coeff(1), p.coeff(2), 1.0);
168  ret = transform * ret;
169  return Vector3<T>(ret.coeff(0), ret.coeff(1), ret.coeff(2));
170 }
171 
172 } // namespace lvr2
173 
174 // additional operators
175 
176 
177 
178 
179 template<typename T>
181 {
182  return lvr2::multiply(transform, p);
183 }
184 
185 #endif // LVR2_TYPES_MATRIXTYPES_HPP
lvr2::Intrinsicsf
Intrinsics< float > Intrinsicsf
4x4 intrinsic calibration (single precision)
Definition: MatrixTypes.hpp:98
lvr2::Matrix6d
Eigen::Matrix< double, 6, 6 > Matrix6d
6D matrix double precision
Definition: MatrixTypes.hpp:159
lvr2::Matrix4RM
Eigen::Matrix< T, 4, 4, Eigen::RowMajor > Matrix4RM
General alias for row major 4x4 matrices.
Definition: MatrixTypes.hpp:46
transform
Definition: src/tools/lvr2_transform/Options.cpp:44
lvr2::multiply
Vector3< T > multiply(const Transform< T > &transform, const Vector3< T > &p)
Definition: MatrixTypes.hpp:165
lvr2::Vector2f
Eigen::Vector2f Vector2f
Eigen 2D vector, single precision.
Definition: MatrixTypes.hpp:141
lvr2::Intrinsicsd
Intrinsics< double > Intrinsicsd
4x4 extrinsic calibration (double precision)
Definition: MatrixTypes.hpp:101
lvr2::Transformd
Transform< double > Transformd
4x4 double precision transformation matrix
Definition: MatrixTypes.hpp:71
lvr2::Rotation
Eigen::Matrix< T, 3, 3 > Rotation
General 3x3 rotation matrix.
Definition: MatrixTypes.hpp:75
p
SharedPointer p
Definition: ConvertShared.hpp:42
operator*
lvr2::Vector3< T > operator*(const lvr2::Transform< T > &transform, const lvr2::Vector3< T > &p)
Definition: MatrixTypes.hpp:180
lvr2::Matrix4fRM
Matrix4RM< float > Matrix4fRM
4x4 row major matrix with float scalars
Definition: MatrixTypes.hpp:49
lvr2::Vector4f
Eigen::Vector4f Vector4f
Eigen 4D vector, single precision.
Definition: MatrixTypes.hpp:131
lvr2::Extrinsicsd
Extrinsics< double > Extrinsicsd
4x4 extrinsic calibration (double precision)
Definition: MatrixTypes.hpp:91
lvr2::Distortionf
Distortion< float > Distortionf
Distortion Parameters (single precision)
Definition: MatrixTypes.hpp:111
lvr2::Matrix4dRM
Matrix4RM< double > Matrix4dRM
4x4 row major matrix with double scalars
Definition: MatrixTypes.hpp:52
lvr2::Transform
Eigen::Matrix< T, 4, 4 > Transform
General 4x4 transformation matrix (4x4)
Definition: MatrixTypes.hpp:65
lvr2::Matrix6f
Eigen::Matrix< float, 6, 6 > Matrix6f
6D Matrix, single precision
Definition: MatrixTypes.hpp:153
lvr2::Vector3f
Eigen::Vector3f Vector3f
Eigen 3D vector, single precision.
Definition: MatrixTypes.hpp:118
lvr2::Matrix4d
Eigen::Matrix4d Matrix4d
Eigen 4x4 matrix, double precision.
Definition: MatrixTypes.hpp:150
lvr2::Extrinsics
Eigen::Matrix< T, 4, 4 > Extrinsics
4x4 extrinsic calibration
Definition: MatrixTypes.hpp:85
lvr2::Vector3
Eigen::Matrix< T, 3, 1 > Vector3
Eigen 3D vector.
Definition: MatrixTypes.hpp:115
lvr2::Distortion
Eigen::Matrix< T, 6, 1 > Distortion
Distortion Parameters.
Definition: MatrixTypes.hpp:105
lvr2::Matrix3fRM
Matrix3RM< float > Matrix3fRM
3x3 row major matrix with float scalars
Definition: MatrixTypes.hpp:59
lvr2::Extrinsicsf
Extrinsics< float > Extrinsicsf
4x4 extrinsic calibration (single precision)
Definition: MatrixTypes.hpp:88
lvr2::Vector3d
Eigen::Vector3d Vector3d
Eigen 3D vector, double precision.
Definition: MatrixTypes.hpp:121
lvr2::Vector6d
Eigen::Matrix< double, 6, 1 > Vector6d
6D vector double precision
Definition: MatrixTypes.hpp:162
lvr2::Intrinsics
Eigen::Matrix< T, 3, 3 > Intrinsics
4x4 extrinsic calibration
Definition: MatrixTypes.hpp:95
lvr2::Transformf
Transform< float > Transformf
4x4 single precision transformation matrix
Definition: MatrixTypes.hpp:68
lvr2::Matrix4f
Eigen::Matrix4f Matrix4f
Eigen 4x4 matrix, single precision.
Definition: MatrixTypes.hpp:147
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::Vector4d
Eigen::Vector4d Vector4d
Eigen 4D vector, double precision.
Definition: MatrixTypes.hpp:134
lvr2::Rotationf
Rotation< float > Rotationf
Single precision 3x3 rotation matrix.
Definition: MatrixTypes.hpp:78
lvr2::Vector3i
Eigen::Vector3i Vector3i
Eigen 3D vector, integer.
Definition: MatrixTypes.hpp:124
lvr2::Vector4
Eigen::Matrix< T, 4, 1 > Vector4
Eigen 4D vector.
Definition: MatrixTypes.hpp:128
lvr2::Distortiond
Distortion< double > Distortiond
Distortion Parameters (double precision)
Definition: MatrixTypes.hpp:108
lvr2::Matrix3dRM
Matrix3RM< double > Matrix3dRM
3x3 row major matrix with double scalars
Definition: MatrixTypes.hpp:61
lvr2::Rotationd
Rotation< double > Rotationd
Double precision 3x3 rotation matrix.
Definition: MatrixTypes.hpp:81
lvr2::Vector2
Eigen::Matrix< T, 2, 1 > Vector2
Eigen 2D vector.
Definition: MatrixTypes.hpp:138
lvr2::Vector6f
Eigen::Matrix< float, 6, 1 > Vector6f
6D vector, single precision
Definition: MatrixTypes.hpp:156
lvr2::Vector2d
Eigen::Vector2d Vector2d
Eigen 2D vector, double precision.
Definition: MatrixTypes.hpp:144
lvr2::Matrix3RM
Eigen::Matrix< T, 3, 3, Eigen::RowMajor > Matrix3RM
General alias for row major 3x3 matrices.
Definition: MatrixTypes.hpp:56


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:24