Finding the training executables

To automate cascade training as much as possible, OpenCV provides two executables. Their names and locations depend on the operating system and the particular setup of OpenCV, as described in the following two sections.

The two executables on Windows are called ONopencv_createsamples.exe and ONopencv_traincascade.exe. They are not prebuilt. Rather, they are present only if you compiled OpenCV from source. Their parent folder is one of the following, depending on the compilation approach you chose in Chapter 1, Setting up OpenCV:

  • MinGW: <unzip_destination>\bin
  • Visual Studio or Visual C++ Express: <unzip_destination>\bin\Release

If you want to add the executables' folder to the system's Path variable, refer back to the instructions in the information box in the Making the choice on Windows XP, Windows Vista, Windows 7, and Windows 8 section of Chapter 1, Setting up OpenCV. Otherwise, take note of the executables' full path because we will need to use it in running them.

The two executables on Mac, Ubuntu, and other Unix-like systems are called opencv_createsamples and opencv_traincascade. Their parent folder is one of the following, depending on your system and the approach that you chose in Chapter 1, Setting up OpenCV:

Except in the case of Mac with Homebrew, the executables' folder should be in PATH by default. For Homebrew, if you want to add the relevant folders to PATH, see the instructions in the second step of the Using Homebrew with ready-made packages (no support for depth cameras) section of Chapter 1, Setting up OpenCV. Otherwise, note the executables' full path because we will need to use it in running them.