PerspectiveCorrection.py 文件源码

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

项目:imgProcessor 作者: radjkarl 项目源码 文件源码
def depthMap(self, midpointdepth=None, pose=None):
        shape = self.opts['shape']
        if pose is None:
            pose = self.pose()
        t, r = pose

        n = self.planeSfN(r)
        # z component from plane-equation solved for z:
        zpart = np.fromfunction(lambda y, x: (-n[0] * x
                                              - n[1] * y) / (
            -n[2]), shape)

        ox, oy = self.objCenter()
        v = zpart[int(oy), int(ox)]

        if midpointdepth is None:
            # TODO: review
            midpointdepth = t[2, 0]

        zpart += midpointdepth - v
        return zpart
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号