landmarks.py 文件源码

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

项目:icyface_api 作者: bupticybee 项目源码 文件源码
def get_landmarks(self,img,box=None,left=None,top=None,right=None,bottom=None):
        if box is not None:
            left,top,right,bottom = box
        left = np.long(left)
        top = np.long(top)
        right = np.long(right)
        bottom = np.long(bottom)
        bb = dlib.rectangle(left,top,right,bottom)
        landmarks = self.align_tool.findLandmarks(img,bb)
        npLandmarks = np.float32(landmarks)
        npLandmarkIndices = np.array(self.landmarkIndices)
        return npLandmarks[npLandmarkIndices]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号