转换3D平面2D [英] convert 3D plane to 2D

查看:219
本文介绍了转换3D平面2D的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有形成平面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:

  1. 如何获得A,B,C,从原始点云数据的价值?将最小二乘法是最好的方法还是有办法从RANSAC配件获得这些价值?
  2. 从一些教程,我得到了有关执行以下步骤一个想法:转化为质量中心,绕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).

这篇关于转换3D平面2D的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