Reputation: 388
I am using the code mentioned in the link :
OpenCV detect face landmarks (ear-chin-ear line)
I executed it on Anaconda Python3.5 using opencv3 and dlib but I get the following error :
rect=dlib.rectangle(x,y,x+w,y+h) which is Boost.Python.ArgumentError: Python argument types in rectangle.__init__(rectangle, numpy.int32, numpy.int32, numpy.int32, numpy.int32) did not match C++ signature: __init__(_object*, long left, long top, long right, long bottom) __init__(_object*)
I changed the type of the parameters using :
x,y,w,h =rects[0].astype('long')
But the same error persists. Kindly help.
Upvotes: 0
Views: 1716
Reputation: 4791
Dlib comes with complete example programs that show how to do this. You should refer to that code since it's correct: http://dlib.net/face_recognition.py.html
Also, here are other python example programs. They all run correctly: https://github.com/davisking/dlib/tree/master/python_examples
Upvotes: 1