Skip to content

Commit

Permalink
Add v1.4.2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
ibaiGorordo committed Jun 22, 2024
1 parent 13b7778 commit 4de2dfd
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions pykinect_azure/utils/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
import platform
import sys

import os

def get_k4a_module_path():

Expand All @@ -13,12 +13,20 @@ def get_k4a_module_path():
if platform.system().lower() == 'linux':
return r'/usr/lib/x86_64-linux-gnu/libk4a.so'

# In Windows check the architecture
# For Windows, check what version is installed (v1.4.1 or v1.4.2)
sdk_dir = 'C:\\Program Files\\Azure Kinect SDK v1.4.2'
if not os.path.exists(sdk_dir):
sdk_dir = 'C:\\Program Files\\Azure Kinect SDK v1.4.1'
if not os.path.exists(sdk_dir):
print('Compatible Azure Kinect SDK not found. Please install v1.4.1 or v1.4.2')
sys.exit(1)

# Check the architecture
if platform.machine().lower() == 'amd64':
return 'C:\\Program Files\\Azure Kinect SDK v1.4.1\\sdk\\windows-desktop\\amd64\\release\\bin\\k4a.dll'
return sdk_dir + '\\sdk\\windows-desktop\\amd64\\release\\bin\\k4a.dll'

# Otherwise return the x86 Windows version
return 'C:\\Program Files\\Azure Kinect SDK v1.4.1\\sdk\\windows-desktop\\x86\\release\\bin\\k4a.dll'
return sdk_dir + '\\sdk\\windows-desktop\\x86\\release\\bin\\k4a.dll'

def get_k4abt_module_path():

Expand Down

0 comments on commit 4de2dfd

Please sign in to comment.