Example from OpenCV Computer Vision with Python