Creating the training sets and cascade

Hereafter, we will refer to the two executables as <opencv_createsamples> and <opencv_traincascade>. Remember to substitute the path and filename that are appropriate to your system and setup.

These executables have certain data files as inputs and outputs. Following is a typical approach to generating these data files:

  1. Manually create a text file that describes the set of negative training images. We will refer to this file as <negative_description>.
  2. Manually create a text file that describes the set of positive training images. We will refer to this file as <positive_description>.
  3. Run <opencv_createsamples> with <negative_description> and <positive_description> as arguments. The executable creates a binary ...

Get OpenCV: Computer Vision Projects with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.