<cascade>
is an XML file that is compatible with the constructor for OpenCV's CascadeClassifier
class. For
an example of how to use CascadeClassifier
, refer back to our implementation of FaceTracker
in Chapter 4, Tracking Faces with Haar Cascades. By copying and modifying FaceTracker
and Cameo
, you should be able to create a simple test application that draws rectangles around tracked instances of your custom target.
Perhaps in your first attempts at cascade training, you will not get reliable tracking results. To improve your training results, do the following:
bald, shaven, male face without glasses
cascade might be easier to train than a general face
cascade. Later, as your results improve, you can try to expand your problem again.<negative_description>
contains all the negative training images and only the negative training images.<positive_description>
contains all the positive training images and only the positive training images.<positive_description>
are accurate.<opencv_createsamples>
and <opencv_traincascade>
. The flags are described in the official documentation at http://docs.opencv.org/doc/user_guide/ug_traincascade.html.Good luck and good image-hunting!