天天看点

OpenCV中的级联分类器Cascade Classifier(面部识别) OpenCV中的级联分类器Cascade Classifier

in this tutorial you will learn how to:

to detect objects in a video stream. particularly, we will use the functions:

load a .xml classifier file. it can be either a haar or a lbp classifer

perform the detection.

<a target="_blank" href="http://coyee.com/article/translate/10226-opencv-cascade-classifier?section=1">翻译此段</a>

here is the result of running the code above and using as input the video stream of a build-in webcam:

OpenCV中的级联分类器Cascade Classifier(面部识别) OpenCV中的级联分类器Cascade Classifier

remember to copy the files haarcascade_frontalface_alt.xml and haarcascade_eye_tree_eyeglasses.xml in your current directory. they are located in opencv/data/haarcascades

this is the result of using the file lbpcascade_frontalface.xml (lbp trained) for the face detection. for the eyes we keep using the file used in the tutorial.

OpenCV中的级联分类器Cascade Classifier(面部识别) OpenCV中的级联分类器Cascade Classifier

继续阅读