camera.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:car-detection 作者: mmetcalfe 项目源码 文件源码
def unproject(self, u):
        # K, R, t = camera.factor()

        # squareProj = np.row_stack((
        #     camera.P,
        #     np.array([0,0,0,1], np.float32)
        # ))
        # invProj = np.linalg.inv(squareProj)
        # x = invProj*np.row_stack([np.mat(u).T, [1]])
        # x = x[:3]

        # u = np.mat(u).T
        # x = np.linalg.inv(R)*(np.linalg.inv(K)*u - t)

        proj = self.getOpenGlCameraMatrix()
        invProj = np.linalg.inv(proj)
        x = invProj*np.row_stack([np.mat(u).T, [1]])
        x = x[:3] / x[3]
        return x

    # TODO: Fix handling of camera centre.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号