joeVenner / control-3d-character-using-python

Controlling 3D character's Face Movements using OpenCV and pyhton
MIT License
162 stars 46 forks source link

"Bad Argument" problem with "OpenCVAnimOperator". #10

Open ghost opened 2 years ago

ghost commented 2 years ago

The error I get is as follows: Python: Traceback (most recent call last): File "E:\12 - PROYECTOS BLENDER\Profesor\Profesor02.blend\OpenCVAnimOperator.py", line 196, in modal cv2.error: OpenCV(4.5.3) :-1: error: (-5:Bad argument) in function 'circle'

Overload resolution failed:

  • Can't parse 'center'. Sequence item with index 0 has a wrong type
  • Can't parse 'center'. Sequence item with index 0 has a wrong type

location: :-1

I have done everything that needed to be done, following a video on Youtube. And I keep getting this error

joeVenner commented 2 years ago

Hi Chema,

The aboce error is coming from providing to the CV2 circle function a non int data type as it accepts only int data type.

Try to look for this function in the line 198 and make sure its int(x) & int(y) same as the below :

cv2.circle(image, (int(x), int(y)), 2, (0, 255, 255), -1)

or just clone the last update from the github repo.

Thanks,