3D建模问题 - 重访 [英] 3D modeling problem - revisited

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

问题描述

这是一个跟进到previous问题我张贴,这一次更好的说明,我希望。

我已经做了一双带有连接到他们一个针孔摄像头,记录人的眼球运动眼镜。相机位于眼睛下方,因此,仰望着眼睛。也有绕Y轴的轻微旋转(即相机有轻微的向左或向右倾斜病房)和Z轴(即摄像机略微扭曲顺时针或逆时针)。

从视频中,我提取一组图像中的点,应该出现大致线性的,但千万不要因为相机不化直看的人的眼球。

如果我知道一个单位向量u描述相机方向以及图像点IP1(X,Y),其中摄像机看的,我怎么能制定出这些图像点的坐标,如果相机的坐在(0,0,-z)?

解决方案

这显然是一个摄影问题,这并不简单。摄影是教技术大学的一个,两个或三个班(1-3个学期)。

目前首先,在3维空间中的直线投影成一个(2维)的的由照相机(与此无关的照相机的取向)拍摄的图像中的线。如果3D线确实直的,并且所述2D是不是,则相机不是指标,这意味着它扭曲图像。幸运的是,失真的主要原因,可通过直接线性补偿变换法(DLT),在大多数相机。同样应该是真实的摄像头,虽然我还没有证实此事。

其次,如果有在x,图像(2 knowns)上的点的y坐标,就不可能计算的X,Y,相同的点(3 knowns)的Z空间中的坐标。为了做到这一点,必须有不同的取向,其中相同的点具有X',Y'坐标(2 knowns更多)的第二图像,。然后,你可以计算出X,Y,Z坐标 - 在理论上。在实际的计算是困难的,因为它涉及非线性最小二乘法(LSM)。
取而代之的是第二图像,你可能知道,利益谎言在表面上的点(眼睛也许表面)。在这种情况下,点应该满足这是形式F(X,Y,Z)= 0的表面的方程。与此方程结合的x,一个图像的y坐标,则能够计算出的X,Y,Z坐标。同样,计算不是简单的。

三,DLT等式被定义为:

  L1 X + L2 Y + L3 Z + L4
X = --------------------------
     L9 X + L10 Y + L11 Z + 1

     L5 X + L6 Y + L7 Z + L8
Y = --------------------------
     L9 X + L10 Y + L11 Z + 1
 

在李系数是未知的,可以计算出,如果您有至少6个控制点。控制点是已知的X点,Y,Z(3D)坐标的的称为X,Y(2D)坐标在图像上。

一旦你计算力,你做同样的与第二图像,其方向是不同的,以第一张图像。因此:

  L1'X + L2'Y + L3'Z + L4'
X'= -----------------------------
      L9X + L10'Y + L11'Z + 1

      L5'X + L6'Y + L7'Z + L8
Y'= -----------------------------
      L9X + L10'Y + L11'Z + 1
 

四,现在你有李和李系数,你终于能够计算出X,Y,其投影到第一图像的任意点Z坐标为x,y和投射到第二图像是X',Y'。你解决4 DLT方程X,Y,Z

作为最后的想法,你可以用控制的曲线的,而不是控制点,但这种活跃的研究领域。

This is a follow-up to a previous question I posted, this time with a better description, I hope.

I have made a pair of glasses that have a pinhole camera attached onto them that records the person's eye movements. The camera sits below the eye and is hence looking UP at the eye. There is also a slight rotation around the Y-axis (i.e. the camera has a slight left- or right-wards slant) and the Z-axis (i.e the camera is slightly twisted clock-wise or anti-clockwise).

From the video, I extract a set of points in the image, that should appear to be roughly linear but do not because the camera is not oriented to look straight at the person's eye.

If I know of a unit vector U that describes the camera orientation as well as the image point IP1(x,y) where the camera is looking, how can I work out the coordinates of these image points if the camera was sitting at (0, 0, -z)?

解决方案

This is clearly a Photogrammetry problem which is not simple. Photogrammetry is taught in one, two or three classes (1-3 semesters) in technical universities.

At first, a straight line in 3dimensional space is projected as a (2dimensional) straight line in the image shot by the camera (and this irrelevant to the orientation of the camera). If the 3D line is indeed straight, and the 2D is not, then the camera is not "metric", which means that it distorts the image. Luckily, the main causes of the distortion can be compensated for by the Direct Linear Transform method (DLT), in most still cameras. The same should be true for video cameras, though I have not verified it.

Second, if you have the x, y coordinates of a point on the image (2 knowns), it is impossible to compute the X,Y,Z space coordinates of the same point (3 knowns). In order to do that, you must have a second image, of different orientation, where the same point has x', y' coordinates (2 knowns more). Then you are able to compute the X,Y,Z coordinates - in theory. In practice the computation is difficult because it involves non-linear Least Square Method (LSM).
Instead of a second Image, you may know that the points of interest lie on a surface (perhaps the surface of the eye). In this case the points should satisfy the equation of the surface which is of the form f(X, Y, Z)=0. With this equation combined with x, y coordinates of one image, you are able to compute the X, Y, Z coordinates. Again, the computations are not simple.

Third, the DLT equations are defined as:

     L1 X + L2 Y + L3 Z + L4
x = --------------------------
     L9 X + L10 Y + L11 Z + 1

     L5 X + L6 Y + L7 Z + L8
y = --------------------------
     L9 X + L10 Y + L11 Z + 1

The Li coefficients are unknown and can be computed, if you have at least 6 control points. A control point is a point with known X, Y, Z (3D) coordinates and known x, y (2D) coordinates on the image.

Once you compute Li, you do the same with a second image, whose orientation is different to the first image. Thus:

      L1' X + L2' Y + L3' Z + L4'
x' = -----------------------------
      L9' X + L10' Y + L11' Z + 1

      L5' X + L6' Y + L7' Z + L8'
y' = -----------------------------
      L9' X + L10' Y + L11' Z + 1

Fourth, now that you have the Li and the Li' coefficients, you are finally able to compute the X, Y, Z coordinates of an arbitrary point whose projection to the first image is x, y and the projection to the second image is x', y'. You solve the 4 DLT equations for X, Y, Z.

As a last thought, you can use control curves instead of control points, but this a field of active research.

这篇关于3D建模问题 - 重访的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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