imgproc.py 文件源码

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

项目:Cerebrum 作者: tyler-cromwell 项目源码 文件源码
def preprocess(frame, width, height, x, y, w, h):
    """
    Preprocesses an image for Face Recognition
    """
    cropped = frame[y: y+h, x: x+w]
    grayed = cv2.cvtColor(cropped, cv2.COLOR_BGR2GRAY)
    resized = cv2.resize(grayed, (width, height))
    equalized = cv2.equalizeHist(resized)
    filtered = cv2.bilateralFilter(equalized, 5, 60, 60)
    return filtered
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号