Giter VIP home page Giter VIP logo

Comments (4)

iancharnas avatar iancharnas commented on August 17, 2024 1

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.

from depthai_blazepose.

geaxgx avatar geaxgx commented on August 17, 2024

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 ?

from depthai_blazepose.

iancharnas avatar iancharnas commented on August 17, 2024

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 ?

from depthai_blazepose.

geaxgx avatar geaxgx commented on August 17, 2024

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 ?

from depthai_blazepose.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.