射影几何:我怎么在转3D矩形的投影到二维视图 [英] projective geometry: how do I turn a projection of a rectangle in 3D into a 2D view

查看:313
本文介绍了射影几何:我怎么在转3D矩形的投影到二维视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,问题是,我有,我想变成2D矩形的3D投影。这是我有一张纸铺在这我要转换成片的二维视图的表的照片。所以,我需要的是恢复所有的3D /投影变换,并得到从顶部片的平面图,以获得无失真的2D图像。我偶然发现一些关于这个问题的方向,但他们不建议如何能做到这一点的直接指示。这将是非常有益的,以得到一个什么需要做一步一步的指示。或者,一个链接,将其分解为小细节的资源。

So the problem is that I have a 3D projection of a rectangle that I want to turn into 2D. That is I have a photo of a sheet of paper laying on a table which I want to transform into a 2D view of that sheet. So what I need is to get an undistorted 2D image by reverting all the 3D/projection transformations and getting a plain view of the sheet from the top. I happened to find some directions on the subject but they don't suggest an immediate instruction on how this can be achieved. It would be really helpful to get a step-by-step instruction of what needs to be done. Or, alternatively, a link to a resource that breaks it down to little details.

推荐答案

您需要在为了做到这一点的详细信息。 的纸张的例如大小。 比方说,你拥有它。

You need more information in order to do that. For example the size of the sheet of paper. Let's say you have it.

您需要什么,了解被称为单应。 这基本上是以下情况:

What you need to learn about is called "homography". This is basically the following situation:

您有相同的平面(你的纸张),你从两个不同的相机(说的是,你有另一种是你想要获得一个实际图像采取它的照片 - 一个与相机的纸张恰好以上)。

You have the same planar surface (your sheet of paper) and you take a picture of it from two different cameras (Say one is the actual image that you have and the other is the one that you want to obtain - the one with the camera exactly above the sheet of paper).

存在从一个图像的二维空间转换到另一个图像(单应)的二维空间,你的目标是要找到它。一旦你找到它,你只是把它应用到你的形象,以获得顶视图。

There exists a transformation from 2D space of one image to 2D space of the other image (homography) and your goal is to find it. Once you find it you just apply it to your image to get the top view.

为了找到你需要的同形矩阵(至少)4个点,其坐标你知道在这两个图像。

In order to find the homography matrix you need (at least) 4 points, whose coordinate you know in BOTH images.

有这些点的一个显而易见的选择是当然的纸的片材的顶点。 在图像,你有,你可以找到那些手。 在目标图像,你可以选择那些使得片材的中心是(0,0),知道它的尺寸。

An obvious choice for those points are the vertices of the sheet of paper of course. In the image that you have you can locate those by hand. In the target image, you can pick those such that the sheet is centered it (0,0), knowing the dimensions of it.

有大量的有关从4点单应矩阵信息网上。 仅仅是我第一次来到之一,所以必须有更好的根源在那里:)

There is plenty of information about the homography matrix from 4 points online. This is just one of the first I came upon, so there must be better sources out there :)

请注意,大多数情况下,这些计算完成的2D射影空间,因为这是一个射影变换。

Note that most often these computation are done in the 2D projective space, as this is a projective transformation.

这篇关于射影几何:我怎么在转3D矩形的投影到二维视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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