Closed iancharnas closed 3 years ago
Hi, The RuntimeWarning is just a warning and have no impact. I get this warning too.
The TypeError is very strange, since the thickness is set to 2 in the line of code.
Can you replace:
cv2.rectangle(self.frame, body.xyz_zone[0:2], body.xyz_zone[2:4], (180,0,180), 2)
by:
cv2.rectangle(self.frame, body.xyz_zone[0:2], body.xyz_zone[2:4], (180,0,180), thickness=2)
and see if you still get the error ?
Hi, thanks for the quick reply!
I tried your suggestion but got this error:
TypeError: argument for rectangle() given by name ('thickness') and position (4)
Out of curiosity I also tried adding a debug line: print(body.xyz_zone)
and it printed [322, 479, 350, 507]
, so maybe the problem is that the body.xyz_zone[2:4]
slice went out of bounds of the array ?
A list of 4 integers like [322, 479, 350, 507] is what is expected.
But after surfing a bit, it seems that some people getting the same type of error solved it by using tuple.
Can you try:
cv2.rectangle(self.frame, tuple(body.xyz_zone[0:2]), tuple(body.xyz_zone[2:4]), (180,0,180), 2)
?
What is your version of OpenCv ? On which OS ?
Yes! Putting those inside tuple() calls worked! I'm having lots of fun playing around with this. Thank you for your help and your great work.
Hello @geaxgx and thank you so much for this terrific software! I have been able to get depthai_blazepose to work in many modes with my OAK-D camera. For example when I run python
demo.py --edge --lm_m='lite'
I see 26 FPS which is awesome!However, I really want to be able to see the xyz coordinates, however when I run
python demo.py --xyz
I get several errors (see below) including a RuntimeWarning and a TypeError, and the program quits. Am I doing something wrong?