Book Image

Learning OpenCV 3 Computer Vision with Python (Update)

Book Image

Learning OpenCV 3 Computer Vision with Python (Update)

Overview of this book

Table of Contents (16 chapters)
Learning OpenCV 3 Computer Vision with Python Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
6
Retrieving Images and Searching Using Image Descriptors
Index

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...