nail.py 文件源码

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

项目:Virtual-Makeup 作者: srivatsan-ramesh 项目源码 文件源码
def get_boundary_points(x, y):
    tck, u = interpolate.splprep([x, y], s=0, per=1)
    unew = np.linspace(u.min(), u.max(), 1000)
    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 np.array(coord[:, 0], dtype=np.int32), np.array(coord[:, 1], dtype=np.int32)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号