Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

python sample script error : AttributeError: 'module' object has no attribute 'LINE_AA' (OpenCV 3.1, python 2.7.9)

Hi, posting the content below. Executed, as python facedetect.py in sample scripts of opencv version 3.1:

face detection using haar cascades

USAGE: facedetect.py [--cascade <cascade_fn>] [--nested-cascade <cascade_fn>] [<video_source>]

Traceback (most recent call last): File "facedetect.py", line 68, in <module> draw_str(vis, (20, 20), 'time: %.1f ms' % (dt*1000)) File "/media/bhargav/Bhargav_WD1/temp_dir/home_bhargav/OpenCV/samples/python/common.py", line 83, in draw_str cv2.putText(dst, s, (x+1, y+1), cv2.FONT_HERSHEY_PLAIN, 1.0, (0, 0, 0), thickness = 2, lineType=cv2.LINE_AA) AttributeError: 'module' object has no attribute 'LINE_AA'

Kindly help. Thanks in advance.