Modifying the application

Let's modify the cameo.py file to use PygameWindowManager instead of WindowManager. Find the following line in cameo.py:

from managers import WindowManager, CaptureManager

Replace it with:

from managers import PygameWindowManager as WindowManager, \
                     CaptureManager

That's all! Now cameo.py uses a Pygame window that should close when the standard Close button is clicked.

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.