资源简介
点云匹配代码,计算点云的旋转矩阵,平移矩阵,匹配精度高.

代码片段和文件信息
/***************************************************************************
Copyright: Huang Xiaohang / Piec
Author: Huang Xiaohang
Date: 2017-12-06
Description: Implementation of the classes and functions used in the project
****************************************************************************/
#include “PointCloudToolbox.h“
/// Implementation of Class PIPointCloud ///
PIPointCloud::PIPointCloud() : cloud(new PointCloudT){}
void PIPointCloud::printTransformationMatrix ()
{
printf (“Transformation information:\n“);
printf (“Rotation matrix :\n“);
printf (“ | %6.3f %6.3f %6.3f | \n“ transform_matrix (0 0) transform_matrix (0 1) transform_matrix (0 2));
printf (“R = | %6.3f %6.3f %6.3f | \n“ transform_matrix (1 0) transform_matrix (1 1) transform_matrix (1 2));
printf (“ | %6.3f %6.3f %6.3f | \n“ transform_matrix (2 0) transform_matrix (2 1) transform_matrix (2 2));
printf (“Translation vector :\n“);
printf (“t = < %6.3f %6.3f %6.3f >\n\n“ transform_matrix (0 3) transform_matrix (1 3) transform_matrix (2 3));
}
void PIPointCloud::pointCloudRotate(Eigen::Matrix3f rotate_matrix)
{
Eigen::Matrix4f matrix = Eigen::Matrix4f::Identity();
matrix (0 0) = rotate_matrix (0 0);
matrix (0 1) = rotate_matrix (0 1);
matrix (0 2) = rotate_matrix (0 2);
matrix (1 0) = rotate_matrix (1 0);
matrix (1 1) = rotate_matrix (1 1);
matrix (1 2) = rotate_matrix (1 2);
matrix (2 0) = rotate_matrix (2 0);
matrix (2 1) = rotate_matrix (2 1);
matrix (2 2) = rotate_matrix (2 2);
pcl::transformPointCloud (*cloud *cloud matrix);
}
void PIPointCloud::pointCloudTranslate(Eigen::Vector3f translate_matrix)
{
Eigen::Matrix4f matrix = Eigen::Matrix4f::Identity();
matrix (0 3) = translate_matrix (0 0);
matrix (1 3) = translate_matrix (0 1);
matrix (2 3) = translate_matrix (0 2);
pcl::transformPointCloud (*cloud *cloud matrix);
}
Eigen::Matrix4f PIPointCloud::pointCloudRotateX(float theta)
{
Eigen::Matrix4f matrix = Eigen::Matrix4f::Identity();
matrix (1 1) = cos (theta * M_PI / 180);
matrix (1 2) = -sin (theta * M_PI / 180);
matrix (2 1) = sin (theta * M_PI / 180);
matrix (2 2) = cos (theta * M_PI / 180);
pcl::transformPointCloud (*cloud *cloud matrix);
return matrix;
}
Eigen::Matrix4f PIPointCloud::pointCloudRotateY(float theta)
{
Eigen::Matrix4f matrix = Eigen::Matrix4f::Identity();
matrix (0 0) = cos (theta * M_PI / 180);
matrix (0 2) = sin (theta * M_PI / 180);
matrix (2 0) = -sin (theta * M_PI / 180);
matrix (2 2) = cos (theta * M_PI / 180);
pcl::transformPointCloud (*cloud *cloud matrix);
return matrix;
}
Eigen::Matrix4f PIPointCloud::pointCloudRotateZ(float theta)
{
Eigen::Matrix4f matrix = Eigen::Matrix4f::Identity();
matrix (0 0) = cos (theta * M_PI / 180);
matrix (0 1) = -sin (theta * M_PI / 180);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-12-19 09:06 PointCloudPoseEstimation-master\
文件 692 2017-12-19 09:06 PointCloudPoseEstimation-master\CMakeLists.txt
目录 0 2017-12-19 09:06 PointCloudPoseEstimation-master\data\
文件 243 2017-12-19 09:06 PointCloudPoseEstimation-master\data\Cam21RotationMatrix.xm
文件 208 2017-12-19 09:06 PointCloudPoseEstimation-master\data\Cam21TranslationMatrix.xm
文件 243 2017-12-19 09:06 PointCloudPoseEstimation-master\data\Cam31RotationMatrix.xm
文件 208 2017-12-19 09:06 PointCloudPoseEstimation-master\data\Cam31TranslationMatrix.xm
文件 951011 2017-12-19 09:06 PointCloudPoseEstimation-master\data\fraction1.pcd
文件 984488 2017-12-19 09:06 PointCloudPoseEstimation-master\data\fraction2.pcd
文件 942094 2017-12-19 09:06 PointCloudPoseEstimation-master\data\fraction3.pcd
文件 840962 2017-12-19 09:06 PointCloudPoseEstimation-master\data\model.pcd
目录 0 2017-12-19 09:06 PointCloudPoseEstimation-master\include\
文件 1440 2017-12-19 09:06 PointCloudPoseEstimation-master\include\PointCloudPoseEstimation.h
文件 16339 2017-12-19 09:06 PointCloudPoseEstimation-master\include\PointCloudToolbox.cpp
文件 27335 2017-12-19 09:06 PointCloudPoseEstimation-master\include\PointCloudToolbox.h
目录 0 2017-12-19 09:06 PointCloudPoseEstimation-master\src\
文件 3790 2017-12-19 09:06 PointCloudPoseEstimation-master\src\PointCloudPoseEstimation.cpp
- 上一篇:ATJ227X 数据手册全
- 下一篇:2019MCM_D_论文M奖
相关资源
- 云模型的相关算法cloud
- New fixed point theorems of e-concave-convex m
- 大数据中的云网络Cloud Networking for B
- checkpoint的snmp及syslog配置.doc
- Symantec AntiVirus for Microsoft SharePoint产品
- NetApp Data ONTAP:registered: GX产品简介
- 一张精美的PowerPoint甘特图模板.rar
- 基于四核和双核英特尔:registered: 至强
- 英特尔:registered: 酷睿:trade_mark:双核处
- 借助英特尔:registered: 主动管理技术缩
- LANDesk 管理解决方案和采用英特尔:r
- 英特尔:registered: 酷睿:trade_mark:2 双核
- 四核英特尔:registered: 至强:registered:
- 英特尔:registered: 酷睿:trade_mark:2 双核
- Unicenter 解决方案和采用英特尔:regis
- 英特尔:registered: 博锐:trade_mark: 技术关
- 面向采用英特尔:registered: 博锐:trade
- 英特尔:registered:至强:registered:处理器
- 基于英特尔:registered: 至强:registered:
- 凭借英特尔:registered: I/O加速技术加快
- es(elasticsearch)整合SpringCloudSpringBo
- springcloud 微服务(全套视频)
- springCloud教学视频
- PowerPoint2000支持库
- Existence of positive solutions for singular h
- 四核英特尔:registered: 至强:registered:
- 番茄工作法(pomotime)PowerPoint.rar
- 销售流程-SOP.docx
- springCloud路由网管负载均衡及拦截过滤
- 航迹大师 waypoint master 2.3
评论
共有 条评论