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.

On Windows

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>in
  • Visual Studio or Visual C++ Express: <unzip_destination>inRelease

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.

On Mac, Ubuntu, and other Unix-like systems

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:

  • Mac with MacPorts: /opt/local/bin
  • Mac with Homebrew: /opt/local/bin or /opt/local/sbin
  • Ubuntu with Apt: /usr/bin
  • Ubuntu with my custom installation script: /usr/local/bin
  • Other Unix-like systems: /usr/bin and /usr/local/bin

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.

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

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