I have been having the exact same problem as described in this post and someone in the answers suggested that you upgrade to opencv version 2.9. I was wondering how do that? I installed the version I have now by doing
sudo apt-get install python-opencv
Also, how can I check what version I'm running now? I'm on Ubuntu 13.10
EDIT:
After girardengo answer I know I'm on version 2.4.5 Thank you for that!