本文介绍了将点云的坐标转换为点云库中的另一个坐标,这使得地平面为X-O-Y平面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个来自kinect融合的点云,并使用点云库成功地分割地平面(一个 x + b y + c * z + d = 0) b,c,d在接地平面的pcl :: ModelCoefficients中)。现在我需要将笛卡尔坐标转换为新的笛卡尔坐标,使地平面成为X-O-Y平面(0 * x + 0 * y + z = 0)。
我想我可以通过这个API(但我不知道如何):

I have a point cloud from kinect fusion and use Point Cloud Library to segment the ground plane(ax+by+c*z+d=0) successfully(I got the a,b,c,d in pcl::ModelCoefficients of the ground plane). Now I need to transform the Cartesian coordinates to new Cartesian coordinates that makes the ground plane became the X-O-Y plane(0*x+0*y+z=0).I guess I can do it by this API(but I don't know how):http://docs.pointclouds.org/trunk/group__common.html#transformPointCloud

我的答案
查看此PCL API:

我成功解决了这个问题!

I successfully solved this problem!

推荐答案

此功能需要相机姿势,这是一个4x4矩阵,形式为

This function requires camera pose, which is a 4x4 matrix, of the form

| R   t |
| 0   1 |

这里,R是3x3旋转矩阵,t是3x1平移矢量,0-是1x3矢量的零和1是一个单位(标量)。

Here, R is 3x3 rotation matrix, t is a 3x1 translation vector, 0 - is a 1x3 vector of zeros, and 1 is a unity (scalar).

你应该这样设计这个矩阵,一个新的坐标系中的Z轴将与你的飞机的法向量。新的X和Y轴是任意的,唯一的限制是它们必须形成正交基。

You should design this matrix in such a way, that Z axis in a new coordinate system will be collinear to the normal vector of your plane. New X and Y axes are arbitrary, the only restriction is that they must form orthogonal basis.

说明如何导出矩阵R.

This link explains how to derive matrix R.

这篇关于将点云的坐标转换为点云库中的另一个坐标,这使得地平面为X-O-Y平面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-30 02:41