Appendix A. Integrating with Pygame
This appendix shows how to set up the Pygame library and how to use Pygame for window management in an OpenCV application. Also, the appendix gives an overview of Pygame's other functionality and some resources for learning Pygame.
Note
All the finished code for this chapter can be downloaded from my website: http://nummist.com/opencv/3923_06.zip.
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: ...
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.