blending_images_mask5.py 文件源码

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

项目:python-opencv2 作者: bunkahle 项目源码 文件源码
def find_contours(img):
    img1 = cv2.bitwise_not(img)
    imgray = cv2.cvtColor(img1 ,cv2.COLOR_BGR2GRAY)
    ret, thresh = cv2.threshold(imgray,127,255,0)
    contours, hierarchy = cv2.findContours(thresh, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
    img_cont = img1.copy()
    cv2.drawContours(img_cont, contours, -1, (255,255,255), -1)
    return img_cont
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号