├── .gitattributes ├── 99-k4a.rules ├── README.md ├── README_ENABLE_PORTS.txt ├── assays_sensor ├── recording_continuos.bat ├── recording_continuos_1080_BGRA_30FPS_1.bat ├── recording_continuos_3072_BGRA_15FPS_1.bat └── to_copy │ └── activate.bat ├── azure_kinect_enable_port.sh ├── img ├── CMD_k4arecorder.png ├── azure_kinect_01.1.gif ├── azure_kinect_notes_presentation.png └── k4aviewer_tool.png ├── install_azure_kinect_camera.sh ├── install_azure_kinect_camera_CO.bash ├── install_azure_kinect_camera_u_18.04.sh ├── install_azure_kinect_camera_u_20.04.sh ├── install_azure_kinect_camera_u_22.04.sh ├── modif_azure_kinect_linux └── recording.bat /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /99-k4a.rules: -------------------------------------------------------------------------------- 1 | 2 | # Bus 002 Device 116: ID 045e:097a Microsoft Corp. - Generic Superspeed USB Hub 3 | # Bus 001 Device 015: ID 045e:097b Microsoft Corp. - Generic USB Hub 4 | # Bus 002 Device 118: ID 045e:097c Microsoft Corp. - Azure Kinect Depth Camera 5 | # Bus 002 Device 117: ID 045e:097d Microsoft Corp. - Azure Kinect 4K Camera 6 | # Bus 001 Device 016: ID 045e:097e Microsoft Corp. - Azure Kinect Microphone Array 7 | 8 | BUS!="usb", ACTION!="add", SUBSYSTEM!=="usb_device", GOTO="k4a_logic_rules_end" 9 | 10 | ATTRS{idVendor}=="045e", ATTRS{idProduct}=="097a", MODE="0666", GROUP="plugdev" 11 | ATTRS{idVendor}=="045e", ATTRS{idProduct}=="097b", MODE="0666", GROUP="plugdev" 12 | ATTRS{idVendor}=="045e", ATTRS{idProduct}=="097c", MODE="0666", GROUP="plugdev" 13 | ATTRS{idVendor}=="045e", ATTRS{idProduct}=="097d", MODE="0666", GROUP="plugdev" 14 | ATTRS{idVendor}=="045e", ATTRS{idProduct}=="097e", MODE="0666", GROUP="plugdev" 15 | 16 | LABEL="k4a_logic_rules_end" -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![SOFTWARE_PRESENTATION](https://github.com/juancarlosmiranda/azure_kinect_notes/blob/main/img/azure_kinect_notes_presentation.png?raw=true) 2 | 3 | # Azure Kinect camera setup (automated scripts for Linux and Windows) 4 | 5 | This document contains instructions/notes on how to install the Azure Kinect camera. Here I collected experiences that 6 | have arisen during the development of the following software for Azure Kinect DK camera: 7 | 8 | * [AK_ACQS Azure Kinect Acquisition System](https://github.com/GRAP-UdL-AT/ak_acquisition_system) 9 | * [AK_SM_RECORDER - Azure Kinect Standalone Mode](https://pypi.org/project/ak-sm-recorder/) 10 | * [AK_FRAEX - Azure Kinect Frame Extractor](https://pypi.org/project/ak-frame-extractor/) 11 | * [AK_SW_BENCHMARKER - Azure Kinect Size Estimation & Weight Prediction Benchmarker](https://pypi.org/project/ak-sw-benchmarker/) 12 | * [AK_VIDEO_ANALYSER - Azure Kinect Video Analyser](https://pypi.org/project/ak-video-analyser/) 13 | 14 | Another resource I'm trying to maintain is on ResearchGate, but I can't promise it will stay up to date for long. 15 | 16 | * [ResearchGate - Azure Kinect camera information resources](https://www.researchgate.net/post/Azure_Kinect_camera_information_resources) 17 | 18 | And this research related to RGB-D cameras: 19 | 20 | | Resources | Description | 21 | |---------------------------|-------------------------| 22 | | [Fruit sizing using AI: A review of methods and challenges](https://doi.org/10.1016/j.postharvbio.2023.112587) | https://doi.org/10.1016/j.postharvbio.2023.112587 Artificial intelligence Fruit detection Fruit measure Image processing Deep learning Fruit quality | 23 | | [Assessing automatic data processing algorithms for RGB-D cameras to predict fruit size and weight in apples](https://www.sciencedirect.com/science/article/pii/S0168169923006907) | https://doi.org/10.1016/j.compag.2023.108302 Azure Kinect Fruit sizing Allometric weight models Apple tree Digital fruit growing | 24 | | [AKFruitData: A dual software application for Azure Kinect cameras to acquire and extract informative data in yield tests performed in fruit orchard environments](https://doi.org/10.1016/j.softx.2022.101231) | https://doi.org/10.1016/j.softx.2022.101231 RGB-D camera Data acquisition Data extraction Fruit yield trials Precision fructiculture | 25 | | [AKFruitYield: Modular benchmarking and video analysis software for Azure Kinect cameras for fruit size and fruit yield estimation in apple orchards](https://www.sciencedirect.com/science/article/pii/S2352711023002443) | https://doi.org/10.1016/j.softx.2023.101548 RGB-D camera Fruit detection Apple fruit sizing Yield prediction Allometry | 26 | 27 | 28 | If you find these notes useful, please let me know. **I would be very happy**. Feel free to contact me and if the code is useful to you, please let me know. 29 | 30 | 31 | This **is not intended to replace official documents**, it is produced as a complementary guide in **my learning path**, official 32 | Microsoft documents can be found at: 33 | 34 | * [Azure Kinect DK documentation](https://docs.microsoft.com/en/azure/kinect-dk/) 35 | * [Azure Kinect Sensor SDK download](https://docs.microsoft.com/en/azure/kinect-dk/sensor-sdk-download) 36 | * [Azure Kinect sensor SDK system requirements](https://learn.microsoft.com/en-us/azure/kinect-dk/system-requirements) 37 | 38 | 39 | Official tools to manage the camera and sensors can be found in: 40 | 41 | * [Azure Kinect viewer](https://docs.microsoft.com/en/azure/kinect-dk/azure-kinect-viewer) 42 | * [Azure Kinect recorder](https://docs.microsoft.com/en/azure/kinect-dk/azure-kinect-recorder) 43 | * [Azure Kinect firmware tool](https://docs.microsoft.com/en/azure/kinect-dk/azure-kinect-firmware-tool) 44 | 45 | This document is organized as following: 46 | 47 | * 48 | 1. Quick configuration using scripts on Linux systems. 49 | * 50 | 2. Installing in Linux environments. 51 | * 52 | 3. Installing in Windows 10 environments. 53 | * 54 | 4. Using manufacturer tools: ka4viewer, recorder, pyk4a. 55 | 56 | ## 1. Quick configuration using scripts on Linux systems 57 | 58 | In Linux systems you can install packages using Bash scripts, tested in Ubuntu 18.04, Ubuntu 20.04, Ubuntu 22.04. A 59 | super fast script for impatient people, **copy and paste it!!!** 60 | 61 | ![INSTALLING_COMMANDS](https://github.com/juancarlosmiranda/azure_kinect_notes/blob/main/img/azure_kinect_01.1.gif?raw=true) 62 | 63 | 64 | ### 1.1 Quick setup in Ubuntu 18.04 65 | 66 | ``` 67 | git clone https://github.com/juancarlosmiranda/azure_kinect_notes.git && cd azure_kinect_notes && chmod 755 install_azure_kinect_camera_u_18.04.sh 68 | ``` 69 | 70 | ``` 71 | ./install_azure_kinect_camera_u_18.04.sh 72 | ``` 73 | 74 | ### 1.2 Quick setup in Ubuntu 20.04 75 | Ubuntu 20.04 is included in the list of supported operating systems ([Configuring the repositories](https://learn.microsoft.com/en-us/windows-server/administration/linux-package-repository-for-microsoft-software)). 76 | ``` 77 | git clone https://github.com/juancarlosmiranda/azure_kinect_notes.git && cd azure_kinect_notes && chmod 755 install_azure_kinect_camera_u_20.04.sh 78 | ``` 79 | 80 | ``` 81 | ./install_azure_kinect_camera_u_20.04.sh 82 | ``` 83 | 84 | ### 1.3 Quick setup in Ubuntu 22.04 85 | According to the manufacturer, support is mentioned only for Ubuntu 18.04 ([Linux installation instructions](https://learn.microsoft.com/en-us/azure/kinect-dk/sensor-sdk-download#linux-installation-instructions)). 86 | 87 | ``` 88 | git clone https://github.com/juancarlosmiranda/azure_kinect_notes.git && cd azure_kinect_notes && chmod 755 install_azure_kinect_camera_u_22.04.sh 89 | ``` 90 | 91 | ``` 92 | ./install_azure_kinect_camera_u_22.04.sh 93 | ``` 94 | 95 | Check the camera with this tool **[k4aviewer](https://docs.microsoft.com/en/azure/kinect-dk/azure-kinect-viewer)**. 96 | 97 | ``` 98 | sudo k4aviewer 99 | ``` 100 | 101 | * You can check if **k4viewer** is working with these videos recorded with Azure Kinect camera, optional video samples are available at [here](https://doi.org/10.5281/zenodo.6968103) 102 | 103 | Go to (Section 4. Using manufacturer tools: ka4viewer, recorder), if you wanto to know about the manufacturer tools. 104 | 105 | ## 2. Installing in Linux environments 106 | 107 | Follow these instructions if you want to complete the installation process step by step without an automatic shell 108 | script. 109 | 110 | The official site of the SDK in Gihub 111 | is **"[Using Azure Kinect SDK](https://github.com/microsoft/Azure-Kinect-Sensor-SDK/blob/develop/docs/usage.md)"** 112 | Please consider to take note about special issues 113 | in [Linux Devide Setup](https://github.com/microsoft/Azure-Kinect-Sensor-SDK/blob/develop/docs/usage.md#linux-device-setup) 114 | section. In the [official site](https://learn.microsoft.com/en-us/windows-server/administration/linux-package-repository-for-microsoft-software) **( 115 | 06/02/2023)**, the manufacturer provides support for Ubuntu 16.04 (Xenial), Ubuntu 18.04 (Bionic), Ubuntu 20.04 (Focal). 116 | 117 | ### 2.1 Common steps 118 | 119 | Remove old packages and make cleaning of the system. 120 | 121 | ``` 122 | sudo apt-get update 123 | sudo apt-get autoremove 124 | sudo apt-get autoclean 125 | ``` 126 | 127 | Install network tools and ssh server to connect remotely. 128 | 129 | ``` 130 | sudo apt install net-tools 131 | sudo apt-get install openssh-server 132 | sudo systemctl enable ssh --now 133 | sudo systemctl start ssh 134 | 135 | ``` 136 | 137 | The "essential Tools" package are not part of the normal installation, but are useful after a default installation on 138 | Ubuntu 18.04, 20.04, 22.04 systems. If you have some of them installed, ignore this paragraph. 139 | 140 | ``` 141 | sudo apt-get install build-essential 142 | sudo apt-get install cmake 143 | sudo apt-get install libgtk2.0-dev 144 | sudo apt-get install libusb-1.0 145 | sudo apt-get install ffmpeg 146 | sudo apt-get install mlocate 147 | sudo apt-get install locate 148 | sudo apt install curl 149 | sudo apt install git 150 | ``` 151 | 152 | Remove old packages to avoid conflicts. 153 | 154 | ``` 155 | sudo apt remove libk4a* 156 | sudo apt remove libk4abt* 157 | sudo apt remove libk4a1* 158 | ``` 159 | 160 | ### 2.1 Install repositories Ubuntu 18.04 161 | 162 | ``` 163 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - 164 | sudo apt-add-repository https://packages.microsoft.com/ubuntu/18.04/prod 165 | curl -sSL https://packages.microsoft.com/config/ubuntu/18.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft-prod.list 166 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - 167 | sudo apt-get update 168 | ``` 169 | 170 | ### 2.2 Install repositories Ubuntu 20.04 171 | 172 | ``` 173 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc 174 | sudo apt-add-repository https://packages.microsoft.com/ubuntu/20.04/prod 175 | sudo apt-get update 176 | ``` 177 | 178 | ### 2.3 Install repositories Ubuntu 22.04 179 | In Ubuntu 22.04 download libsoundio1_1.1.0-1_amd64.deb from [Ubuntu Packages](https://packages.ubuntu.com/focal/amd64/libsoundio1/download) 180 | ``` 181 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc 182 | sudo apt-add-repository https://packages.microsoft.com/ubuntu/22.04/prod 183 | sudo apt-get update 184 | wget mirrors.kernel.org/ubuntu/pool/universe/libs/libsoundio/libsoundio1_1.1.0-1_amd64.deb 185 | sudo dpkg -i libsoundio1_1.1.0-1_amd64.deb 186 | ``` 187 | 188 | ### 2.4 Install new package from repository 189 | 190 | To all the aforementioned Linux systems. 191 | 192 | Install new package from repository 193 | 194 | ``` 195 | sudo apt-get update 196 | sudo apt-get install libk4a1.4 197 | sudo apt install libk4a1.4-dev 198 | sudo apt install k4a-tools 199 | ``` 200 | 201 | ### 2.5 Modify /etc/udev/rules.d 202 | 203 | Copy file "99-k4a.rules to" present in this repository to /etc/udev/rules.d, this is necessary for us Azure Kinect tools 204 | without be root user. The file is saved in this repository. 205 | 206 | ``` 207 | sudo cp 99-k4a.rules /etc/udev/rules.d/ 208 | ``` 209 | 210 | Testing with tool **[k4aviewer](https://docs.microsoft.com/en/azure/kinect-dk/azure-kinect-viewer)**. 211 | 212 | ``` 213 | sudo k4aviewer 214 | ``` 215 | 216 | ![k4aviewer](https://github.com/juancarlosmiranda/azure_kinect_notes/blob/main/img/k4aviewer_tool.png?raw=true) 217 | 218 | You can check installed software with: 219 | 220 | ``` 221 | sudo apt list -a libk4a* 222 | sudo apt list -a libk4abt1.1 223 | sudo apt list -a libk4abt1.1-dev 224 | ``` 225 | 226 | **IMPORTANT NOTE ** 227 | DON'T FORGET copy this file "99-k4A.rules" 228 | [Linux Device Setup](https://github.com/microsoft/Azure-Kinect-Sensor-SDK/blob/develop/docs/usage.md#linux-device-setup) 229 | 230 | ** ... 231 | **Linux Device Setup** 232 | 233 | On Linux, once attached, the device should automatically enumerate and load all drivers. However, in order to use the 234 | Azure Kinect SDK with the device and without being 'root', you will need to setup udev rules. We have these rules 235 | checked into this repo under 'scripts/99-k4a.rules'. To do so: 236 | 237 | Copy 'scripts/99-k4a.rules' into '/etc/udev/rules.d/'. 238 | Detach and reattach Azure Kinect devices if attached during this process. 239 | 240 | Once complete, the Azure Kinect camera is available without being 'root'. ... 241 | ** 242 | 243 | ## 3. Installing in Windows 10 environments 244 | 245 | Last update at (06/02/2023). 246 | 247 | * (Windows installation instructions)[https://github.com/microsoft/Azure-Kinect-Sensor-SDK/blob/develop/docs/usage.md] 248 | 249 | * (Azure Kinect SDK 250 | v1.4.1.exe)[https://download.microsoft.com/download/3/d/6/3d6d9e99-a251-4cf3-8c6a-8e108e960b4b/Azure%20Kinect%20SDK%201.4.1.exe] 251 | 252 | ## 4. Using manufacturer tools: ka4viewer, recorder 253 | 254 | In this section, the necessary steps are explained to use tools to record, view videos, program with the Azure Kinect 255 | camera. 256 | 257 | ### 4.1 Record videos from CMD 258 | 259 | Official site **"[Azure Kinect recorder](https://docs.microsoft.com/en/azure/kinect-dk/azure-kinect-recorder)"**. Open CMD 260 | console in Windows and enter to the folder. 261 | 262 | ``` 263 | cd "C:\Program Files\Azure Kinect SDK v1.4.1\tools" 264 | ``` 265 | 266 | You can record data with: 267 | 268 | ``` 269 | k4arecorder.exe -l 5 C:\Users\User\output.mkv 270 | k4arecorder.exe -l 5 %HOMEDRIVE%HOMEPATH%\output.mkv 271 | ``` 272 | 273 | You can record data using IMU activated with: 274 | 275 | ``` 276 | k4arecorder.exe --imu -l 5 %HOMEDRIVE%HOMEPATH%\output.mkv 277 | ``` 278 | 279 | Check another options of k4arecorder.exe. 280 | 281 | ``` 282 | k4arecorder.exe /? 283 | ``` 284 | 285 | ![CMD_k4arecorder.exe](https://github.com/juancarlosmiranda/azure_kinect_notes/blob/main/img/CMD_k4arecorder.png?raw=true) 286 | 287 | ### 4.2 View recorded videos and real time data 288 | 289 | To use **"[Azure Kinect viewer](https://docs.microsoft.com/en/azure/kinect-dk/azure-kinect-viewer)"** open CMD console in Windows and enter to the folder. 290 | 291 | ``` 292 | cd "C:\Program Files\Azure Kinect SDK v1.4.1\tools" 293 | ``` 294 | 295 | You can open the viewer with: 296 | 297 | ``` 298 | k4aviewer.exe 299 | ``` 300 | 301 | Download the examples videos and check with **k4aviewer** from [here](https://doi.org/10.5281/zenodo.6968103) 302 | 303 | ### 4.3 Optional installation of pyk4a Python Library 304 | 305 | If you prefer Python, you can install [pyk4a Python Library](https://github.com/etiennedub/pyk4a) 306 | to manage the camera and sensors. 307 | 308 | ``` 309 | pip install pyk4a 310 | ``` 311 | 312 | ## Programming examples (IN PROGRESS...) 313 | * 314 | 315 | ## Other resources 316 | * [Azure Kinect camera information resources](https://www.researchgate.net/post/Azure_Kinect_camera_information_resources). 317 | * [AK_FRAEX - Azure Kinect Frame Extractor demo videos](https://zenodo.org/record/8232445) 318 | * [Azure Kinect DK Code Samples Repository](https://github.com/microsoft/Azure-Kinect-Samples). Examples focused in C/C++/C# 319 | * [pyk41](https://github.com/etiennedub/pyk4a/). In forlder "example/", code written in Python. 320 | 321 | 322 | ## Authorship 323 | 324 | Please contact author to report bugs juancarlos.miranda@udl.cat, last update 07/02/2023. 325 | 326 | ## Citation 327 | 328 | If you find this code useful, please consider citing: 329 | [Azure Kinect camera setup (automated scripts for Linux and Windows)](https://docs.microsoft.com/en/azure/kinect-dk/azure-kinect-viewer). 330 | -------------------------------------------------------------------------------- /README_ENABLE_PORTS.txt: -------------------------------------------------------------------------------- 1 | !#bin/bash 2 | chmod 777 '/run/udev/links/\x2finput\x2fby-id\x2fusb-Microsoft_Azure_Kinect_4K_Camera_000291294012-event-if00' 3 | chmod 777 '/run/udev/links/\x2finput\x2fby-id\x2fusb-Microsoft_Azure_Kinect_4K_Camera_000291294012-event-if00/c13:78' 4 | chmod 777 '/run/udev/links/\x2fv4l\x2fby-id\x2fusb-Microsoft_Azure_Kinect_4K_Camera_000291294012-video-index1' 5 | chmod 777 '/run/udev/links/\x2fv4l\x2fby-id\x2fusb-Microsoft_Azure_Kinect_4K_Camera_000291294012-video-index1/c81:1' 6 | chmod 777 '/run/udev/links/\x2fv4l\x2fby-id\x2fusb-Microsoft_Azure_Kinect_4K_Camera_000291294012-video-index0' 7 | chmod 777 '/run/udev/links/\x2fv4l\x2fby-id\x2fusb-Microsoft_Azure_Kinect_4K_Camera_000291294012-video-index0/c81:0' 8 | chmod 777 '/run/udev/links/\x2fsnd\x2fby-id\x2fusb-Microsoft_Corporation._Azure_Kinect_Microphone_Array_000291294012-00' 9 | chmod 777 '/run/udev/links/\x2fsnd\x2fby-id\x2fusb-Microsoft_Corporation._Azure_Kinect_Microphone_Array_000291294012-00/c116:3' 10 | 11 | chmod 777 /dev/v4l/by-id/usb-Microsoft_Azure_Kinect_4K_Camera_000291294012-video-index1 12 | chmod 777 /dev/v4l/by-id/usb-Microsoft_Azure_Kinect_4K_Camera_000291294012-video-index0 13 | chmod 777 /dev/snd/by-id/usb-Microsoft_Corporation._Azure_Kinect_Microphone_Array_000291294012-00 14 | chmod 777 /dev/input/by-id/usb-Microsoft_Azure_Kinect_4K_Camera_000291294012-event-if00 15 | -------------------------------------------------------------------------------- /assays_sensor/recording_continuos.bat: -------------------------------------------------------------------------------- 1 | "C:\Program Files\Azure Kinect SDK v1.4.1\tools\k4arecorder.exe" "C:\Users\Usuari\prueba1854.mkv" -------------------------------------------------------------------------------- /assays_sensor/recording_continuos_1080_BGRA_30FPS_1.bat: -------------------------------------------------------------------------------- 1 | "C:\Program Files\Azure Kinect SDK v1.4.1\tools\k4arecorder.exe" -c 1080p -d NFOV_UNBINNED -r 30 "C:\1080_nfov_un_30_FPS_1.mkv" 2 | -------------------------------------------------------------------------------- /assays_sensor/recording_continuos_3072_BGRA_15FPS_1.bat: -------------------------------------------------------------------------------- 1 | "C:\Program Files\Azure Kinect SDK v1.4.1\tools\k4arecorder.exe" -c 3072p -d NFOV_UNBINNED -r 15 "C:\U3072_nfov_un_15FPS_1.mkv" 2 | -------------------------------------------------------------------------------- /assays_sensor/to_copy/activate.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem This file is UTF-8 encoded, so we need to update the current code page while executing it 4 | for /f "tokens=2 delims=:." %%a in ('"%SystemRoot%\System32\chcp.com"') do ( 5 | set _OLD_CODEPAGE=%%a 6 | ) 7 | if defined _OLD_CODEPAGE ( 8 | "%SystemRoot%\System32\chcp.com" 65001 > nul 9 | ) 10 | 11 | set VIRTUAL_ENV=C:\Users\Usuari\PycharmProjects\pythonOpenCVExamples\venv 12 | 13 | if not defined PROMPT set PROMPT=$P$G 14 | 15 | if defined _OLD_VIRTUAL_PROMPT set PROMPT=%_OLD_VIRTUAL_PROMPT% 16 | if defined _OLD_VIRTUAL_PYTHONHOME set PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME% 17 | 18 | set _OLD_VIRTUAL_PROMPT=%PROMPT% 19 | set PROMPT=(venv) %PROMPT% 20 | 21 | if defined PYTHONHOME set _OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME% 22 | set PYTHONHOME= 23 | 24 | if defined _OLD_VIRTUAL_PATH set PATH=%_OLD_VIRTUAL_PATH% 25 | if not defined _OLD_VIRTUAL_PATH set _OLD_VIRTUAL_PATH=%PATH% 26 | 27 | set PATH=%VIRTUAL_ENV%\Scripts;%PATH% 28 | 29 | :END 30 | if defined _OLD_CODEPAGE ( 31 | "%SystemRoot%\System32\chcp.com" %_OLD_CODEPAGE% > nul 32 | set _OLD_CODEPAGE= 33 | ) 34 | -------------------------------------------------------------------------------- /azure_kinect_enable_port.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | chmod 777 '/run/udev/links/\x2finput\x2fby-id\x2fusb-Microsoft_Azure_Kinect_4K_Camera_000291294012-event-if00' 3 | chmod 777 '/run/udev/links/\x2finput\x2fby-id\x2fusb-Microsoft_Azure_Kinect_4K_Camera_000291294012-event-if00/c13:78' 4 | chmod 777 '/run/udev/links/\x2fv4l\x2fby-id\x2fusb-Microsoft_Azure_Kinect_4K_Camera_000291294012-video-index1' 5 | chmod 777 '/run/udev/links/\x2fv4l\x2fby-id\x2fusb-Microsoft_Azure_Kinect_4K_Camera_000291294012-video-index1/c81:1' 6 | chmod 777 '/run/udev/links/\x2fv4l\x2fby-id\x2fusb-Microsoft_Azure_Kinect_4K_Camera_000291294012-video-index0' 7 | chmod 777 '/run/udev/links/\x2fv4l\x2fby-id\x2fusb-Microsoft_Azure_Kinect_4K_Camera_000291294012-video-index0/c81:0' 8 | chmod 777 '/run/udev/links/\x2fsnd\x2fby-id\x2fusb-Microsoft_Corporation._Azure_Kinect_Microphone_Array_000291294012-00' 9 | chmod 777 '/run/udev/links/\x2fsnd\x2fby-id\x2fusb-Microsoft_Corporation._Azure_Kinect_Microphone_Array_000291294012-00/c116:3' 10 | 11 | chmod 777 /dev/v4l/by-id/usb-Microsoft_Azure_Kinect_4K_Camera_000291294012-video-index1 12 | chmod 777 /dev/v4l/by-id/usb-Microsoft_Azure_Kinect_4K_Camera_000291294012-video-index0 13 | chmod 777 /dev/snd/by-id/usb-Microsoft_Corporation._Azure_Kinect_Microphone_Array_000291294012-00 14 | chmod 777 /dev/input/by-id/usb-Microsoft_Azure_Kinect_4K_Camera_000291294012-event-if00 -------------------------------------------------------------------------------- /img/CMD_k4arecorder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancarlosmiranda/azure_kinect_notes/2a28f47a2e08bddaafa87f84ffc5ba6ebf4aeed1/img/CMD_k4arecorder.png -------------------------------------------------------------------------------- /img/azure_kinect_01.1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancarlosmiranda/azure_kinect_notes/2a28f47a2e08bddaafa87f84ffc5ba6ebf4aeed1/img/azure_kinect_01.1.gif -------------------------------------------------------------------------------- /img/azure_kinect_notes_presentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancarlosmiranda/azure_kinect_notes/2a28f47a2e08bddaafa87f84ffc5ba6ebf4aeed1/img/azure_kinect_notes_presentation.png -------------------------------------------------------------------------------- /img/k4aviewer_tool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancarlosmiranda/azure_kinect_notes/2a28f47a2e08bddaafa87f84ffc5ba6ebf4aeed1/img/k4aviewer_tool.png -------------------------------------------------------------------------------- /install_azure_kinect_camera.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Project: AK_ACQS Azure Kinect Acquisition System https://github.com/GRAP-UdL-AT/ak_acquisition_system 3 | # 4 | # * PAgFRUIT http://www.pagfruit.udl.cat/en/ 5 | # * GRAP http://www.grap.udl.cat/ 6 | # 7 | # Author: Juan Carlos Miranda. https://github.com/juancarlosmiranda 8 | 9 | # Remove old packages and make cleaning of the system. 10 | sudo apt-get update 11 | sudo apt-get autoremove 12 | sudo apt-get autoclean 13 | 14 | # Install essential tools 15 | sudo apt-get install build-essential 16 | sudo apt-get install cmake 17 | sudo apt-get install libgtk2.0-dev 18 | sudo apt-get install libusb-1.0 19 | sudo apt-get install ffmpeg 20 | sudo apt-get install mlocate 21 | sudo apt-get install locate 22 | sudo apt install curl 23 | 24 | # Install repositories Ubuntu 20.04 and Ubuntu 18.04 25 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc 26 | sudo apt-add-repository https://packages.microsoft.com/ubuntu/20.04/prod 27 | sudo apt-get update 28 | 29 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - 30 | sudo apt-add-repository https://packages.microsoft.com/ubuntu/18.04/prod 31 | curl -sSL https://packages.microsoft.com/config/ubuntu/18.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft-prod.list 32 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - 33 | sudo apt-get update 34 | 35 | #Install new package from repository 36 | sudo apt-get update 37 | sudo apt-get install libk4a1.4 38 | sudo apt install libk4a1.4-dev 39 | sudo apt install k4a-tools 40 | 41 | # Copy rules 42 | sudo cp 99-k4a.rules /etc/udev/rules.d/ 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /install_azure_kinect_camera_CO.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Project: AK_ACQS Azure Kinect Acquisition System https://github.com/GRAP-UdL-AT/ak_acquisition_system 3 | # 4 | # * PAgFRUIT http://www.pagfruit.udl.cat/en/ 5 | # * GRAP http://www.grap.udl.cat/ 6 | # 7 | # Author: Juan Carlos Miranda. https://github.com/juancarlosmiranda 8 | 9 | # Remove old packages and make cleaning of the system. 10 | apt-get update 11 | apt-get autoremove 12 | apt-get autoclean 13 | 14 | # Install essential tools 15 | apt-get install build-essential 16 | apt-get install cmake 17 | apt-get install libgtk2.0-dev 18 | apt-get install libusb-1.0 19 | apt-get install ffmpeg 20 | apt-get install mlocate 21 | apt-get install locate 22 | apt install curl 23 | 24 | # Install repositories Ubuntu 20.04 and Ubuntu 18.04 25 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc 26 | sudo apt-add-repository https://packages.microsoft.com/ubuntu/20.04/prod 27 | sudo apt-get update 28 | 29 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - 30 | sudo apt-add-repository https://packages.microsoft.com/ubuntu/18.04/prod 31 | curl -sSL https://packages.microsoft.com/config/ubuntu/18.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft-prod.list 32 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - 33 | sudo apt-get update 34 | 35 | #Install new package from repository 36 | sudo apt-get update 37 | sudo apt-get install libk4a1.4 38 | sudo apt install libk4a1.4-dev 39 | sudo apt install k4a-tools 40 | 41 | # Copy rules 42 | sudo cp 99-k4a.rules /etc/udev/rules.d/ 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /install_azure_kinect_camera_u_18.04.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Project: AK_ACQS Azure Kinect Acquisition System https://github.com/GRAP-UdL-AT/ak_acquisition_system 3 | # 4 | # * PAgFRUIT http://www.pagfruit.udl.cat/en/ 5 | # * GRAP http://www.grap.udl.cat/ 6 | # 7 | # Author: Juan Carlos Miranda. https://github.com/juancarlosmiranda 8 | 9 | # Remove old packages and make cleaning of the system. 10 | sudo apt-get update 11 | sudo apt-get autoremove 12 | sudo apt-get autoclean 13 | 14 | # Install essential tools 15 | sudo apt-get install build-essential 16 | sudo apt-get install cmake 17 | sudo apt-get install libgtk2.0-dev 18 | sudo apt-get install libusb-1.0 19 | sudo apt-get install ffmpeg 20 | sudo apt-get install mlocate 21 | sudo apt-get install locate 22 | sudo apt install curl 23 | 24 | # Install repositories Ubuntu 18.04 25 | 26 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - 27 | sudo apt-add-repository https://packages.microsoft.com/ubuntu/18.04/prod 28 | curl -sSL https://packages.microsoft.com/config/ubuntu/18.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft-prod.list 29 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - 30 | sudo apt-get update 31 | 32 | #Install new package from repository 33 | sudo apt-get update 34 | sudo apt-get install libk4a1.4 35 | sudo apt install libk4a1.4-dev 36 | sudo apt install k4a-tools 37 | 38 | # Copy rules 39 | sudo cp 99-k4a.rules /etc/udev/rules.d/ 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /install_azure_kinect_camera_u_20.04.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Project: AK_ACQS Azure Kinect Acquisition System https://github.com/GRAP-UdL-AT/ak_acquisition_system 3 | # 4 | # * PAgFRUIT http://www.pagfruit.udl.cat/en/ 5 | # * GRAP http://www.grap.udl.cat/ 6 | # 7 | # Author: Juan Carlos Miranda. https://github.com/juancarlosmiranda 8 | 9 | # Remove old packages and make cleaning of the system. 10 | sudo apt-get update 11 | sudo apt-get autoremove 12 | sudo apt-get autoclean 13 | 14 | # Install essential tools 15 | sudo apt-get install build-essential 16 | sudo apt-get install cmake 17 | sudo apt-get install libgtk2.0-dev 18 | sudo apt-get install libusb-1.0 19 | sudo apt-get install ffmpeg 20 | sudo apt-get install mlocate 21 | sudo apt-get install locate 22 | sudo apt install curl 23 | 24 | # Install repositories Ubuntu 20.04 and Ubuntu 18.04 25 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc 26 | sudo apt-add-repository https://packages.microsoft.com/ubuntu/20.04/prod 27 | sudo apt-get update 28 | 29 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - 30 | sudo apt-add-repository https://packages.microsoft.com/ubuntu/18.04/prod 31 | curl -sSL https://packages.microsoft.com/config/ubuntu/18.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft-prod.list 32 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - 33 | sudo apt-get update 34 | 35 | #Install new package from repository 36 | sudo apt-get update 37 | sudo apt-get install libk4a1.4 38 | sudo apt install libk4a1.4-dev 39 | sudo apt install k4a-tools 40 | 41 | # Copy rules 42 | sudo cp 99-k4a.rules /etc/udev/rules.d/ 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /install_azure_kinect_camera_u_22.04.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Project: AK_ACQS Azure Kinect Acquisition System https://github.com/GRAP-UdL-AT/ak_acquisition_system 3 | # 4 | # * PAgFRUIT http://www.pagfruit.udl.cat/en/ 5 | # * GRAP http://www.grap.udl.cat/ 6 | # 7 | # Author: Juan Carlos Miranda. https://github.com/juancarlosmiranda 8 | 9 | # Remove old packages and make cleaning of the system. 10 | sudo apt-get update 11 | sudo apt-get autoremove 12 | sudo apt-get autoclean 13 | 14 | # Install essential tools 15 | sudo apt-get install -y build-essential 16 | sudo apt-get install -y cmake 17 | sudo apt-get install -y libgtk2.0-dev 18 | sudo apt-get install -y libusb-1.0 19 | sudo apt-get install -y ffmpeg 20 | sudo apt-get install -y mlocate 21 | sudo apt-get install -y locate 22 | sudo apt install -y curl 23 | 24 | # Install repositories Ubuntu 20.04 and Ubuntu 18.04 25 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc 26 | sudo apt-add-repository https://packages.microsoft.com/ubuntu/20.04/prod 27 | sudo apt-get update 28 | 29 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - 30 | sudo apt-add-repository https://packages.microsoft.com/ubuntu/18.04/prod 31 | curl -sSL https://packages.microsoft.com/config/ubuntu/18.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft-prod.list 32 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - 33 | sudo apt-get update 34 | 35 | #Install new package from repository 36 | sudo apt-get update 37 | sudo apt-get install -y libk4a1.4 38 | sudo apt install -y libk4a1.4-dev 39 | # https://packages.ubuntu.com/focal/amd64/libsoundio1/download 40 | # download from mirror libsoundio1, it is a dependence of k4a-tools 41 | wget mirrors.kernel.org/ubuntu/pool/universe/libs/libsoundio/libsoundio1_1.1.0-1_amd64.deb 42 | sudo dpkg -i libsoundio1_1.1.0-1_amd64.deb 43 | sudo apt install -y k4a-tools 44 | 45 | # Copy rules 46 | sudo cp 99-k4a.rules /etc/udev/rules.d/ 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /modif_azure_kinect_linux: -------------------------------------------------------------------------------- 1 | AZURE KINECK EN LINUX 2 | --------------------------- 3 | 4 | I 5 | 6 | 7 | 8 | Intalación - pasos 9 | ------------------ 10 | sudo apt-add-repository https://packages.microsoft.com/ubuntu/20.04/prod 11 | sudo apt-get update 12 | sudo apt-get install libk4a1.4 13 | sudo apt install libk4a1.4-dev 14 | sudo apt install k4a-tools 15 | 16 | 17 | 18 | 19 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - 20 | sudo apt-add-repository https://packages.microsoft.com/ubuntu/18.04/prod 21 | curl -sSL https://packages.microsoft.com/config/ubuntu/18.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft-prod.list 22 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - 23 | sudo apt-get update 24 | sudo apt install libk4a1.3-dev 25 | sudo apt install libk4abt1.0-dev 26 | sudo apt install k4a-tools=1.3.0= 27 | 28 | 29 | 30 | 31 | sudo apt-get update 32 | sudo apt install libk4a1.4.1-dev 33 | sudo apt install k4a-tools=1.3.0= 34 | 35 | 36 | 37 | 38 | 39 | 40 | 17/04/2022 - Camara Azure Kinect MODO RGB 41 | ------------------------------ 42 | La cámara es reconocida en Linux como cámara de color RGB. eL OTRO PASO ES VER SI LA PROFUNDIDAD ES RECONOCIDA. 43 | 44 | 45 | Cleaning files, installing from scratch 46 | -------------- 47 | sudo apt-get update 48 | sudo apt-get autoremove 49 | 50 | Paquetes necesarios y aplicaciones 51 | -------------- 52 | sudo apt-get install build-essential 53 | sudo apt-get install cmake 54 | sudo apt-get install libgtk2.0-dev 55 | sudo apt-get install libusb-1.0 56 | sudo apt-get install ffmpeg 57 | sudo apt-get install mlocate 58 | sudo apt-get install locate 59 | sudo apt install curl 60 | 61 | 62 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc 63 | sudo apt-add-repository https://packages.microsoft.com/ubuntu/20.04/prod 64 | sudo apt-get update 65 | 66 | Install repositories 67 | ---------------- 68 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - 69 | sudo apt-add-repository https://packages.microsoft.com/ubuntu/18.04/prod 70 | 71 | curl -sSL https://packages.microsoft.com/config/ubuntu/18.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft-prod.list 72 | 73 | curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - 74 | sudo apt-get update 75 | 76 | Remove old packages installed before new installation 77 | ------------------- 78 | sudo dpkg --remove libk4a1.3-dev 79 | sudo dpkg --remove libk4abt1.0-dev 80 | sudo dpkg --remove libk4a1.3-dev 81 | sudo dpkg --remove k4a-tools 82 | 83 | sudo dpkg --remove libk4a 84 | sudo dpkg --remove libk4a* 85 | sudo dpkg --remove libk4abt 86 | 87 | sudo apt remove libk4a1.3-dev 88 | sudo apt remove k4a-tools 89 | 90 | 91 | Listar paquetes 92 | ---------- 93 | apt list -a libk4a* 94 | apt list -a libk4abt1.1 95 | sudo apt list -a libk4abt1.1-dev 96 | 97 | Remover paquetes 98 | ------------ 99 | sudo apt remove libk4a* 100 | sudo apt remove libk4abt* 101 | sudo apt remove libk4a1* 102 | 103 | 104 | Installling packages 105 | ------- 106 | sudo apt-get update 107 | sudo apt-get install libk4a1.4 108 | sudo apt install libk4a1.4-dev 109 | sudo apt install k4a-tools 110 | 111 | Copy rules to use Azure Kinect as root 112 | ------------------ 113 | sudo cp 99-k4a.rules /etc/udev/rules.d/ 114 | 115 | 116 | Testing k4aviewer 117 | ------ 118 | sudo k4aviewer 119 | 120 | 121 | Now you can install pyk4a 122 | 123 | 124 | 125 | MUY IMPORTANTE!!! 126 | ------------------- 127 | 128 | nO OLVIDAR COPIAR LAS REGLAS A UDEV 129 | https://github.com/microsoft/Azure-Kinect-Sensor-SDK/blob/develop/docs/usage.md#linux-device-setup 130 | 131 | """ 132 | Linux Device Setup 133 | 134 | On Linux, once attached, the device should automatically enumerate and load all drivers. However, in order to use the Azure Kinect SDK with the device and without being 'root', you will need to setup udev rules. We have these rules checked into this repo under 'scripts/99-k4a.rules'. To do so: 135 | 136 | Copy 'scripts/99-k4a.rules' into '/etc/udev/rules.d/'. 137 | Detach and reattach Azure Kinect devices if attached during this process. 138 | 139 | Once complete, the Azure Kinect camera is available without being 'root'. 140 | """ 141 | 142 | 143 | -------------------------------------------------------------------------------- /recording.bat: -------------------------------------------------------------------------------- 1 | "C:\Program Files\Azure Kinect SDK v1.4.1\tools\k4arecorder.exe" -l 5 “C:\test1.mkv” --------------------------------------------------------------------------------