synth_utils.py 文件源码

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

项目:SynthText 作者: ankush-me 项目源码 文件源码
def plane2xyz(center, ij, plane):
        """
        converts image pixel indices to xyz on the PLANE.

        center : 2-tuple
        ij : nx2 int array
        plane : 4-tuple

        return nx3 array.
        """
        ij = np.atleast_2d(ij)
        n = ij.shape[0]
        ij = ij.astype('float')
        xy_ray = (ij-center[None,:]) / DepthCamera.f
        z = -plane[2]/(xy_ray.dot(plane[:2])+plane[3])
        xyz = np.c_[xy_ray, np.ones(n)] * z[:,None]
        return xyz
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号