给定2d投影和已知的多边形尺寸,以3D方式重构非平面多边形

时间:2018-10-06 08:27:57

标签: image-processing computer-vision transformation robotics projective-geometry

我有一个具有9个点的非平面对象,该点具有3D已知尺寸,即已知所有边的长度。现在给出该形状的2D投影,我想重建它的3D模型。我基本上想在现实世界中检索该对象的形状,即3D中不同侧面之间的角度。例如:给定表每个部分的所有尺寸和2D图像,我正在尝试重建其3D模型。

enter image description here

到目前为止,我已经阅读了有关单应性,透视变换,过程和基本/基本矩阵的信息,但是还没有找到适用于此的解决方案。我对此并不陌生,所以可能错过了一些东西。在这方面的任何方向都将非常有帮助。

1 个答案:

答案 0 :(得分:2)

在您的问题中,您提到要仅使用对象的单个视图来实现此目的。在那种情况下,单应性或基本/基本矩阵将无济于事,因为它们至少需要两个场景视图才有意义。如果您对要重建的对象的形状没有任何先验知识,那么您将缺少的关键信息是(相对)深度,在这种情况下,我认为这是两个可能的解决方案:

  • 利用学习算法。关于深度网络的6dof对象姿态估计的文献很多,例如,参见this paper。如果您使用深度,则不必直接处理深度,因为这些网络经过端到端训练,可以估算SO(3)中的姿态。

  • 添加许多张图像,并使用密集的光度SLAM / SFM管道,例如elastic fusion。但是,在这种情况下,您将需要对结果模型进行细分,因为它们所产生的估计是针对整个环境的,这可能很难根据场景进行。

但是,正如您在评论中提到的,如果您对模型的几何先验性很强,则可以按比例缩放模型。如果是平面物体(长方体只是该物体的扩展),则可以使用此简单算法(或多或少地使用它们的功能here,还有其他方法,但是我发现它们有点用杂乱无章,按公式计算):

//let's note A,B,C,D the rectangle in 3d that we are after, such that 
//AB is parellel with CD. Let's also note a,b,c,d their respective
//reprojections in the image, i.e. a=KA where K is the calibration matrix, and so on.

1) Compute the common vanishing point of AB and CD. This is just the intersection
   of ab and cd in the image plane. Let's call it v_1.
2) Do the same for the two other edges, i.e bc and da. Let's call this 
   vanishing point v_2.
3) Now, you can compute the vanishing line, which will just be
   crossproduct(v_1, v_2), i.e. the line going through both v_1 and v_2. This gives 
   you the orientation of your plane. Let's write its normal N.
5) All you need to find now is the boundaries of the rectangle. To do
   that, just consider any plane with normal N that doesn't go through
   the camera center. Now find the intersections of K^{-1}a, K^{-1}b,
   K^{-1}c, K^{-1}d with that plane. 

如果您需要复习消失的点和线,建议您查看Hartley-Zisserman's book的第213和216页。

相关问题