foundation.py 文件源码

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

项目:Virtual-Makeup 作者: badarsh2 项目源码 文件源码
def getBoundaryPoints(x , y):
    tck,u = interpolate.splprep([x, y], s=0, per=1)
    unew = np.linspace(u.min(), u.max(), 10000)
    xnew,ynew = interpolate.splev(unew, tck, der=0)
    tup = c_[xnew.astype(int),ynew.astype(int)].tolist()
    coord = list(set(tuple(map(tuple, tup))))
    coord = np.array([list(elem) for elem in coord])
    return coord[:,0],coord[:,1]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号