AttributeError: 'module' object has no attribute 'CV_GUI_NORMAL'

asked 2015-03-03 09:14:12 -0600

begueradj gravatar image

updated 2015-03-03 09:14:30 -0600

I'm coding using Python and OpenCV on Ubuntu 14.04. When I click on the right button of the mouse, the associated mouse event cv2.EVENT_RBUTTONDOWN does not work and I rather get context menu ("actions"). Is there a way to disable the context menu popup?

I tried the solution to this question however when I run: cv2.namedWindow("Window",cv2.CV_GUI_NORAM') I get this error:

AttributeError: 'module' object has no attribute 'CV_GUI_NORMAL'

How to fix this ?

Begueradj

edit retag flag offensive close merge delete

Comments

Hmm for a starter you could build without Qt support if you do not need it. It seems to do more harm than good in many cases. This topic shows a possible solution when you want to keep all other Qt functionality.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-03-03 09:18:10 -0600 )edit

@StevenPuttemans thank you, i read that question before asking, I installed OpenCV by default (apt-get install). I do not want to modify the source code of opencv (may be it will cause me a problem later)

begueradj gravatar imagebegueradj ( 2015-03-03 09:24:59 -0600 )edit