passportRecognizeNew.py 文件源码

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

项目:pytesseractID 作者: iChenwin 项目源码 文件源码
def getDarkColorPercent(image):
    height = np.size(image, 0)
    width = np.size(image, 1)
    imgSize = width * height
    result = cv2.threshold(image, 100, -1, cv2.THRESH_TOZERO)[1]
    nonzero = cv2.countNonZero(result)
    if nonzero > 0:
        return (imgSize - nonzero) / float(imgSize)
    else:
        return 0

# ???????
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号