Book Image

OpenCV Computer Vision with Python

By : Joseph Howse
Book Image

OpenCV Computer Vision with Python

By: Joseph Howse

Overview of this book

<p>OpenCV Computer Vision with Python shows you how to use the Python bindings for OpenCV. By following clear and concise examples, you will develop a computer vision application that tracks faces in live video and applies special effects to them. If you have always wanted to learn which version of these bindings to use, how to integrate with cross-platform Kinect drivers, and how to efficiently process image data with NumPy and SciPy, then this book is for you.</p> <p>This book has practical, project-based tutorials for Python developers and hobbyists who want to get started with computer vision with OpenCV and Python. It is a hands-on guide that covers the fundamental tasks of computer vision, capturing, filtering, and analyzing images, with step-by-step instructions for writing both an application and reusable library classes.</p>
Table of Contents (14 chapters)
OpenCV Computer Vision with Python
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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

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.