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.

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:

Now, Pygame should be ready for use.