face_detector.py 文件源码

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

项目:key-face 作者: gabrielilharco 项目源码 文件源码
def __init__(self, haarCascadeFilePath, videoCapture):
        try:
            self.faceCascade = cv2.CascadeClassifier(haarCascadeFilePath)
        except:
            raise Exception("Error creating haar cascade classifier. Are you sure file " + haarCascadeFilePath + " exists?")
        self.videoCapture = videoCapture
        self.foundFace = False
        self.trackedFace = None
        self.trackedFaceROI = None
        self.templateMatchingStartTime = cv2.getTickCount()
        self.templateMatchingCurrentTime = cv2.getTickCount()
        self.isTemplateMatchingRunning = False
        self.img = None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号