c++ - 点云库:如何使用 pcl::addCoordinateSystem(double scale, const Eigen::Affine3f & t, int viewport = 0))

标签 c++ transformation eigen coordinate-systems point-cloud-library

我无法理解如何在函数中设置转换 t:

pcl::addCoordinateSystem(double scale, const Eigen::Affine3f & t, int viewport = 0))

所以问题是:如何定义 Eigen::Affine3f

我有旋转矩阵和平移 vector 。

最佳答案

知道旋转和平移矩阵后,可以将它们组合成 Affine3f。

Eigen::Affine3f tt;
tt = Eigen::Translation3f(100.,300.,0.) * Eigen::AngleAxis<float>(theta,axis);

请注意,Eigen::Translation3fEigen::AngleAxis3f 在这里不是矩阵,而是抽象类型 Transform。

关于c++ - 点云库:如何使用 pcl::addCoordinateSystem(double scale, const Eigen::Affine3f & t, int viewport = 0)),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18443129/

相关文章:

c++ - 特征:模板函数中 MatrixBase 的默认类型?

c++ - 从无模式对话框启动时 CFileDialog 卡住

c++ - 在 C/C++ 中实现 UNUSED 宏的通用编译器独立方式

c++ - 如何在 C++ 中的 2 个函数集之间切换?

c++ - opengl 3D变换需要旋转矩阵

matrix - 如何在 Eigen 中展开矩阵?

c++ - 如何使用websocket websocketpp发送和接收消息?

Matlab在OpenCV中的radon()等价函数

algorithm - 如何将异构平面数据转化为数据结构

c++ - 以多个 Eigen 对象作为参数的函数的最佳实践