Ask Your Question
0

'cv2' has no attribute 'CV_HOUGH_GRADIENT'

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

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 cv2.cv as cv and that didnt work to.

edit retag flag offensive close merge delete

Comments

1

opencv version ?

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

the version is 3.3.1

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

1 answer

Sort by ยป oldest newest most voted
2

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

berak gravatar image

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

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

also cv2.cv was removed entirely.

what you want is simply:

cv2.HOUGH_GRADIENT

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

Comments

thanks it worked

yosh123 gravatar imageyosh123 ( 2017-11-03 11:46:00 -0600 )edit

Question Tools

1 follower

Stats

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

Seen: 11,868 times

Last updated: Nov 03 '17