Package: pykinect-azure
pyKinectAzurePython 3 library for the Azure Kinect DK sensor-SDK.Similar solutionsPart of the ideas in this repository are taken from following repositories:pyk4a: Really nice and clean Python3 wrapper for the Kinect Azure SDK.Azure-Kinect-Python: More complete library using ctypes as in this repository, however, examples about how to use the library are missing and the library is harder to use.The objective of this repository is to combine the strong points of both repositories by creating a easy to use library that allows the use of most of the functions of the Kinect Azure. Also, to create sample programs to showcase the uses of the libraryPrerequisitesAzure-Kinect-Sensor-SDK: required to build this library.
To use the SDK, refer to the installation instructionshere.ctypes: required to read the library.numpy: required for the matrix calculationsopencv-python: Required for the image transformations and visualization.Installationpip install pykinect_azureHow to use this libraryThe library hasbeen tested in Windows 10 and Ubuntu 20.04with the Kinect Azure SDK 1.4.0 and 1.4.1, it should also work with other operating systems.Windows:When using the pyKinectAzure class, it requires thepath to the k4a.dll module, make sure that the path is the correct one for your Kinect Azure SDK version. By default the path (module_path) is set toC:\\Program Files\\Azure Kinect SDK v1.4.0\\sdk\\windows-desktop\\amd64\\release\\bin\\k4a.dll.Linux:When using the pyKinectAzure class, it requires thepath to the k4a.so module, make sure that the path is the correct one for your Kinect Azure SDK version. When using Linux setmodule_pathto/usr/lib/x86_64-linux-gnu/libk4a.so, please follow theinstructionfrom microsoft to install the right packages.Nvidia Jetson:When using the pyKinectAzure class, it requires thepath to the k4a.so module, make sure that the path is the correct one for your Kinect Azure SDK version. When using Nvidia Jetson setmodule_pathto to'/usr/lib/aarch64-linux-gnu/libk4a.so', please follow theinstructionfrom microsoft to install the right packages.ThepyKinectAzureclass is a wrapper around the_k4a.pymodule to make the library more understandable. However, thepyKinectAzureclass still contains few methods from the Kinect Azure SDKThe_k4a.pymodule already contains all the methods in the Kinect Azure SDK. So, for more advanced of the Kinect Azure SDK check the_k4a.pymodule.ExamplesFor an example on how to obtain and visualize the depth data from the Azure Kinect DK check theexampleDepthImageOpenCV.pyscript.git clone https://github.com/ibaiGorordo/pyKinectAzure.git
cd pyKinectAzure/examples
python exampleDepthImageOpenCV.pyAlso, there is an example to obtain and visualize the smooth depth from the Azure Kinect DK check theexampleSmoothDepthImageOpenCV.pyscript.python exampleSmoothDepthImageOpenCV.pynote: when you are dealing on the linux platform, please insure that the user have permission to the usb devices, or always execute under the root permission by addingsudoahead.ContributionFeel free to send pull requests.Bug reports are also appreciated. Please include as much details as possible.TODO:Wrappers for the Kinect Azure dataCreate wrapper to read depth images.Create wrapper to read Infrared images.Create wrapper to read IMU data.Create function to convert image buffer to image depending on the image type.Create wrapper to transform depth image to color image.Create wrapper to transform depth image to 3D point cloud.Create funtion to visualize 3D point cloud.Create examplesExample to visualize depth images.Example to visualize passive IR images.Example to plot IMU data.Example to visualize Depth as color image.Example to overlay depth color with alpha over real image.Example to visualize 3D point cloudBody trackingCreate library for the body tracking SDK similar the same way as the current library.Combine image and skeleton data.Generate 3D skeleton visualization.Future ideasRun Deep Learning models on Kinect data (Openpose 3D skeleton, semantic segmentation with depth, monocular depth estimation validation)Track passive infrared marker for motion capture analysis