【问题标题】:Generalisation of the “mid-point” method for triangulation to n points将三角剖分的“中点”方法推广到 n 个点
【发布时间】:2015-05-01 00:46:39
【问题描述】:

在计算机视觉中,“中点”方法解决了从两个 2D 点确定 3D 点的三角测量问题(请参阅here)。是否可以将其概括为两个以上的点,例如 n 个点,它叫什么?这篇文章确实提到了直接线性变换,但我不确定这就是我要找的……

【问题讨论】:

    标签: computer-vision triangulation


    【解决方案1】:

    是的,有 N 个点的泛化。我在一些文章中看到过:

    P。 A. Beardsley、A. Zisserman 和 D. W. Murray。投影的顺序更新 和运动的仿射结构。诠释。 J.计算机。愿景,23(3) :235–259,1997 年 6 月

    Srikumar Ramalingam、Suresh K. Lodha 和 Peter Sturm。通用结构- 从运动框架。计算。可见。图像理解,103(3):218–228,九月 2006.

    你也可以阅读这本书(你的维基百科文章的参考)

    理查德·哈特利和安德鲁·齐瑟曼 (2003)。计算机视觉中的多视图几何。剑桥大学出版社。国际标准书号 978-0-521-54051-3。

    但它没有提到我记得的 N 个视图的中点,只有两个视图,而这种方法被描述为不准确(严格来说不是我的想法)。

    希望对你有所帮助。

    【讨论】:

    • 谢谢。最后我自己算出方程式并解决了问题。
    【解决方案2】:

    正如 Fleurmond 所建议的,将中点三角剖分推广到 n 视图如下:

    Srikumar Ramalingam、Suresh K. Lodha 和 Peter Sturm。一个通用的结构运动框架。计算。可见。 Image Underst., 103(3) :218–228, 2006 年 9 月

    以下是 Python 中的示例代码:

    import numpy as np
    import numpy.linalg as npla
    
    def midpoint_triangulate(x, cam):
        """
        Args:
            x:   Set of 2D points in homogeneous coords, (3 x n) matrix
            cam: Collection of n objects, each containing member variables
                     cam.P - 3x4 camera matrix
                     cam.R - 3x3 rotation matrix
                     cam.T - 3x1 translation matrix
        Returns:
            midpoint: 3D point in homogeneous coords, (4 x 1) matrix
        """
    
        n = len(cam)                                         # No. of cameras
    
        I = np.eye(3)                                        # 3x3 identity matrix
        A = np.zeros((3,n))
        B = np.zeros((3,n))
        sigma2 = np.zeros((3,1))
    
        for i in range(n):
            a = -np.transpose(cam[i].R).dot(cam[i].T)        # ith camera position
            A[:,i,None] = a
    
            b = npla.pinv(cam[i].P).dot(x[:,i])              # Directional vector
            b = b / b[3]
            b = b[:3,None] - a
            b = b / npla.norm(b)
            B[:,i,None] = b
    
            sigma2 = sigma2 + b.dot(b.T.dot(a))
    
        C = (n * I) - B.dot(B.T)
        Cinv = npla.inv(C)
        sigma1 = np.sum(A, axis=1)[:,None]
        m1 = I + B.dot(np.transpose(B).dot(Cinv))
        m2 = Cinv.dot(sigma2)
    
        midpoint = (1/n) * m1.dot(sigma1) - m2        
        return np.vstack((midpoint, 1))
    

    【讨论】:

      猜你喜欢
      • 2013-03-19
      • 1970-01-01
      • 2018-11-26
      • 2021-05-27
      • 2020-08-05
      • 2017-07-12
      • 2016-04-15
      • 2021-05-14
      • 1970-01-01
      相关资源
      最近更新 更多