在恢复正常摄像机的角度如何灭点帮助? [英] How vanishing points can help in restoring proper camera perspective?

查看:191
本文介绍了在恢复正常摄像机的角度如何灭点帮助?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图插入3D对象成照片,这是不是我拍的。元信息被删除,所以我只能猜测相机参数,并在场景中的对象的尺寸。如何设置在这种情况下适当的campoints,有没有什么方法?

I'm trying to insert 3D object into a photo, that was not taken by me. Meta info is erased, so I can only guess camera parameters and dimensions of the objects in the scene. How can I set proper campoints in such case, is there any methodology?

我见过的人都在画辅助线,寻找消失点,但在我的理解中消失点的意思,我不明白它如何能够恢复的角度帮助。在主题的任何书面记录好?

I've seen that people are drawing helper lines, finding vanishing points, but while I understand the meaning of the vanishing point, I do not get how it can help in restoring the perspective. Any good writeup on the topic?

推荐答案

从给定的图像完全决定一个场景的3D数据,你需要知道,形成图像透视投影参数。它们是:

To completely determine a scene 3D data from a given image, you need to know the perspective projection parameters that formed your image. They are:

  • 相机内部函数:焦距(必须的!),和变形参数(如果你想要高precision)

  • camera intrinsics: focal length (a must!), and distortion parameters (if you want high precision)

  • 在相机外参数(旋转/平移的3轴)

详细说明: 焦距可以从视角获得,这个公式:FX =(ImageWidth等)2 *棕褐色(ALPHAX公司制),以及类似的其他方面。如果你既没有外汇,也没有光圈,您不可以重建的3D图像。

Detailed: Focal length can be obtained from viewing angle, with this formula: fx = (imageWidth)2*tan(alphaX), and similar for the other dimension. If you have neither fx, nor aperture, you cannot reconstruct your 3D image.

的另一种方法提取它们是校准照相机。请参见 http://opencv.itseez.com/modules/calib3d/doc/calib3d。 HTML ,但似乎你不能使用它(你说你没有访问摄像头。)

Another way to extract them is to calibrate the camera. See http://opencv.itseez.com/modules/calib3d/doc/calib3d.html, but it seems you cannot use it (you said you don't have access to camera.)

的消失点(VP)用于确定在哪些相机被定向的角度。因此,图像中心和副总裁之间的差异给你的旋转信息:

The vanishing point (VP) is used to determine the angles at which camera was orientated. So, a difference between the image center and the VP gives you the rotation info:

偏航=((camera.center.x(像素) - VP.x)/image.x)*光圈

yaw = ((camera.center.x (pixels) - VP.x)/image.x )* aperture.

间距=相似。

侧倾角不能从VP中提取,而是从地平线。

The roll angle cannot be extracted from VP, but from the horizon line.

您需要的最后一个参数是翻译。根据不同的应用程序,你可以将它们全部为0,或者只考虑高度是相关的。其中没有一个可以从图像中通常回收

The last parameters you need are the translations. Depending of the application, you can set them all 0, or consider only the height as being relevant. None of them can be usually recovered from the image.

现在,所有这些数据,你可以看看这里 <一href="http://stackoverflow.com/questions/6606891/opencv-virtually-camera-rotating-translating-for-birds-eye-view">Opencv几乎相机旋转/转换为鸟瞰

Now, having all this data, you can look here Opencv virtually camera rotating/translating for bird's eye view

要看到这一切的措施是怎样影响你的透视校正。

to see how all this measures influence your perspective correction.

这篇关于在恢复正常摄像机的角度如何灭点帮助?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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