facedetect.py not working for me . (Bug #4296)


Added by Bismoy Murasing almost 10 years ago. Updated almost 10 years ago.


Status:Done Start date:2015-04-25
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:python bindings
Target version:3.0
Affected version:branch 'master' (3.0-dev) Operating System:Mac OSX
Difficulty: HW Platform:x64
Pull request:

Description

I am using Mac OS . Tried running this way and got the following error .

BISMOYs-MacBook-Air:python2 bismoymurasing$ python facedetect.py

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

Traceback (most recent call last):
File "facedetect.py", line 59, in <module>
draw_str(vis, (20, 20), 'time: %.1f ms' % (dt*1000))
File "/Users/bismoymurasing/Desktop/opencv/samples/python2/common.py", line 74, 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'
Cleaned up camera.


History

Updated by Philip L almost 10 years ago

unrolling the problem again since we have previous reports of this. I will look into this

Updated by be rak almost 10 years ago

are you really using opencv3.0 ?

please check with `print cv2.__version__`

Updated by Philip L almost 10 years ago

with current master branch i have no problems with this sample pls check beraks comment

Updated by Vadim Pisarevsky almost 10 years ago

  • Priority changed from High to Normal
  • Category set to python bindings

Updated by Maksim Shabunin almost 10 years ago

  • Target version set to 3.0

Updated by Vadim Pisarevsky almost 10 years ago

the following code:
"import cv2
print cv2.LINE_AA"

works for me with the latest 3.0-pre and prints 16. I believe, the problem should be solved now

  • Status changed from Open to Done

Also available in: Atom PDF