util.py 文件源码

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

项目:crossingNet 作者: melonwan 项目源码 文件源码
def saveAnnotatedSample(self, path):
        skel2 = self.crop2D()
        skel2 = skel2.reshape(-1, 3)
        for i, pt in enumerate(skel2):
            skel2[i] = Camera.to2D(pt)
        print 'current camera option={}'.format(Camera.focal_x)

        skel = self.skel
        skel.shape = (-1,3)

        dm = self.norm_dm.copy()
        dm[dm == Camera.far_point] = 0
        ax = fig.add_subplot(121)
        img = dm.copy() 
        img = img - img.min()
        img *= 255/img.max()
        for pt in skel2:
            cv2.circle(img, (pt[0], pt[1]), 2, (255,0,0), -1)
        cv2.imwrite(path, img)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号