Ask Your Question

'cv2' has no attribute 'CV_HOUGH_GRADIENT'

asked 2017-11-03 11:16:40 -0500

yosh123 gravatar image

How can i solve this problem? it is saying cv2 has no attribute called CV_HOUGH_GRADIENT. I already tried to import as cv and that didnt work to.

edit retag flag offensive close merge delete



opencv version ?

berak gravatar imageberak ( 2017-11-03 11:19:18 -0500 )edit

the version is 3.3.1

yosh123 gravatar imageyosh123 ( 2017-11-03 11:34:51 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-11-03 11:39:52 -0500

berak gravatar image

updated 2017-11-03 11:44:24 -0500

the CV_ prefix has been removed with opencv3, and all constants are in the cv2 submodule now

also was removed entirely.

what you want is simply:


in the future, try to do a :

>>> help(cv2)

press space, until you reach the bottom (LOOONG list), the constants are all at the end of it

edit flag offensive delete link more


thanks it worked

yosh123 gravatar imageyosh123 ( 2017-11-03 11:46:00 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-11-03 11:16:40 -0500

Seen: 6,838 times

Last updated: Nov 03 '17