将云投影指向2D

问题描述 投票:0回答:1

在半径为r的球体内部存在点云,这些点的坐标系位于球体的中心。这个想法是“拍摄”这个云的照片,因为球体表面有许多观点。 “摄像机”位置取决于角度θ(方位角)和phi(仰角),如图所示。我需要至少10000个图像或视点。

我怎么能处理这个?

enter image description here

我已经做好了:

this link之后,我将点数投射到每个平面,因为我还需要在3D中对它们进行可视化。像这样:

enter image description here

所以我有投影点的坐标属于“照片”的平面,但仍然使用原始坐标系。

飞机定义如下:

U = {-sin(theta), cos(theta), 0}
V = {cos(theta)*sin(phi), sin(theta)*sin(phi), cos(phi)}
Center = {cos(theta)*cos(phi), sin(theta)*cos(phi), sin(phi)}*r

但我被阻止从3D传递到2D。

3d 2d linear-algebra projection point-clouds
1个回答
2
投票

P在飞机自身基础上的每个点[U, V]的投影坐标由下式给出:

[x', y'] = [dot(P - Center, U), dot(P - Center, V)]

要将其转换为世界坐标,请执行此操作

world_coord = Center + U * x' + V * y'

(如果我误解了你的问题,请告诉我)

© www.soinside.com 2019 - 2024. All rights reserved.