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

Installing Pygame


Let's assume that we already have Python set up according to one of the approaches described in Chapter 1, Setting up OpenCV. Depending on our existing setup, we can install Pygame in one of the following ways:

  • Windows with 32-bit Python: Download and install Pygame 1.9.1 from http://pygame.org/ftp/pygame-1.9.1.win32-py2.7.msi.

  • Windows with 64-bit Python: Download and install Pygame 1.9.2 preview from http://www.lfd.uci.edu/~gohlke/pythonlibs/2k2kdosm/pygame-1.9.2pre.win-amd64-py2.7.exe.

  • Mac with Macports: Open Terminal and run the following command:

    $ sudo port install py27-game
    
  • Mac with Homebrew: Open Terminal and run the following commands to install Pygame's dependencies and, then, Pygame itself:

    $ brew install sdl sdl_image sdl_mixer sdl_ttf smpeg portmidi
    $ /usr/local/share/python/pip install \
    > hg+http://bitbucket.org/pygame/pygame
    
  • Ubuntu and its derivatives: Open Terminal and run the following command:

    $ sudo apt-get install python-pygame
    
  • Other Unix-like systems: Pygame is available in the standard repositories of many systems. Typical package names include pygame, pygame27, py-game, py27-game, python-pygame, and python27-pygame.

Now, Pygame should be ready for use.