onionstack.py 文件源码

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

项目:onionstack 作者: ntddk 项目源码 文件源码
def repaint_skin(filename):
    import cv2
    shutil.copy(filename, filename + '.bak')
    frame = cv2.imread(filename)
    HSV = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)
    l = np.array([0, 50, 80], dtype = "uint8")
    u = np.array([23, 255, 255], dtype = "uint8")
    skin_area = cv2.inRange(HSV, l, u)
    not_skin_area = cv2.bitwise_not(frame, frame, mask = skin_area)
    cv2.imwrite(filename, not_skin_area)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号