Open3D icon indicating copy to clipboard operation
Open3D copied to clipboard

Can not use Azure Kinect related feature

Open stytim opened this issue 7 years ago • 20 comments

Describe the bug Open3d can not load k4a.dll or k4arecord.dll even after I copy depthengine_2_0.dll, k4a.dll and k4arecord.dll to my anaconda python environment library folder D:\miniconda3\envs\cv2\Library\bin

To Reproduce Steps to reproduce the behavior:

  1. cd Open3D
  2. python examples/Python/ReconstructionSystem/sensors/azure_kinect_viewer.py --align_depth_to_color
  3. See error

Expected behavior [Open3D FATAL] Cannot load k4a.dll

Screenshots Capture2

Capture

Environment (please complete the following information):

  • OS: Windows 10
  • Python version: python 3.7 in Anaconda environment
  • Open3D version: 0.80
  • Is this remote workstation?: no
  • How did you install Open3D?: pip

stytim avatar Nov 12 '19 21:11 stytim

Having the same issue

NickMoore99 avatar Nov 13 '19 20:11 NickMoore99

I'm waiting for a Kinect Azure to use with open3d.. is it solved ?

Fred3D-tech avatar Nov 25 '19 07:11 Fred3D-tech

Did you follow all the steps here? Including installing the azure Kinect sdk? http://www.open3d.org/docs/latest/tutorial/Basic/azure_kinect.html

On Mon, 25 Nov 2019 at 08:13, argosvr [email protected] wrote:

I'm waiting for a Kinect Azure to use with open3d.. is it solved ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/intel-isl/Open3D/issues/1314?email_source=notifications&email_token=AE3BDJS3OFQEBWMKDUPAOLLQVN3JNA5CNFSM4JMJDRUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFBMA3Y#issuecomment-558022767, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE3BDJR5CW6WTKSNNVX7L4LQVN3JNANCNFSM4JMJDRUA .

-- Stephan Sturges +32 484 06 19 63

stephansturges avatar Nov 25 '19 07:11 stephansturges

@yxlao is this because the dll signature has changed?

theNded avatar Nov 25 '19 15:11 theNded

I fixed the issue by renaming the Azure SDK folder (literally changed 1.3.0 to 1.2.0). Probably open3d looks for the specific 1.2.0 folder.

Vintagelavalamp avatar Dec 10 '19 14:12 Vintagelavalamp

I had similar issue working with 1.3.0 SDK. So I downgraded Kinect SDK to 1.2.0.

Tested both k4a versions with open3d-0.8.0 and only k4a v1.2 works with open3d 0.8.0. Trying open3d with k4a SDK 1.3 throws [Open3D FATAL] Cannot load k4a.dll whereras installing SDK 1.2 works fine. Just for the record, the installers are here: v1.2, v1.3

scimad avatar Jan 31 '20 05:01 scimad

Works with k4a SDK 1.2.0. DLL binaries need to be copied to examples/Python/ReconstructionSystem/sensors/ where the python script is.

One issue is that when firmware of sensor has been upgraded with k4a SDK 1.4.0, the sensor no longer works with k4a SDK 1.2.0.

chuong avatar May 22 '20 04:05 chuong

Fixed this issue by copying k4a.dll, depthengine_2_0.dll, k4arecord.dll from sdk 1.2.0 (C:\Program Files\Azure Kinect SDK v1.2.0\sdk\windows-desktop\amd64\release\bin) to your python location C:\Users\Username\AppData\Local\Programs\Python\Python36\DLLs\ (works with sdk 1.4.0 installed, just copy 1.2.0 dlls to python folder)

djaym7 avatar May 27 '20 22:05 djaym7

None of the above worked. Python 3.7 Win 10 Anacoda Open3D 0.10

PS. The issue occurs only with Kinect Azure SDK 14.0

mastrogiorgis avatar Jun 29 '20 14:06 mastrogiorgis

I really don't understand why this issue hasn't been taken much seriously. Having faced this issue really many times and in multiple versions, I can see that issue really needs attention and has been here for relatively long time. @syncle @yxlao

scimad avatar Jun 29 '20 15:06 scimad

This is dispointint...

foamliu avatar Jul 02 '20 02:07 foamliu

I can't understand how this is still not solved.. this is not serious .. is this project really seriously maintained ? When I see that I doubt about that. @theNded @chuong

Fred3D-tech avatar Jul 05 '20 19:07 Fred3D-tech

