我有形成平面3D,我已经从RANSAC平面拟合得到一组点云。对于一些特定类型的数据的分析,我需要将其转换为2D问题,这样我可以拥有所有的z值基本相同。假设平面的方程为斧+用CZ + + 1 = 0。我的问题是:
I have a set of point cloud forming a plane in 3D, which I've obtained from RANSAC plane fitting. For some specific kind of analysis of the data I need to convert this to a 2D problem so that I can have all the z-values almost same. Suppose the equation of the plane is ax+by+cz+1=0. My question is that:
如何获得A,B,C,从原始点云数据的价值?将最小二乘法是最好的方法还是有办法从RANSAC配件获得这些价值? 从一些教程,我得到了有关执行以下步骤一个想法:转化为质量中心,绕x轴,绕y轴,然后再次取消转换。是否有意义? 3.我怎样才能获得的旋转角度在A,B,C条款?我需要转换的3D平面到2D的一些一般的想法,以便所有的Z坐标值是相同的。
I need some general idea of converting a 3D plane to 2D so that all the z-coordinate values are same.
推荐答案
您需要的基础上的变化。
You need a change of basis.
让我们创建的三个矢量形成了新的正交基的 X 是和以Z
Let us create the new orthonormal basis formed of three vectors X, Y and Z.
您新的以Z
将平面的法向量,(A,B,C)。由三个组成部分通过的Sqrt除以归一化(一^ 2 + B ^ 2 + C ^ 2)。
Your new Z
will be the normal vector of the plane, (a, b, c). Normalize it by dividing all three components by Sqrt(a^2+b^2+c^2).
然后取一个任意的载体,而不是平行于第一,让 U 。计算点积 UZ ,然后减去( UZ )。以Z 从 U 。规范化得到的载体为 X
Then take an arbitrary vector, not parallel to the first, let U. Compute the dot product U.Z and subtract (U.Z).Z from U. Normalize the resulting vector as X.
最后,计算叉积是 = 以Z / X
Lastly, compute the cross product Y = Z / X.
然后,丕以2D通过计算点的产品中的每一个点( Pi.X Pi.Y )
Then, transform every point Pi to 2D by computing the dot products (Pi.X, Pi.Y).
相关推荐
最新文章