microsoft / Azure_Kinect_ROS_Driver

A ROS sensor driver for the Azure Kinect Developer Kit.
MIT License
304 stars 226 forks source link

Is it possible to convert 1024x1024 depth image into a 1024x1024x3 point cloud? #252

Closed JeffR1992 closed 2 years ago

JeffR1992 commented 2 years ago

I'm running a series of experiments with the Azure Kinect at a depth resolution of 1024x1024, and am trying to figure out if it's possible to convert a 1024x1024 depth image into an 1024x1024x3 point cloud. That is, I'd like to convert each pixel in the 1024x1024 depth image from an depth/range into an XYZ position.

Alternatively, if the above is not possible, is it possible to convert a PointCloud2 message into a 1024x1024x3 numpy array?

Any help would be appreciated. Thanks!

ooeygui commented 2 years ago

Hi there, You should be able to leverage ros_numpy for converting a pointcloud to numpy - https://pypi.org/project/numpy-ros/. your python node should subscribe to the depth array and use this python extension to convert.

Good luck!