2#include "Base/Headers/Buffer.hpp"
3#include "Base/Headers/Matrix.hpp"
5#include "GraphOptimization/Headers/GeometricCamera.h"
15 template <
class Scalar_,
int Options>
17 template <
class Scalar_,
int Options>
68 static cv::Mat
toCvMat(
const Eigen::Matrix<double, 4, 4>& m);
73 static cv::Mat
toCvMat(
const Eigen::Matrix<float, 4, 4>& m);
78 static cv::Mat
toCvMat(
const Eigen::Matrix<float, 3, 4>& m);
83 static cv::Mat
toCvMat(
const Eigen::Matrix<double, 3, 3>& m);
88 static cv::Mat
toCvMat(
const Eigen::Matrix<double, 3, 1>& m);
93 static cv::Mat
toCvMat(
const Eigen::Matrix<float, 3, 1>& m);
98 static cv::Mat
toCvMat(
const Eigen::Matrix<float, 3, 3>& m);
108 for (
uint01 i = 0; i < 4; i++)
109 for (
uint01 j = 0; j < 4; j++)
118 static cv::Mat
toCvMat(
const Eigen::Matrix<float, -1, -1>& m);
123 static cv::Mat
toCvMat(
const Eigen::Matrix<double, -1, -1>& m);
130 static cv::Mat
toCvSE3(
const Eigen::Matrix<double, 3, 3>& R,
const Eigen::Matrix<double, 3, 1>& t);
136 static cv::Mat
toCvSE3(
const Eigen::Matrix<fltp04, 3, 3>& R,
const Eigen::Matrix<fltp04, 3, 1>& t);
147 static Eigen::Matrix<double, 3, 1>
toVector3d(
const cv::Mat& cvVector);
152 static Eigen::Matrix<float, 3, 1>
toVector3f(
const cv::Mat& cvVector);
157 static Eigen::Matrix<double, 3, 1>
toVector3d(
const cv::Point3_<float>& scvPoint);
162 static Eigen::Matrix<double, 3, 3>
toMatrix3d(
const cv::Mat& cvMat3);
167 static Eigen::Matrix<double, 4, 4>
toMatrix4d(
const cv::Mat& cvMat4);
172 static Eigen::Matrix<float, 3, 3>
toMatrix3f(
const cv::Mat& cvMat3);
177 static Eigen::Matrix<float, 4, 4>
toMatrix4f(
const cv::Mat& cvMat4);
194 static Sophus::SE3<g_type, 0>
toSophus(
const cv::Mat& T);
The equivelent of std::vector but with a bit more control.
Utility class for converting between OpenCV, Eigen, Sophus, and NDEVR matrix types.
static cv::Mat toCvMat(const Eigen::Matrix< double, 3, 3 > &m)
Converts a 3x3 double Eigen matrix to OpenCV Mat.
static SE3Quat toSE3Quat(const cv::Mat &cvT)
Converts an OpenCV 4x4 transform to SE3Quat.
static Eigen::Matrix< double, 4, 4 > toMatrix4d(const cv::Mat &cvMat4)
Converts an OpenCV 4x4 Mat to a double Eigen matrix.
static Eigen::Matrix< float, 4, 4 > toMatrix4f(const cv::Mat &cvMat4)
Converts an OpenCV 4x4 Mat to a float Eigen matrix.
static Eigen::Matrix< float, 3, 3 > toMatrix3f(const cv::Mat &cvMat3)
Converts an OpenCV 3x3 Mat to a float Eigen matrix.
static Matrix< fltp04 > ToNDVMat(const Eigen::Matrix< float, 4, 4 > &m)
Converts a 4x4 float Eigen matrix to an NDEVR Matrix.
static cv::Mat toCvMat(const Eigen::Matrix< float, 3, 3 > &m)
Converts a 3x3 float Eigen matrix to OpenCV Mat.
static Buffer< cv::Mat, BufferAllocator< cv::Mat, 64, false > > toDescriptorVector(const cv::Mat &Descriptors)
Converts a descriptor matrix into a buffer of individual row descriptors.
static cv::Mat toCvMat(const SE3Quat &SE3)
Converts an SE3Quat to an OpenCV 4x4 Mat.
static cv::Mat toCvMat(const Eigen::Matrix< double, 4, 4 > &m)
Converts a 4x4 double Eigen matrix to OpenCV Mat.
static Sophus::SE3< g_type, 0 > toSophus(const cv::Mat &T)
Converts an OpenCV 4x4 Mat to a Sophus SE3.
static Eigen::Matrix< float, 3, 1 > toVector3f(const cv::Mat &cvVector)
Converts an OpenCV Mat to a 3D float Eigen vector.
static cv::Mat toCvMat(const Eigen::Matrix< double, -1, -1 > &m)
Converts a dynamic-size double Eigen matrix to OpenCV Mat.
static cv::Mat toCvSE3(const Eigen::Matrix< double, 3, 3 > &R, const Eigen::Matrix< double, 3, 1 > &t)
Builds a 4x4 SE3 OpenCV Mat from a rotation and translation (double).
static cv::Mat toCvMat(const Sim3 &Sim3)
Converts a Sim3 to an OpenCV 4x4 Mat.
static Eigen::Matrix< double, 3, 1 > toVector3d(const cv::Mat &cvVector)
Converts an OpenCV Mat to a 3D double Eigen vector.
static cv::Mat toCvMat(const Eigen::Matrix< float, -1, -1 > &m)
Converts a dynamic-size float Eigen matrix to OpenCV Mat.
static Buffer< float > toEuler(const cv::Mat &R)
Converts a rotation matrix to Euler angles.
static Sophus::Sim3< g_type, 0 > toSophus(const Sim3 &S)
Converts an NDEVR Sim3 to a Sophus Sim3.
static cv::Mat toCvSE3(const Eigen::Matrix< fltp04, 3, 3 > &R, const Eigen::Matrix< fltp04, 3, 1 > &t)
Builds a 4x4 SE3 OpenCV Mat from a rotation and translation (float).
static SE3Quat toSE3Quat(const Sophus::SE3< float, 0 > &T)
Converts a Sophus SE3 to SE3Quat.
static cv::Mat toCvMat(const Eigen::Matrix< float, 3, 4 > &m)
Converts a 3x4 float Eigen matrix to OpenCV Mat.
static Eigen::Matrix< double, 3, 3 > toMatrix3d(const cv::Mat &cvMat3)
Converts an OpenCV 3x3 Mat to a double Eigen matrix.
static cv::Mat toCvMat(const Eigen::Matrix< float, 3, 1 > &m)
Converts a 3x1 float Eigen vector to OpenCV Mat.
static cv::Mat toCvMat(const Eigen::Matrix< float, 4, 4 > &m)
Converts a 4x4 float Eigen matrix to OpenCV Mat.
static bool isRotationMatrix(const cv::Mat &R)
Checks whether a given matrix is a valid rotation matrix.
static cv::Mat toCvMat(const Eigen::Matrix< double, 3, 1 > &m)
Converts a 3x1 double Eigen vector to OpenCV Mat.
static SE3Quat toSE3Quat(const Sim3 &gSim3)
Converts a Sim3 to SE3Quat (discards scale).
static cv::Mat tocvSkewMatrix(const cv::Mat &v)
Converts a 3-vector to a skew-symmetric matrix.
static Eigen::Matrix< double, 3, 1 > toVector3d(const cv::Point3_< float > &scvPoint)
Converts an OpenCV Point3f to a 3D double Eigen vector.
Templated logic for doing matrix multiplication.
SE(3) rigid body transformation represented by a unit quaternion and translation vector.
The primary namespace for the NDEVR SDK.
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
constexpr t_to cast(const Angle< t_from > &value)
Casts an Angle from one backing type to another.
Similarity transformation in 3D (rotation + translation + scale).