Git Product home page Git Product logo

Comments (1)

iscsrl avatar iscsrl commented on July 19, 2024

I ended up uderstanding how to fix it.
First there is a litle bug in the depth.numpy function. The correct one is:

case k4a_image_format_t::K4A_IMAGE_FORMAT_DEPTH16:
case k4a_image_format_t::K4A_IMAGE_FORMAT_IR16:
   return py::array(
       py::buffer_info(
           _image.get_buffer(),
           sizeof(unsigned short int),
           py::format_descriptor<unsigned short int>::format(),
           2,
           {_image.get_height_pixels(), _image.get_width_pixels()},
           {
               sizeof(unsigned short int) * _image.get_width_pixels(),
               sizeof(unsigned short int)
           }
       )
   );

You should change the following line:
sizeof(unsigned short int) * _image.get_height_pixels(),
to:
sizeof(unsigned short int) * _image.get_width_pixels(),

And you should add to your example following:

depth = transformation.depth_image_to_color_camera(depth)
depth_color = transformation.depth_image_colorize_numpy(depth, config.depth_mode)

depth = depth.numpy()

Could you please provide the fixes and publish again the lib on PyPi?

Thank you in advance.

from k4a-python.

Related Issues (2)

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.