AttributeError: 'module' object has no attribute 'logPolar' opencv3.0

1.3k views Asked by At

I am trying to run opencv3.0 demos (./opencv/sources/samples/python2) and some of the functions are returning:

AttributeError: 'module' object has no attribute" one os them was 'LINE_AA' for facedetect.py and houghlines.py.

In these cases I have just removed LINE_AA from the call, and it worked fine.

Before:

cv2.putText(dst, s, (x+1, y+1), cv2.FONT_HERSHEY_PLAIN, 1.0, (0, 0, 0), thickness = 2, lineType=cv2.LINE_AA)

cv2.putText(dst, s, (x, y), cv2.FONT_HERSHEY_PLAIN, 1.0, (255, 255, 255), lineType=cv2.LINE_AA)

After:

cv2.putText(dst, s, (x+1, y+1), cv2.FONT_HERSHEY_PLAIN, 1.0, (0, 0, 0), thickness = 2)

cv2.putText(dst, s, (x, y), cv2.FONT_HERSHEY_PLAIN, 1.0, (255, 255, 255))

Although, for logpolar.py I am also getting:

Traceback (most recent call last):

File "logpolar.py", line 16, in <module>
img2 = cv2.logPolar(img, (img.shape[0]/2, img.shape[1]/2), 40, cv2.WARP_FILL_OUTLIERS)
AttributeError: 'module' object has no attribute 'logPolar'

In this case I am not sure what I should do.

Thanks in advance!

0

There are 0 answers