importers.py 文件源码

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

项目:semi-auto-anno 作者: moberweger 项目源码 文件源码
def visibilityTest(dpt, loc, tol=2.):
        """
        z-buffer like visibility test for non-occluded joints
        :param dpt: depth image
        :param loc: 2D joint locations
        :param tol: tolerance
        :return: list of indices of visible ie non-occluded joints
        """
        vis = []
        for i in range(loc.shape[0]):
            y = np.rint(loc[i, 1]).astype(int)
            x = np.rint(loc[i, 0]).astype(int)
            if 0 <= x < dpt.shape[1] and 0 <= y < dpt.shape[0]:
                if np.fabs(dpt[y, x] - loc[i, 2]) < tol:
                    vis.append(i)
                # else:
                #     print("joint {}: dpt {} anno {}".format(i, dpt[y, x], gtcrop[i, 2]))

        return vis
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号