Copying the 1.4 dlls to any of the locations suggested before did not work. However, after I installed 1.2 SDK using the msi installer using the link posted above (I have now all of 1.2, 1.3, 1.4, and I think I've upgraded the FW too), the python bindings for the examples in Open3D\examples\python\ReconstructionSystem\sensors started working. No need to copy the dll's anywhere. However, it'd be great if it would just work with the latest sdk...

karipulli avatar Jul 20 '20 21:07 karipulli

we are trying to find some bandwidth to work on this

germanros1987 avatar Aug 07 '20 06:08 germanros1987

when i work python examples/Python/ReconstructionSystem/sensors/azure_kinect_viewer.py

I can see error "Cannot load k4a.dll"

so I downgraded Kinect SDK to 1.2.0. with @scimad comment. Then it works! azure_kinect_viewer.py is works. and azure_kinect_recorder.py is works.

but after work python examples/Python/ReconstructionSystem/sensors/azure_kinect_mkv_reader.py, I can see error "Cannot load k4arecord.dll"

i can't solve it

gh-BumsooKim avatar Aug 11 '20 05:08 gh-BumsooKim

On Windows, the Open3D Kinect plugin will look for the Kinect K4A library located in the default installation paths:

https://github.com/intel-isl/Open3D/blob/3c6e66419a0f5669b27503f1e30dd4960b1aa4ba/cpp/open3d/io/sensor/azure_kinect/K4aPlugin.cpp#L76-L79

Currently, it supports 1.2.0 to 1.4.1. So first, check if the dll files are are found in the paths above.

If the K4A library is not in the default location, you'll need to set the K4A_LIB_DIR environment variable to point to the directory containing the K4A's *.dll files.

Some of the fixes we have are in the master branch, we'll be updating the python packages in the next release.

yxlao avatar Dec 09 '20 23:12 yxlao

Hey I'm still experiencing the same issue when trying to run azure_kinect_mkv_reader.py I added the the K4A_LIB_DIR environment variable and also copied the dlls to open3d package can you guide me towards how to find out what wrong?

---EDIT--- following some advice here I copied the dlls to the python/DLLs folder and I no longer get the cannot load error now I get these repeated and no images are created:

[2021-01-03 23:34:03.522] [error] [t=4476] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (295): Invalid argument to capture_dec_ref(). capture_handle (0000018639970620) is not a valid handle of type k4a_capture_t [2021-01-03 23:34:03.525] [error] [t=4476] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (118): k4a_capture_t_get_context(). Invalid k4a_capture_t 00000186399703E0 [2021-01-03 23:34:03.525] [error] [t=4476] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (344): Invalid argument to capture_get_color_image(). capture_handle (00000186399703E0) is not a valid handle of type k4a_capture_t [2021-01-03 23:34:03.525] [error] [t=4476] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (118): k4a_capture_t_get_context(). Invalid k4a_capture_t 00000186399703E0 [2021-01-03 23:34:03.526] [error] [t=4476] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (359): Invalid argument to capture_get_depth_image(). capture_handle (00000186399703E0) is not a valid handle of type k4a_capture_t [2021-01-03 23:34:03.527] [error] [t=4476] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (118): k4a_capture_t_get_context(). Invalid k4a_capture_t 00000186399703E0

Thanks

shgoren avatar Jan 03 '21 21:01 shgoren

I have this exact same issue also. I've followed @shgoren's method and copied the dll's into the local folder, but now have the below errors. The viewer and recorder examples work ok but the reader throws the above error and I see the same error when using the RGBD element in other scripts. I’m using the 1.4.1 SDK which I understand is valid with the latest version of open3d. I’m using python so wondering if this is a python specific issue?

[2021-02-17 18:17:13.227] [error] [t=12204] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (118): k4a_capture_t_get_context(). Invalid k4a_capture_t 0000023BFAF70450 [2021-02-17 18:17:13.227] [error] [t=12204] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (295): Invalid argument to capture_dec_ref(). capture_handle (0000023BFAF70450) is not a valid handle of type k4a_capture_t [2021-02-17 18:17:13.229] [error] [t=12204] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (118): k4a_capture_t_get_context(). Invalid k4a_capture_t 0000023BFAF707D0 [2021-02-17 18:17:13.229] [error] [t=12204] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (344): Invalid argument to capture_get_color_image(). capture_handle (0000023BFAF707D0) is not a valid handle of type k4a_capture_t [2021-02-17 18:17:13.230] [error] [t=12204] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (118): k4a_capture_t_get_context(). Invalid k4a_capture_t 0000023BFAF707D0 [2021-02-17 18:17:13.231] [error] [t=12204] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (359): Invalid argument to capture_get_depth_image(). capture_handle (0000023BFAF707D0) is not a valid handle of type k4a_capture_t [2021-02-17 18:17:13.232] [error] [t=12204] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (118): k4a_capture_t_get_context(). Invalid k4a_capture_t 0000023BFAF707D0 [2021-02-17 18:17:13.233] [error] [t=12204] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\allocator\allocator.c (295): Invalid argument to capture_dec_ref(). capture_handle (0000023BFAF707D0) is not a valid handle of type k4a_capture_t

RecursiveAV avatar Feb 17 '21 08:02 RecursiveAV

У меня тоже такая же проблема. Я последовал методу @shgoren и скопировал dll в локальную папку, но теперь у меня есть следующие ошибки. Примеры средства просмотра и записи работают нормально, но программа чтения выдает указанную выше ошибку, и я вижу ту же ошибку при использовании элемента RGBD в других сценариях. Я использую SDK 1.4.1, который, как я понимаю, подходит для последней версии open3d. Я использую python, поэтому мне интересно, связана ли это с конкретной проблемой python?

[2021-02-17 18: 17: 13.227] [ошибка] [t = 12204] D: \ a \ 1 \ s \ extern \ Azure-Kinect-Sensor-SDK \ src \ allocator \ allocator.c (118): k4a_capture_t_get_context (). Недействительный k4a_capture_t 0000023BFAF70450 [2021-02-17 18: 17: 13.227] [ошибка] [t = 12204] D: \ a \ 1 \ s \ extern \ Azure-Kinect-Sensor-SDK \ src \ allocator \ allocator.c ( 295): недопустимый аргумент функции capture_dec_ref (). capture_handle (0000023BFAF70450) не является допустимым дескриптором типа k4a_capture_t [2021-02-17 18: 17: 13.229] [ошибка] [t = 12204] D: \ a \ 1 \ s \ extern \ Azure-Kinect-Sensor-SDK \ src \ allocator \ allocator.c (118): k4a_capture_t_get_context (). Неверный k4a_capture_t 0000023BFAF707D0 [2021-02-17 18: 17: 13.229] [ошибка] [t = 12204] D: \ a \ 1 \ s \ extern \ Azure-Kinect-Sensor-SDK \ src \ allocator \ allocator.c (344): Неверный аргумент функции capture_get_color_image (). capture_handle (0000023BFAF707D0) не является допустимым дескриптором типа k4a_capture_t [2021-02-17 18: 17: 13.230] [ошибка] [t = 12204] D: \ a \ 1 \ s \ extern \ Azure-Kinect-Sensor-SDK \ src \ allocator \ allocator.c (118): k4a_capture_t_get_context (). Недействительный k4a_capture_t 0000023BFAF707D0 [2021-02-17 18: 17: 13.231] [ошибка] [t = 12204] D: \ a \ 1 \ s \ extern \ Azure-Kinect-Sensor-SDK \ src \ allocator \ allocator.c ( 359): недопустимый аргумент функции capture_get_depth_image (). capture_handle (0000023BFAF707D0) не является допустимым дескриптором типа k4a_capture_t [2021-02-17 18: 17: 13.232] [ошибка] [t = 12204] D: \ a \ 1 \ s \ extern \ Azure-Kinect-Sensor-SDK \ src \ allocator \ allocator.c (118): k4a_capture_t_get_context (). Недействительный k4a_capture_t 0000023BFAF707D0 [2021-02-17 18: 17: 13.233] [ошибка] [t = 12204] D: \ a \ 1 \ s \ extern \ Azure-Kinect-Sensor-SDK \ src \ allocator \ allocator.c ( 295): недопустимый аргумент функции capture_dec_ref (). capture_handle (0000023BFAF707D0) не является допустимым дескриптором типа k4a_capture_t

I have the same problem, have you solved it?

apystin avatar Sep 01 '21 13:09 apystin

Issue had been fixed. Based on the following config, I successfully run the full reconstruction without any bug: Hardware: Azure Kinect DK K4A SDK version: 1.4.1 Open3D: installed by pip, version = 0.17.0 (May be there is no one care this at now)

sjtu-jq avatar May 19 '23 02:05 sjtu-jq