warpFace.py 文件源码

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

项目:FaceAnalysis 作者: ElliotSalisbury 项目源码 文件源码
def applyAffineTransform(src, srcTri, dstTri, dst) :
    # Given a pair of triangles, find the affine transform.
    warpMat = cv2.getAffineTransform(np.float32(srcTri), np.float32(dstTri))

    # Apply the Affine Transform just found to the src image

    dst = cv2.warpAffine(src, warpMat, (dst.shape[1], dst.shape[0]), None, flags=cv2.INTER_LINEAR, borderMode=cv2.BORDER_REFLECT_101)

    return dst

# Warps and alpha blends triangular regions from img1 and img2 to img
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号