将 2D 点反投影为 3D

发布于 2024-07-05 16:34:47 字数 669 浏览 7 评论 0原文

假设我们有一个 3D 空间,上面有一个平面,具有任意方程: ax+by+cz+d=0 现在假设我们在该平面上选择 3 个随机点: (x0, y0, z0) (x1, y1, z1) (x1, y1, z1)

现在我对该平面有不同的视角(相机)。 我的意思是我有一台不同的相机,可以从不同的角度观察这架飞机。 从摄像机的角度来看,这些点具有不同的位置。 例如 (x0, y0, z0) 将是 (x0', y0') 从新相机的角度来看,(x1, y1, z1) 将是 (x1', y1'),(x2, y2, z2) 将是 (x2', y2')。

我想从新相机的角度选择一个点,例如(X,Y),并告诉它在该平面上的位置。 我所知道的是 3 个点及其在 3D 空间上的位置以及它们在新相机视图上的投影位置。


您知道平面方程的系数和相机位置(以及投影),还是只有六个点?

我知道前 3 个点的位置。 因此我们可以计算平面的系数。 所以我们从 (0,0,0) 角度确切地知道飞机在哪里。 然后我们就有了只能看到点的相机! 因此,相机只能看到 3 个点,并且它也知道它们在 3D 空间中的位置(当然也知道它们在 2D 相机视图平面上的位置)。 毕竟我想查看相机视图,选择一个点(例如(x1,y1))并告诉该点在该平面上的位置。 (确保这个(X,Y,Z)点应该适合平面方程)。 而且我对相机的位置一无所知。

Suppose we have a 3D Space with a plane on it with an arbitrary equation: ax+by+cz+d=0
now suppose that we pick 3 random points on that plane: (x0, y0, z0) (x1, y1, z1) (x1, y1, z1)

now I have a different point of view(camera) for this plane. I mean I have a different camera that will look at this plane from a different point of view. From that camera point of view these points have different locations. for example (x0, y0, z0) will be (x0', y0')
and (x1, y1, z1) will be (x1', y1') and (x2, y2, z2) will be (x2', y2') from the new camera point of view.

I want to pick a point for example (X,Y) from the new camera point of view and tell where it will be on that plane. All I know is that 3 points and their locations on 3D space and their projection locations on the new camera view.


Do you know the coefficients of the plane-equation and the camera positions (along with the projection), or do you only have the six points?

I know the location of first 3 points. therefore we can calculate the coefficients of the plane. so we know exactly where the plane is from (0,0,0) point of view. and then we have the camera that can only see the points! So the only thing that camera sees is 3 points and also it knows their locations in 3D space (and for sure their locations on 2D camera view plane). and after all I want to look at camera view, pick a point (for example (x1, y1)) and tell where is that point on that plane. (for sure this (X,Y,Z) point should fit on the plane equation). Also I know nothing about the camera location.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你穿错了嫁妆 2024-07-12 16:34:47

不可能对这个问题给出明确的解决方案。 但是,我将如何提取不同的解决方案:

1)使用原始 RANSAC 论文,给出了四种可能的可行解决方案(点在相机前面)。

2) 以相机位置为原点,以(X,Y)为相机投影一条射线,并计算其与平面的交线。

It is not possible to give an unambiguous solution to this problem. However, here's how I would extract the different solutions:

1) Solve for the camera position and direction using the P3P (Perspective-3-Point) algorithm from the original RANSAC paper, which give up to four possible feasible solutions (with the points in front of the camera).

2) Project a ray with the camera position as origin having (X,Y) as projection in the camera and calculate its intersection with the plane.

山有枢 2024-07-12 16:34:47

你问的是直线和平面如何相交?
请参阅此处 http://paulbourke.net/geometry/pointlineplane/

ps。 你的老师知道这个网站!

You are asking how to intersect a line and a plane?
See here http://paulbourke.net/geometry/pointlineplane/

ps. Your teacher knows this site!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文