Getting Haar cascade data

Once you have a copy of the source code of OpenCV 3, you will find a folder, data/haarcascades.

This folder contains all the XML files used by the OpenCV face detection engine to detect faces in still images, videos, and camera feeds.

Once you find haarcascades, create a directory for your project; in this folder, create a subfolder called cascades, and copy the following files from haarcascades into cascades:

haarcascade_profileface.xml
haarcascade_righteye_2splits.xml
haarcascade_russian_plate_number.xml
haarcascade_smile.xml
haarcascade_upperbody.xml

As their names suggest, these cascades are for tracking faces, eyes, noses, and mouths. They require a frontal, upright view of the subject. We will use them later when building a face detector. If you are curious about how these data sets are generated, refer to Appendix B, Generating Haar Cascades for Custom Targets, OpenCV Computer Vision with Python. With a lot of patience and a powerful computer, you can make your own cascades and train them for various types of objects.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.41.205