brendandburns / py-k4a Goto Github PK
View Code? Open in Web Editor NEWpython libraries for the kinect for Azure
python libraries for the kinect for Azure
Hello,
Thank your for this awesome project, I was wondering if there is a strong dependency to the k4a Version, currently there is the version 1.3.0 out, however the Readme suggests that this was built on 1.2.0 - is there a major difference one should be aware of?
Has anyone tried to run this on a docker image? I'm starting this with this command :
docker run -it --rm --privileged \
-v ~/includes:/usr/include/k4a \
-v /usr/lib/aarch64-linux-gnu/libk4arecord.so:/usr/lib/aarch64-linux-gnu/libk4arecord.so \
-v /usr/lib/aarch64-linux-gnu/libk4arecord.so.1.4:/usr/lib/aarch64-linux-gnu/libk4arecord.so.1.4 \
-v /usr/lib/aarch64-linux-gnu/libk4arecord.so.1.4.0:/usr/lib/aarch64-linux-gnu/libk4arecord.so.1.4.0 \
-v /usr/lib/aarch64-linux-gnu/libk4a.so:/usr/lib/aarch64-linux-gnu/libk4a.so \
-v /usr/lib/aarch64-linux-gnu/libk4a.so.1.4:/usr/lib/aarch64-linux-gnu/libk4a.so.1.4 \
-v /usr/lib/aarch64-linux-gnu/libk4a.so.1.4.0:/usr/lib/aarch64-linux-gnu/libk4a.so.1.4.0 \
-v /usr/lib/aarch64-linux-gnu/libdepthengine.so.2.0:/usr/lib/aarch64-linux-gnu/libdepthengine.so.2.0 \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY=:0 \
tf113opencv:latest /bin/bash
and tf113opencv:latest
... works for many other things in my case. Point is that when running example.py
, I get this output :
root@df76993e312f:~/py-k4a# python3 example.py
Opened device 000211394812 (('rgb', (1, 6, 107)), ('depth', (1, 6, 78)), ('audio', (1, 6, 14)), ('depth_sensor', (6109, 7, 0)))
Fatal Python error: Segmentation fault
Thread 0x0000007f8a297010 (most recent call first):
File "example.py", line 19 in <module>
Segmentation fault (core dumped)
This runs on ubnutu on ARM64. The example runs well outside of Docker, but I would like to containerize this. Thoughts?
(KinectDK3.7) D:\InstallPath\Source\py-k4a>python example.py
Opened device 000204192912 (('rgb', (1, 6, 102)), ('depth', (1, 6, 75)), ('audio', (1, 6, 14)), ('depth_sensor', (6109, 7, 0)))
Capture: 2160 x 3840 @ 0.0
Closed
[2020-08-21 17:57:45.783] [error] [t=25180] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (118): k4a_capture_t_get_context(). Invalid k4a_capture_t 000002B26D409130
[2020-08-21 17:57:45.783] [error] [t=25180] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (295): Invalid argument to capture_dec_ref(). capture_handle (000002B26D409130) is not a valid handle of type k4a_capture_t
Windows fatal exception: access violation
Current thread 0x0000625c (most recent call first):
I noticed this doesn't have image and capture release support, which most online examples show as part of the proper way to grab images from the kinect, e.g, https://docs.microsoft.com/en-us/azure/kinect-dk/retrieve-images. (I also ran into buffer/memory overload issues when I did not use image release.)
The attached files contain the updates needed to port k4a_image_release(img) to this Python module; I also tried to implement k4a_capture_release(capture) but am not sure if it's working. Would love further input!
Followed the steps in the documentation. Getting error as follows:
capture.obj : error LNK2001: unresolved external symbol __imp_k4a_image_release
capture.obj : error LNK2001: unresolved external symbol __imp_k4a_capture_get_depth_image
capture.obj : error LNK2001: unresolved external symbol __imp_k4a_image_get_buffer
capture.obj : error LNK2001: unresolved external symbol __imp_k4a_image_get_stride_bytes
capture.obj : error LNK2001: unresolved external symbol __imp_k4a_image_get_size
capture.obj : error LNK2001: unresolved external symbol __imp_k4a_capture_release
capture.obj : error LNK2001: unresolved external symbol __imp_k4a_capture_get_ir_image
capture.obj : error LNK2001: unresolved external symbol __imp_k4a_device_get_capture
capture.obj : error LNK2001: unresolved external symbol __imp_k4a_capture_get_color_image
capture.obj : error LNK2001: unresolved external symbol __imp_k4a_image_get_height_pixels
capture.obj : error LNK2001: unresolved external symbol __imp_k4a_image_get_width_pixels
device.obj : error LNK2001: unresolved external symbol __imp_k4a_device_get_version
device.obj : error LNK2001: unresolved external symbol __imp_k4a_device_stop_cameras
device.obj : error LNK2001: unresolved external symbol __imp_k4a_device_open
device.obj : error LNK2001: unresolved external symbol __imp_k4a_device_get_serialnum
device.obj : error LNK2001: unresolved external symbol __imp_k4a_device_get_installed_count
device.obj : error LNK2001: unresolved external symbol __imp_k4a_device_close
device.obj : error LNK2001: unresolved external symbol __imp_k4a_device_start_cameras
Hello, thank you for starting this project.
I think about adding the capabilities for the recording. I noticed that in the C++ project the record functions are separated in an extra library. Before starting to putting work on this project, should the recording and playback functionalities be added into this python package or should it kept separate as in the C++ library. Something like py-k4arecord
From my point of view, it seems like that this could be implemented in one package, however I am happy to hear some other opinions.
See recording library here
Hello everyone:
I am running this on windows, and goes on to the last step "python example.py".
But it did not find k4a module.
I was also do not find k4a.pyd in SDK folder.
I guess it is because of the vision of Azure Kinect SDK . who can send k4a.pyd to me?
Hello! I am trying to build your code with Python 3.7 and Visual Studio 2017 both installed on a Windows 10 machine. I'm not an expert at compiling c-code with Python, but I'm getting an error that makes me think I might be missing a header file. See below and let me know if you have any suggestions. Thanks so much!
capture.c(3): fatal error C1083: Cannot open include file: 'k4a/k4a.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe' failed with exit status 2
Thank you for this python library for Kinect Azure.
I could run the example.py successfully. But how can I get access to the depth data? I want the depth information to further be processed by some other algorithms.
I added depth = k4a.capture_get_depth_image(capture)
and k4a.image_release(depth)
. But it did not obtain the depth.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.