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
Matrix4RM< float > Matrix4fRM
4x4 row major matrix with float scalars
Definition: MatrixTypes.hpp:49
Eigen::Matrix< T, 3, 3 > Rotation
General 3x3 rotation matrix.
Definition: MatrixTypes.hpp:75
Eigen::Matrix4f Matrix4f
Eigen 4x4 matrix, single precision.
Eigen::Vector4f Vector4f
Eigen 4D vector, single precision.
Matrix3RM< float > Matrix3fRM
3x3 row major matrix with float scalars
Definition: MatrixTypes.hpp:59
Extrinsics< float > Extrinsicsf
4x4 extrinsic calibration (single precision)
Definition: MatrixTypes.hpp:88
Eigen::Vector3i Vector3i
Eigen 3D vector, integer.
Distortion< double > Distortiond
Distortion Parameters (double precision)
Eigen::Matrix< T, 2, 1 > Vector2
Eigen 2D vector.
Eigen::Vector3d Vector3d
Eigen 3D vector, double precision.
Eigen::Matrix< T, 3, 3 > Intrinsics
4x4 extrinsic calibration
Definition: MatrixTypes.hpp:95
Rotation< double > Rotationd
Double precision 3x3 rotation matrix.
Definition: MatrixTypes.hpp:81
Transform< double > Transformd
4x4 double precision transformation matrix
Definition: MatrixTypes.hpp:71
Eigen::Matrix< float, 6, 6 > Matrix6f
6D Matrix, single precision
Eigen::Vector3f Vector3f
Eigen 3D vector, single precision.
Eigen::Matrix< T, 3, 1 > Vector3
Eigen 3D vector.
Intrinsics< double > Intrinsicsd
4x4 extrinsic calibration (double precision)
Transform< float > Transformf
4x4 single precision transformation matrix
Definition: MatrixTypes.hpp:68
Vector3< T > multiply(const Transform< T > &transform, const Vector3< T > &p)
Matrix3RM< double > Matrix3dRM
3x3 row major matrix with double scalars
Definition: MatrixTypes.hpp:61
SharedPointer p
Eigen::Vector4d Vector4d
Eigen 4D vector, double precision.
Eigen::Matrix< double, 6, 6 > Matrix6d
6D matrix double precision
Eigen::Matrix< T, 6, 1 > Distortion
Distortion Parameters.
Eigen::Matrix4d Matrix4d
Eigen 4x4 matrix, double precision.
Eigen::Vector2d Vector2d
Eigen 2D vector, double precision.
Distortion< float > Distortionf
Distortion Parameters (single precision)
Eigen::Matrix< float, 6, 1 > Vector6f
6D vector, single precision
Eigen::Matrix< double, 6, 1 > Vector6d
6D vector double precision
Eigen::Matrix< T, 4, 1 > Vector4
Eigen 4D vector.
Intrinsics< float > Intrinsicsf
4x4 intrinsic calibration (single precision)
Definition: MatrixTypes.hpp:98
Eigen::Vector2f Vector2f
Eigen 2D vector, single precision.
Rotation< float > Rotationf
Single precision 3x3 rotation matrix.
Definition: MatrixTypes.hpp:78
Matrix4RM< double > Matrix4dRM
4x4 row major matrix with double scalars
Definition: MatrixTypes.hpp:52
BaseVector< CoordType > operator*(const Eigen::Matrix< Scalar, 4, 4 > &mat, const BaseVector< CoordType > &normal)
Multiplication operator to support transformation with Eigen matrices. Rotates the normal...
Definition: BaseVector.hpp:249
Eigen::Matrix< T, 3, 3, Eigen::RowMajor > Matrix3RM
General alias for row major 3x3 matrices.
Definition: MatrixTypes.hpp:56
Eigen::Matrix< T, 4, 4 > Transform
General 4x4 transformation matrix (4x4)
Definition: MatrixTypes.hpp:65
Eigen::Matrix< T, 4, 4 > Extrinsics
4x4 extrinsic calibration
Definition: MatrixTypes.hpp:85
Extrinsics< double > Extrinsicsd
4x4 extrinsic calibration (double precision)
Definition: MatrixTypes.hpp:91
Eigen::Matrix< T, 4, 4, Eigen::RowMajor > Matrix4RM
General alias for row major 4x4 matrices.
Definition: MatrixTypes.hpp:46


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 Mon Feb 28 2022 22:46:08