Skip to content
This repository was archived by the owner on Aug 22, 2024. It is now read-only.

Conversation

@JonathanESantos
Copy link
Contributor

@JonathanESantos JonathanESantos commented Apr 14, 2021

Fixes #1556

Description of the changes:

  • The transformation.depth_image_to_point_cloud() function incorrectly used uint16 instead of int16 to create a point cloud. The X and Y images are centered around 0 so they can take on negative values.
  • Added example code point_cloud_capture.py as an example to capture point cloud and write to a text file.

Before submitting a Pull Request:

I tested changes on:

  • Windows
  • Linux
  • Python automated unit tests
  • Python automated functional_fast tests

AntonClaytonBursch and others added 30 commits April 13, 2021 17:14
… count functions, refactored k4astaticimageproperties
…t not being able to convert from float to enum, and in tools/k4aviewer/k4arecordingdockcontrol.cpp about mismatched signed/unsigned comparison.

The rest of the changes are formatting enforced by clang with the command line command "ninja clangformat". The command line build enforces this step before building.

Fixed Bug 5456.
JonathanESantos and others added 29 commits April 13, 2021 17:14
…get_color_mode(), k4a_get_depth_mode(), and k4a_get_fps_mode(). The parameter into these functions are the mode_index, not the mode_id.
…etting the desired fps_mode. Previously it defaulted to 30 fps, but because there is a default 0 FPS case that is added to the enum, the user now has to explicitly set the desired fps.
…on of variable names starting with underscore followed by underscore or capital letter as reserved for implementation and library.
…ll, which makes it more obvious what the intent is rather than a simple cast.
…t users have direct access to the bitmap of capabilities.
…r file to consolidate the multiple definitions in various files into one file.
…n compilation unit and static library. This static library should only be used internally; external tools should use the k4a API.

There is one notable place where an external tool uses this backdoor approach to get mode information: the recorder and playback. This is because the information saved in a matroska file consists only of the mode ids and not the full mode info struct. Upon playback, the mode info struct is reconstructed without the presence of a device by using this backdoor approach using k4ainternal/modes.h rather than through k4a/k4a.h. The consequence of this is that it is tied to Azure Kinect modes and will not work for other devices that have different modes. The optimal solution is to save the full mode info structs in the matroska file and reconstructed upon reading.
…o_t field was changed from uint32_t to a union, and when k4ainternal/modes.h implementation was put in its own library unit.
…16 when it should be using int16 because the X and Y coordinates are centered around 0 and can take on negative values.

Adding example code point_cloud_capture.py for an example of writing point cloud to text file. The text file can then be opened in a 3D modeling application like MeshLab.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python API doesn't transform correctly to point cloud from depth image

2 participants