几何篇(五)
文章目录
前言
本章节将主要介绍点云的变换和ISS关键点检测。
一、点云的变换
Open3D 的几何类型中有许多变换方法。在本笔记中,我将展示如何使用平移、旋转、变换矩阵移动三种方式。
1.平移操作(translate)
如下代码可以将点云分别向x和y方向平移1.5m:
//Translate
auto input = io::CreatePointCloudFromFile("../data/fragment.pcd");
auto input_tx = io::CreatePointCloudFromFile("../data/fragment.pcd");
auto input_ty = io::CreatePointCloudFromFile("../data/fragment.pcd");
Eigen::Vector3d tx(1.5,0,0);
Eigen::Vector3d ty(0,1.5,0);
input_tx->Translate(tx);
input_ty->Translate(ty);
visualization::DrawGeometries({
input,input_tx,input_ty},"Translate output");
平移结果:

2.旋转操作(rotate)
在Open3D 中可以使用rotate( )函数进行旋转操作。rotate( )的输入有两个参数,第一个为3*3的旋转矩阵;第二个参数为vector3d类型的旋转中心点三维坐标。对于第一个参数,在Open3D中提供了多种函数可以从不同的参数化类型转换为旋转矩阵:
-
从欧拉角转换为旋转矩阵:GetRotationMatrixFromXYZ( )
-
从轴角表示转换为旋转矩阵:GetRotationMatrixFromAxisAngle( )
-
从四元数转换为旋转矩阵:GetRotationMatrixFromQuaternion( )
代码如下:
//Rotate
auto input = io::CreatePointCloudFromFile("../data/fragment.pcd");
auto input_rotate = io::CreatePointCloudFromFile("../data/fragment.pcd"

本文介绍了点云的平移、旋转及空间变换方法,并详细展示了如何使用Open3D进行这些操作。此外,还深入探讨了内在形状特征提取(ISSKeypoints)的技术细节与实现。
最低0.47元/天 解锁文章
1万+

被折叠的 条评论
为什么被折叠?



