Declarations for geometry-related calculations. More...
#include "general_resources.hpp"
#include "opencv_resources.hpp"
#include "pcl_resources.hpp"
#include "ros_resources.hpp"
#include <Eigen/Geometry>
Go to the source code of this file.
Defines | |
#define | ALGEBRAIC_DISTANCE 1 |
#define | DEFAULT_ASSIGN_MODE 0 |
#define | EPIPOLAR_DISTANCE 2 |
#define | LOURAKIS_DISTANCE 3 |
#define | MAPPER_ASSIGN_MODE 1 |
#define | SAMPSON_DISTANCE 0 |
Typedefs | |
typedef Eigen::Matrix< float, 3, 3, Eigen::RowMajor > | Matrix3frm |
typedef Eigen::Quaternion< double > | QuaternionDbl |
Functions | |
void | assignPose (geometry_msgs::PoseStamped &pPose, cv::Mat &C, int idx, ros::Time timestamp, int mode=DEFAULT_ASSIGN_MODE) |
double | calcGeometryDistance (cv::Point2f &pt1, cv::Point2f &pt2, cv::Mat &mat, int distMethod=SAMPSON_DISTANCE) |
double | calculateGRIC (std::vector< cv::Point2f > &pts1, std::vector< cv::Point2f > &pts2, cv::Mat &rel, cv::Mat &mask, int d, double k, double r, double lambda_3, int distMethod) |
double | calculateRho (double e, double sig, double r, double lambda_3, int d) |
void | composeTransform (const cv::Mat &R, const cv::Mat &t, cv::Mat &c) |
void | convert3frmToRmat (const Matrix3frm &R_src, cv::Mat &R_dst) |
void | convertAndShiftPoseFormat (const geometry_msgs::Pose &pose, cv::Mat &t, Eigen::Quaternion< double > &Q) |
void | convertAndShiftPoseFormat (const cv::Mat &t, const Eigen::Quaternion< double > &Q, geometry_msgs::Pose &pose) |
void | convertEigenvecToTvec (const Eigen::Vector3f &T_src, cv::Mat &T_dst) |
void | convertPoseFormat (const geometry_msgs::Pose &pose, cv::Mat &t, Eigen::Quaternion< double > &Q) |
void | convertPoseFormat (const cv::Mat &t, const Eigen::Quaternion< double > &Q, geometry_msgs::Pose &pose) |
void | convertRmatTo3frm (const cv::Mat &R_src, Matrix3frm &R_dst) |
void | convertTvecToEigenvec (const cv::Mat &T_src, Eigen::Vector3f &T_dst) |
void | decomposeTransform (const cv::Mat &c, cv::Mat &R, cv::Mat &t) |
double | lourakisSampsonError (cv::Point2f &pt1, cv::Point2f &pt2, cv::Mat &H) |
void | matrixToQuaternion (const cv::Mat &mat, Eigen::Quaternion< double > &quat) |
int | minProjections (int pairs) |
Minimum number of projections required to achieve the specified number of pairs. | |
double | normalizedGRICdifference (std::vector< cv::Point2f > &pts1, std::vector< cv::Point2f > &pts2, cv::Mat &F, cv::Mat &H, cv::Mat &mask_F, cv::Mat &mask_H, double &F_GRIC, double &H_GRIC) |
int | possiblePairs (int projections) |
Maximum possible number of pairs able to be achieved with specified number of projections. | |
void | projectionToRotation (const cv::Mat &src, cv::Mat &dst) |
void | projectionToTransformation (const cv::Mat &proj, cv::Mat &trans) |
void | quaternionToMatrix (const Eigen::Quaternion< double > &quat, cv::Mat &mat, bool handedness=false) |
void | rotationToProjection (const cv::Mat &src, cv::Mat &dst) |
void | transformationToProjection (const cv::Mat &trans, cv::Mat &proj) |
void | transformPoints (cv::vector< cv::Point3d > &pts, unsigned int option=0) |
void | transformPoints (cv::vector< cv::Point3d > &pts, int *options) |
Declarations for geometry-related calculations.
Definition in file geometry.hpp.
#define ALGEBRAIC_DISTANCE 1 |
Definition at line 22 of file geometry.hpp.
#define DEFAULT_ASSIGN_MODE 0 |
Definition at line 26 of file geometry.hpp.
#define EPIPOLAR_DISTANCE 2 |
Definition at line 23 of file geometry.hpp.
#define LOURAKIS_DISTANCE 3 |
Definition at line 24 of file geometry.hpp.
#define MAPPER_ASSIGN_MODE 1 |
Definition at line 27 of file geometry.hpp.
#define SAMPSON_DISTANCE 0 |
Definition at line 21 of file geometry.hpp.
typedef Eigen::Matrix<float, 3, 3, Eigen::RowMajor> Matrix3frm |
Definition at line 15 of file geometry.hpp.
typedef Eigen::Quaternion<double> QuaternionDbl |
Definition at line 16 of file geometry.hpp.
void assignPose | ( | geometry_msgs::PoseStamped & | pPose, |
cv::Mat & | C, | ||
int | idx, | ||
ros::Time | timestamp, | ||
int | mode = DEFAULT_ASSIGN_MODE |
||
) |
Definition at line 113 of file geometry.cpp.
double calcGeometryDistance | ( | cv::Point2f & | pt1, |
cv::Point2f & | pt2, | ||
cv::Mat & | mat, | ||
int | distMethod = SAMPSON_DISTANCE |
||
) |
Definition at line 718 of file geometry.cpp.
double calculateGRIC | ( | std::vector< cv::Point2f > & | pts1, |
std::vector< cv::Point2f > & | pts2, | ||
cv::Mat & | rel, | ||
cv::Mat & | mask, | ||
int | d, | ||
double | k, | ||
double | r, | ||
double | lambda_3, | ||
int | distMethod | ||
) |
Definition at line 666 of file geometry.cpp.
double calculateRho | ( | double | e, |
double | sig, | ||
double | r, | ||
double | lambda_3, | ||
int | d | ||
) |
Definition at line 709 of file geometry.cpp.
void composeTransform | ( | const cv::Mat & | R, |
const cv::Mat & | t, | ||
cv::Mat & | c | ||
) |
Definition at line 367 of file geometry.cpp.
void convert3frmToRmat | ( | const Matrix3frm & | R_src, |
cv::Mat & | R_dst | ||
) |
Definition at line 218 of file geometry.cpp.
void convertAndShiftPoseFormat | ( | const geometry_msgs::Pose & | pose, |
cv::Mat & | t, | ||
Eigen::Quaternion< double > & | Q | ||
) |
Definition at line 342 of file geometry.cpp.
void convertAndShiftPoseFormat | ( | const cv::Mat & | t, |
const Eigen::Quaternion< double > & | Q, | ||
geometry_msgs::Pose & | pose | ||
) |
Definition at line 354 of file geometry.cpp.
void convertEigenvecToTvec | ( | const Eigen::Vector3f & | T_src, |
cv::Mat & | T_dst | ||
) |
Definition at line 210 of file geometry.cpp.
void convertPoseFormat | ( | const geometry_msgs::Pose & | pose, |
cv::Mat & | t, | ||
Eigen::Quaternion< double > & | Q | ||
) |
Definition at line 330 of file geometry.cpp.
void convertPoseFormat | ( | const cv::Mat & | t, |
const Eigen::Quaternion< double > & | Q, | ||
geometry_msgs::Pose & | pose | ||
) |
Definition at line 317 of file geometry.cpp.
void convertRmatTo3frm | ( | const cv::Mat & | R_src, |
Matrix3frm & | R_dst | ||
) |
Definition at line 190 of file geometry.cpp.
void convertTvecToEigenvec | ( | const cv::Mat & | T_src, |
Eigen::Vector3f & | T_dst | ||
) |
Definition at line 204 of file geometry.cpp.
void decomposeTransform | ( | const cv::Mat & | c, |
cv::Mat & | R, | ||
cv::Mat & | t | ||
) |
Definition at line 393 of file geometry.cpp.
double lourakisSampsonError | ( | cv::Point2f & | pt1, |
cv::Point2f & | pt2, | ||
cv::Mat & | H | ||
) |
Definition at line 785 of file geometry.cpp.
void matrixToQuaternion | ( | const cv::Mat & | mat, |
Eigen::Quaternion< double > & | quat | ||
) |
Definition at line 418 of file geometry.cpp.
int minProjections | ( | int | pairs | ) |
Minimum number of projections required to achieve the specified number of pairs.
Definition at line 8 of file geometry.cpp.
double normalizedGRICdifference | ( | std::vector< cv::Point2f > & | pts1, |
std::vector< cv::Point2f > & | pts2, | ||
cv::Mat & | F, | ||
cv::Mat & | H, | ||
cv::Mat & | mask_F, | ||
cv::Mat & | mask_H, | ||
double & | F_GRIC, | ||
double & | H_GRIC | ||
) |
Definition at line 641 of file geometry.cpp.
int possiblePairs | ( | int | projections | ) |
Maximum possible number of pairs able to be achieved with specified number of projections.
Definition at line 15 of file geometry.cpp.
void projectionToRotation | ( | const cv::Mat & | src, |
cv::Mat & | dst | ||
) |
Definition at line 279 of file geometry.cpp.
void projectionToTransformation | ( | const cv::Mat & | proj, |
cv::Mat & | trans | ||
) |
Definition at line 234 of file geometry.cpp.
void quaternionToMatrix | ( | const Eigen::Quaternion< double > & | quat, |
cv::Mat & | mat, | ||
bool | handedness = false |
||
) |
Definition at line 599 of file geometry.cpp.
void rotationToProjection | ( | const cv::Mat & | src, |
cv::Mat & | dst | ||
) |
Definition at line 296 of file geometry.cpp.
void transformationToProjection | ( | const cv::Mat & | trans, |
cv::Mat & | proj | ||
) |
Definition at line 259 of file geometry.cpp.
void transformPoints | ( | cv::vector< cv::Point3d > & | pts, |
unsigned int | option = 0 |
||
) |
Definition at line 77 of file geometry.cpp.
void transformPoints | ( | cv::vector< cv::Point3d > & | pts, |
int * | options | ||
) |
Definition at line 20 of file geometry.cpp.