Hi,
Hmmm, your output definitely looks weird. This is what you got from running
>>> python chapter4.py
??
When I run the latest code on Windows 8.1 with OpenCV 2.4.12 and Python 2.7.11 I get the same output as shown in the book.
Can you tell me what platform / OpenCV version / Python version you're using?
Thanks,
Michael