SlideShare uma empresa Scribd logo
1 de 18
Azure Kinect DK C/C++開発概要(仮)
Self Introduction
杉浦 司 (Tsukasa Sugiura)
- Freelance Programmer
- Microsoft MVP for Windows Development
- Point Cloud Library Maintainer
- @UnaNancyOwen
Azure Kinect DK Sensor
Azure Kinect SDK Introduction
Azure Kinect Sensor SDK
(k4a / k4arecord)
Azure Kinect Body Tracking SDK
(k4abt)
- Color, Depth, Infrared, IMU, Point Cloud
- Open Source Library hosted on GitHub
(Depth Engine is Closed Source)
- Cross Platform (Windows, Linux)
- C API, C++ and C# Wrapper
- Body Index Map, Skeleton (26 Joints/Person)
- Deep Learning based Pose Estimation
- Closed Source Library
- Cross Platform (Windows, Linux)
- C API, (C++ Wrapper)
How to Install Azure Kinect SDK?
Azure Kinect Sensor SDK
- Install Pre-Built SDK using Installer
- Build and Install SDK from Source Code
Azure Kinect Body Tracking SDK
- Install SDK using Installer
- Install NVIDIA GPU Driver and Visual C++ 2015 Runtime
for ONNX Runtime (CUDA Backend)
Download Azure Kinect Body Tracking SDK | Microsoft Docs
https://docs.microsoft.com/en-us/azure/Kinect-dk/body-sdk-download
About Azure Kinect Sensor SDK | Microsoft Docs
https://docs.microsoft.com/en-us/azure/Kinect-dk/about-sensor-sdk
How to Generate Project with Azure Kinect SDK?
cmake_minimum_required( VERSION 3.6 )
project( Solution )
add_executable( Project main.cpp )
# Azure Kinect Sensor SDK (Official Support)
find_package( k4a REQUIRED )
find_package( k4arecord REQUIRED )
# Azure Kinect Body Tracking SDK (Un-Official Support)
set( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" )
find_package( k4abt REQUIRED )
if( k4a_FOUND AND k4arecord_FOUND AND k4abt_FOUND )
target_link_libraries( Project k4a::k4a )
target_link_libraries( Project k4a::k4arecord )
target_link_libraries( Project k4a::k4abt )
endif()
CMake Module for Azure Kinect Sensor SDK | GitHub Gists
https://gist.github.com/UnaNancyOwen/5ce9115ba8b71d12982e5aa9f99788f1#file-findk4abt-cmake
Include CMake and MS Build files in the MSI #370 | GitHub/Azure-Kinect-Sensor-SDK
https://github.com/microsoft/Azure-Kinect-Sensor-SDK/issues/370
Azure Kinect Sensor SDK Overview
Capture Image
Playback
Device
Azure Kinect Sensor SDK Programming
// Azure Kinect Sensor SDK
#include <k4a/k4a.h>
#include <k4a/k4a.hpp> /* C++ Wrapper */
// Get Connected Devices
const int32_t device_count = k4a::device::get_installed_count();
if( device_count == 0 ){
throw k4a::error( "Failed to found device!" );
}
// Open Default Device
k4a::device device = k4a::device::open( K4A_DEVICE_DEFAULT );
// Start Cameras with Configuration
k4a_device_configuration_t configuration = K4A_DEVICE_CONFIG_INIT_DISABLE_ALL;
configuration.color_format = K4A_IMAGE_FORMAT_COLOR_BGRA32;
configuration.color_resolution = K4A_COLOR_RESOLUTION_1080P;
configuration.depth_mode = K4A_DEPTH_MODE_NFOV_UNBINNED;
configuration.wired_sync_mode = K4A_WIRED_SYNC_MODE_STANDALONE;
configuration.synchronized_images_only = true;
device.start_cameras( &configuration );
Azure Kinect Sensor SDK Programming
// Get Capture
k4a::capture capture;
const std::chrono::milliseconds timeout( K4A_WAIT_INFINITE );
const bool result = device.get_capture( &capture, timeout );
if( !result ){
break;
}
// Get Color Image
k4a::image color_image = capture.get_color_image();
cv::Mat color = k4a::get_mat( color_image );
// Get Depth Image
k4a::image depth_image = capture.get_depth_image();
cv::Mat depth = k4a::get_mat( depth_image );
- k4a::get_mat() is utility function that defined in util.h
Utility for Azure Kinect Sensor SDK | GitHub Gists
https://gist.github.com/UnaNancyOwen/9f16ce7ea4c2673fe08b4ce4804fc209#file-util-h
Azure Kinect Sensor SDK Programming
// Show Image
depth.convertTo( depth, CV_8U, -255.0 / 5000.0, 255.0 );
cv::imshow( "color", color );
cv::imshow( "depth", depth );
// Wait Key
const int32_t key = cv::waitKey( 30 );
if( key == 'q' ){
break;
}
// Close Device
device.close();
// Clear Handle
color_image.reset();
depth_image.reset();
capture.reset();
Azure Kinect Sensor SDK Programming
// Initialize Transformation
k4a::calibration calibration = device.get_calibration( configuration.depth_mode, configuration.color_resolution );
k4a::transformation transformation = k4a::transformation( calibration );
// Transform Color Image to Depth Camera
k4a::image transformed_color_image = transformation.color_image_to_depth_camera( depth_image, color_image );
cv::Mat transformed_color = k4a::get_mat( transformed_color_image );
// Transform Depth Image to Color Camera
k4a::image transformed_depth_image = transformation.depth_image_to_color_camera( depth_image );
cv::Mat transformed_depth = k4a::get_mat( transformed_depth_image );
// Transform Depth Image to Point Cloud
k4a::image xyz_image = transformation.depth_image_to_point_cloud( depth_image, K4A_CALIBRATION_TYPE_DEPTH );
//k4a::image xyz_image = transformation.depth_image_to_point_cloud( transformed_depth_image, K4A_CALIBRATION_TYPE_COLOR );
cv::Mat xyz = k4a::get_mat( xyz_image );
- Transform Image to Other Coordinate System
Color Image → Depth Camera
Depth Image → Color Camera
Depth Image → Point Cloud
Add overload functions that returns k4a::image in k4a::transformation #596 | GitHub/Azure-Kinect-Sensor-SDK
https://github.com/microsoft/Azure-Kinect-Sensor-SDK/pull/596
// Close Transformation
transformation.destroy();
Azure Kinect Sensor SDK Programming
// Azure Kinect Sensor SDK
#include <k4arecord/playback.h>
#include <k4arecord/playback.hpp> /* C++ Wrapper from Azure Kinect Sensor SDK v1.2.0 */
// Open Playback File
k4a::playback playback = k4a::playback::open( "./path/to/file.mkv" );
// Get Capture
k4a::capture capture;
bool result = playback.get_next_capture( &capture );
if( !result ){
break;
}
// Close Playback
playback.close();
- NOTE: k4arecorder (Azure Kinect Sensor SDK v1.1.x) has a bug that first 2-frames are empty.
Move C++ wrapper for playback #493 | GitHub/Azure-Kinect-Sensor-SDK
https://github.com/microsoft/Azure-Kinect-Sensor-SDK/pull/493
Azure Kinect Sensor SDK Programming
Azure Kinect Office Sample Recordings | Microsoft Download Center
https://www.microsoft.com/en-us/download/details.aspx?id=58385
Azure Kinect Body Tracking SDK Overview
Capture Queue
Playback
Device
Frame Body
Azure Kinect Body Tracking SDK Programming
// Azure Kinect Body Tracking SDK
#include <k4abt.h>
#include "k4abt.hpp" /* Un-Official C++ Wrapper */
//#include <k4abt.hpp> /* Official C++ Wrapper Provide from Next Release */
// Create Tracker
k4abt::tracker tracker = k4abt::tracker::create( calibration );
if( !tracker ){
throw k4a::error( "Failed to create tracker!" );
}
// Enqueue Capture
tracker.enqueue_capture( capture );
// Pop Tracker Result
k4abt::frame body_frame = tracker.pop_result();
- Official C++ wrapper is coming soon …
C++Wrapper for Azure Kinect Body Tracking SDK | GitHub Gists
https://gist.github.com/UnaNancyOwen/41b578f5d272aa6f22cf8ff6565fb71b#file-k4abt-hpp
Azure Kinect Body Tracking SDK Programming
// Get Body Index Map
k4a::image body_index_map_image = body_frame.get_body_index_map();
cv::Mat body_index_map = k4a::get_mat( body_index_map_image );
// Draw Body Index Map
cv::Mat body_index = cv::Mat::zeros( body_index_map.size(), CV_8UC3 );
body_index.forEach<cv::Vec3b>(
[&]( cv::Vec3b& pixel, const int32_t* position ){
const int32_t x = position[1], y = position[0];
const uint32_t index = body_index_map.at<uint8_t>( y, x );
if( index != K4ABT_BODY_INDEX_MAP_BACKGROUND ){
pixel = colors[index % colors.size()];
}
}
);
- Background Index is 255 (K4ABT_BODY_INDEX_MAP_BACKGROUND)
Azure Kinect Body Tracking SDK Programming
// Get Body Skeleton
std::vector<k4abt_body_t> bodies = body_frame.get_bodies();
// Get Image that used for Inference
k4a::capture body_capture = body_frame.get_capture();
k4a::image skeleton_image = body_capture.get_color_image();
cv::Mat skeleton = k4a::get_mat( skeleton_image );
// Draw Body Skeleton
for( const k4abt_body_t& body : bodies ){
for( const k4abt_joint_t& joint : body.skeleton.joints ){
k4a_float2_t position;
const bool result = calibration.convert_3d_to_2d( joint.position, K4A_CALIBRATION_TYPE_DEPTH, K4A_CALIBRATION_TYPE_COLOR, &position );
if( !result ){
continue;
}
const int32_t id = body.id;
const cv::Point point( static_cast<int32_t>( position.xy.x ), static_cast<int32_t>( position.xy.y ) );
cv::circle( skeleton, point, 5, colors[id % colors.size()], -1 );
}
}
- Get Image that used for Inference
- Convert Joint Position (3D) to 2D for Draw Circle on Image
Azure Kinect Body Tracking SDK Programming
// Show Image
cv::imshow( "body index", body_index );
cv::imshow( "skeleton", skeleton );
// Wait Key
const int32_t key = cv::waitKey( 30 );
if( key == 'q' ){
break;
}
// Close Tracker
tracker.destroy();
// Clear Handle
body_index_map_image.reset();
skeleton_image.reset();
body_capture.reset();
body_frame.reset();

Mais conteúdo relacionado

Mais procurados

【DL輪読会】AuthenticAuthentic Volumetric Avatars from a Phone Scan
【DL輪読会】AuthenticAuthentic Volumetric Avatars from a Phone Scan【DL輪読会】AuthenticAuthentic Volumetric Avatars from a Phone Scan
【DL輪読会】AuthenticAuthentic Volumetric Avatars from a Phone ScanDeep Learning JP
 
DockerコンテナでGitを使う
DockerコンテナでGitを使うDockerコンテナでGitを使う
DockerコンテナでGitを使うKazuhiro Suga
 
【DL輪読会】"Instant Neural Graphics Primitives with a Multiresolution Hash Encoding"
【DL輪読会】"Instant Neural Graphics Primitives with a Multiresolution Hash Encoding"【DL輪読会】"Instant Neural Graphics Primitives with a Multiresolution Hash Encoding"
【DL輪読会】"Instant Neural Graphics Primitives with a Multiresolution Hash Encoding"Deep Learning JP
 
SSII2018TS: 3D物体検出とロボットビジョンへの応用
SSII2018TS: 3D物体検出とロボットビジョンへの応用SSII2018TS: 3D物体検出とロボットビジョンへの応用
SSII2018TS: 3D物体検出とロボットビジョンへの応用SSII
 
ピクサー USD 入門 新たなコンテンツパイプラインを構築する
ピクサー USD 入門 新たなコンテンツパイプラインを構築するピクサー USD 入門 新たなコンテンツパイプラインを構築する
ピクサー USD 入門 新たなコンテンツパイプラインを構築するTakahito Tejima
 
macOSの仮想化技術について ~Virtualization-rs Rust bindings for virtualization.framework ~
macOSの仮想化技術について ~Virtualization-rs Rust bindings for virtualization.framework ~macOSの仮想化技術について ~Virtualization-rs Rust bindings for virtualization.framework ~
macOSの仮想化技術について ~Virtualization-rs Rust bindings for virtualization.framework ~NTT Communications Technology Development
 
Cvpr2021で発表されたvirtual try on まとめ
Cvpr2021で発表されたvirtual try on まとめCvpr2021で発表されたvirtual try on まとめ
Cvpr2021で発表されたvirtual try on まとめyuichi takeda
 
マルチコアを用いた画像処理
マルチコアを用いた画像処理マルチコアを用いた画像処理
マルチコアを用いた画像処理Norishige Fukushima
 
コンピュータビジョンの最新ソフトウェア開発環境 SSII2015 チュートリアル hayashi
コンピュータビジョンの最新ソフトウェア開発環境 SSII2015 チュートリアル hayashiコンピュータビジョンの最新ソフトウェア開発環境 SSII2015 チュートリアル hayashi
コンピュータビジョンの最新ソフトウェア開発環境 SSII2015 チュートリアル hayashiMasaki Hayashi
 
Machine learning CI/CD with OSS
Machine learning CI/CD with OSSMachine learning CI/CD with OSS
Machine learning CI/CD with OSSyusuke shibui
 
SuperGlue; Learning Feature Matching with Graph Neural Networks (CVPR'20)
SuperGlue;Learning Feature Matching with Graph Neural Networks (CVPR'20)SuperGlue;Learning Feature Matching with Graph Neural Networks (CVPR'20)
SuperGlue; Learning Feature Matching with Graph Neural Networks (CVPR'20)Yusuke Uchida
 
MediaPipeの紹介
MediaPipeの紹介MediaPipeの紹介
MediaPipeの紹介emakryo
 
【DL輪読会】Vision-Centric BEV Perception: A Survey
【DL輪読会】Vision-Centric BEV Perception: A Survey【DL輪読会】Vision-Centric BEV Perception: A Survey
【DL輪読会】Vision-Centric BEV Perception: A SurveyDeep Learning JP
 
ロボティクスにおける SLAM 手法と実用化例
ロボティクスにおける SLAM 手法と実用化例ロボティクスにおける SLAM 手法と実用化例
ロボティクスにおける SLAM 手法と実用化例Yoshitaka HARA
 
「NVIDIA プロファイラを用いたPyTorch学習最適化手法のご紹介(修正前 typoあり)」
「NVIDIA プロファイラを用いたPyTorch学習最適化手法のご紹介(修正前 typoあり)」「NVIDIA プロファイラを用いたPyTorch学習最適化手法のご紹介(修正前 typoあり)」
「NVIDIA プロファイラを用いたPyTorch学習最適化手法のご紹介(修正前 typoあり)」ManaMurakami1
 
Cvpr 2021 manydepth
Cvpr 2021 manydepthCvpr 2021 manydepth
Cvpr 2021 manydepthKenta Tanaka
 
ゴリラテスト モバイルゲームのUIを自動的に検出・操作する モンキーテスト
ゴリラテスト  モバイルゲームのUIを自動的に検出・操作する モンキーテストゴリラテスト  モバイルゲームのUIを自動的に検出・操作する モンキーテスト
ゴリラテスト モバイルゲームのUIを自動的に検出・操作する モンキーテストKLab Inc. / Tech
 
OpenCVを用いた画像処理入門
OpenCVを用いた画像処理入門OpenCVを用いた画像処理入門
OpenCVを用いた画像処理入門uranishi
 
【DL輪読会】DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Dri...
【DL輪読会】DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Dri...【DL輪読会】DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Dri...
【DL輪読会】DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Dri...Deep Learning JP
 

Mais procurados (20)

【DL輪読会】AuthenticAuthentic Volumetric Avatars from a Phone Scan
【DL輪読会】AuthenticAuthentic Volumetric Avatars from a Phone Scan【DL輪読会】AuthenticAuthentic Volumetric Avatars from a Phone Scan
【DL輪読会】AuthenticAuthentic Volumetric Avatars from a Phone Scan
 
DockerコンテナでGitを使う
DockerコンテナでGitを使うDockerコンテナでGitを使う
DockerコンテナでGitを使う
 
【DL輪読会】"Instant Neural Graphics Primitives with a Multiresolution Hash Encoding"
【DL輪読会】"Instant Neural Graphics Primitives with a Multiresolution Hash Encoding"【DL輪読会】"Instant Neural Graphics Primitives with a Multiresolution Hash Encoding"
【DL輪読会】"Instant Neural Graphics Primitives with a Multiresolution Hash Encoding"
 
SSII2018TS: 3D物体検出とロボットビジョンへの応用
SSII2018TS: 3D物体検出とロボットビジョンへの応用SSII2018TS: 3D物体検出とロボットビジョンへの応用
SSII2018TS: 3D物体検出とロボットビジョンへの応用
 
ピクサー USD 入門 新たなコンテンツパイプラインを構築する
ピクサー USD 入門 新たなコンテンツパイプラインを構築するピクサー USD 入門 新たなコンテンツパイプラインを構築する
ピクサー USD 入門 新たなコンテンツパイプラインを構築する
 
macOSの仮想化技術について ~Virtualization-rs Rust bindings for virtualization.framework ~
macOSの仮想化技術について ~Virtualization-rs Rust bindings for virtualization.framework ~macOSの仮想化技術について ~Virtualization-rs Rust bindings for virtualization.framework ~
macOSの仮想化技術について ~Virtualization-rs Rust bindings for virtualization.framework ~
 
Cvpr2021で発表されたvirtual try on まとめ
Cvpr2021で発表されたvirtual try on まとめCvpr2021で発表されたvirtual try on まとめ
Cvpr2021で発表されたvirtual try on まとめ
 
マルチコアを用いた画像処理
マルチコアを用いた画像処理マルチコアを用いた画像処理
マルチコアを用いた画像処理
 
コンピュータビジョンの最新ソフトウェア開発環境 SSII2015 チュートリアル hayashi
コンピュータビジョンの最新ソフトウェア開発環境 SSII2015 チュートリアル hayashiコンピュータビジョンの最新ソフトウェア開発環境 SSII2015 チュートリアル hayashi
コンピュータビジョンの最新ソフトウェア開発環境 SSII2015 チュートリアル hayashi
 
Machine learning CI/CD with OSS
Machine learning CI/CD with OSSMachine learning CI/CD with OSS
Machine learning CI/CD with OSS
 
SuperGlue; Learning Feature Matching with Graph Neural Networks (CVPR'20)
SuperGlue;Learning Feature Matching with Graph Neural Networks (CVPR'20)SuperGlue;Learning Feature Matching with Graph Neural Networks (CVPR'20)
SuperGlue; Learning Feature Matching with Graph Neural Networks (CVPR'20)
 
MediaPipeの紹介
MediaPipeの紹介MediaPipeの紹介
MediaPipeの紹介
 
【DL輪読会】Vision-Centric BEV Perception: A Survey
【DL輪読会】Vision-Centric BEV Perception: A Survey【DL輪読会】Vision-Centric BEV Perception: A Survey
【DL輪読会】Vision-Centric BEV Perception: A Survey
 
ロボティクスにおける SLAM 手法と実用化例
ロボティクスにおける SLAM 手法と実用化例ロボティクスにおける SLAM 手法と実用化例
ロボティクスにおける SLAM 手法と実用化例
 
「NVIDIA プロファイラを用いたPyTorch学習最適化手法のご紹介(修正前 typoあり)」
「NVIDIA プロファイラを用いたPyTorch学習最適化手法のご紹介(修正前 typoあり)」「NVIDIA プロファイラを用いたPyTorch学習最適化手法のご紹介(修正前 typoあり)」
「NVIDIA プロファイラを用いたPyTorch学習最適化手法のご紹介(修正前 typoあり)」
 
Cvpr 2021 manydepth
Cvpr 2021 manydepthCvpr 2021 manydepth
Cvpr 2021 manydepth
 
ゴリラテスト モバイルゲームのUIを自動的に検出・操作する モンキーテスト
ゴリラテスト  モバイルゲームのUIを自動的に検出・操作する モンキーテストゴリラテスト  モバイルゲームのUIを自動的に検出・操作する モンキーテスト
ゴリラテスト モバイルゲームのUIを自動的に検出・操作する モンキーテスト
 
OpenCVを用いた画像処理入門
OpenCVを用いた画像処理入門OpenCVを用いた画像処理入門
OpenCVを用いた画像処理入門
 
UnityとROSの連携について
UnityとROSの連携についてUnityとROSの連携について
UnityとROSの連携について
 
【DL輪読会】DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Dri...
【DL輪読会】DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Dri...【DL輪読会】DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Dri...
【DL輪読会】DreamBooth: Fine Tuning Text-to-Image Diffusion Models for Subject-Dri...
 

Semelhante a Azure Kinect DK C/C++ 開発概要(仮)

Augmented World Expo 2013 Mobile AR SDK Comparison and Tutorial
Augmented World Expo 2013 Mobile AR SDK Comparison and TutorialAugmented World Expo 2013 Mobile AR SDK Comparison and Tutorial
Augmented World Expo 2013 Mobile AR SDK Comparison and TutorialPatrick O'Shaughnessey
 
PyKinect: Body Iteration Application Development Using Python
PyKinect: Body Iteration Application Development Using PythonPyKinect: Body Iteration Application Development Using Python
PyKinect: Body Iteration Application Development Using Pythonpycontw
 
Optimizing NN inference performance on Arm NEON and Vulkan
Optimizing NN inference performance on Arm NEON and VulkanOptimizing NN inference performance on Arm NEON and Vulkan
Optimizing NN inference performance on Arm NEON and Vulkanax inc.
 
Cassandra Summit 2014: Highly Scalable Web Application in the Cloud with Cass...
Cassandra Summit 2014: Highly Scalable Web Application in the Cloud with Cass...Cassandra Summit 2014: Highly Scalable Web Application in the Cloud with Cass...
Cassandra Summit 2014: Highly Scalable Web Application in the Cloud with Cass...DataStax Academy
 
VPC Implementation In OpenStack Heat
VPC Implementation In OpenStack HeatVPC Implementation In OpenStack Heat
VPC Implementation In OpenStack HeatSaju Madhavan
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceBen Hall
 
Deploy Deep Learning Application with Azure Container Instance - Devdays2018
Deploy Deep Learning Application with Azure Container Instance - Devdays2018Deploy Deep Learning Application with Azure Container Instance - Devdays2018
Deploy Deep Learning Application with Azure Container Instance - Devdays2018Mia Chang
 
Breizhcamp Rennes 2011
Breizhcamp Rennes 2011Breizhcamp Rennes 2011
Breizhcamp Rennes 2011sekond0
 
Serverless Container with Source2Image
Serverless Container with Source2ImageServerless Container with Source2Image
Serverless Container with Source2ImageQAware GmbH
 
Serverless containers … with source-to-image
Serverless containers  … with source-to-imageServerless containers  … with source-to-image
Serverless containers … with source-to-imageJosef Adersberger
 
What is serveless?
What is serveless? What is serveless?
What is serveless? Provectus
 
OSDN: Serverless technologies with Kubernetes
OSDN: Serverless technologies with Kubernetes OSDN: Serverless technologies with Kubernetes
OSDN: Serverless technologies with Kubernetes Provectus
 
Dockerized .Net Core based app services in azure K8s
Dockerized .Net Core based app services in azure K8s Dockerized .Net Core based app services in azure K8s
Dockerized .Net Core based app services in azure K8s Ranjeet Bhargava
 
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024Cloud Native NoVA
 
Mobile AR SDK Tutorial - Augmented World Expo New York 2014
Mobile AR SDK Tutorial - Augmented World Expo New York 2014Mobile AR SDK Tutorial - Augmented World Expo New York 2014
Mobile AR SDK Tutorial - Augmented World Expo New York 2014Patrick O'Shaughnessey
 
426 lecture 4: AR Developer Tools
426 lecture 4: AR Developer Tools426 lecture 4: AR Developer Tools
426 lecture 4: AR Developer ToolsMark Billinghurst
 
Exploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonExploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonIvan Ma
 
Getting Started with Apache Spark on Kubernetes
Getting Started with Apache Spark on KubernetesGetting Started with Apache Spark on Kubernetes
Getting Started with Apache Spark on KubernetesDatabricks
 

Semelhante a Azure Kinect DK C/C++ 開発概要(仮) (20)

Deep Learning Edge
Deep Learning Edge Deep Learning Edge
Deep Learning Edge
 
Augmented World Expo 2013 Mobile AR SDK Comparison and Tutorial
Augmented World Expo 2013 Mobile AR SDK Comparison and TutorialAugmented World Expo 2013 Mobile AR SDK Comparison and Tutorial
Augmented World Expo 2013 Mobile AR SDK Comparison and Tutorial
 
FLAR Workflow
FLAR WorkflowFLAR Workflow
FLAR Workflow
 
PyKinect: Body Iteration Application Development Using Python
PyKinect: Body Iteration Application Development Using PythonPyKinect: Body Iteration Application Development Using Python
PyKinect: Body Iteration Application Development Using Python
 
Optimizing NN inference performance on Arm NEON and Vulkan
Optimizing NN inference performance on Arm NEON and VulkanOptimizing NN inference performance on Arm NEON and Vulkan
Optimizing NN inference performance on Arm NEON and Vulkan
 
Cassandra Summit 2014: Highly Scalable Web Application in the Cloud with Cass...
Cassandra Summit 2014: Highly Scalable Web Application in the Cloud with Cass...Cassandra Summit 2014: Highly Scalable Web Application in the Cloud with Cass...
Cassandra Summit 2014: Highly Scalable Web Application in the Cloud with Cass...
 
VPC Implementation In OpenStack Heat
VPC Implementation In OpenStack HeatVPC Implementation In OpenStack Heat
VPC Implementation In OpenStack Heat
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
 
Deploy Deep Learning Application with Azure Container Instance - Devdays2018
Deploy Deep Learning Application with Azure Container Instance - Devdays2018Deploy Deep Learning Application with Azure Container Instance - Devdays2018
Deploy Deep Learning Application with Azure Container Instance - Devdays2018
 
Breizhcamp Rennes 2011
Breizhcamp Rennes 2011Breizhcamp Rennes 2011
Breizhcamp Rennes 2011
 
Serverless Container with Source2Image
Serverless Container with Source2ImageServerless Container with Source2Image
Serverless Container with Source2Image
 
Serverless containers … with source-to-image
Serverless containers  … with source-to-imageServerless containers  … with source-to-image
Serverless containers … with source-to-image
 
What is serveless?
What is serveless? What is serveless?
What is serveless?
 
OSDN: Serverless technologies with Kubernetes
OSDN: Serverless technologies with Kubernetes OSDN: Serverless technologies with Kubernetes
OSDN: Serverless technologies with Kubernetes
 
Dockerized .Net Core based app services in azure K8s
Dockerized .Net Core based app services in azure K8s Dockerized .Net Core based app services in azure K8s
Dockerized .Net Core based app services in azure K8s
 
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
 
Mobile AR SDK Tutorial - Augmented World Expo New York 2014
Mobile AR SDK Tutorial - Augmented World Expo New York 2014Mobile AR SDK Tutorial - Augmented World Expo New York 2014
Mobile AR SDK Tutorial - Augmented World Expo New York 2014
 
426 lecture 4: AR Developer Tools
426 lecture 4: AR Developer Tools426 lecture 4: AR Developer Tools
426 lecture 4: AR Developer Tools
 
Exploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonExploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in Python
 
Getting Started with Apache Spark on Kubernetes
Getting Started with Apache Spark on KubernetesGetting Started with Apache Spark on Kubernetes
Getting Started with Apache Spark on Kubernetes
 

Mais de Tsukasa Sugiura

OpenCVとPCLでのRealSenseのサポート状況+α
OpenCVとPCLでのRealSenseのサポート状況+αOpenCVとPCLでのRealSenseのサポート状況+α
OpenCVとPCLでのRealSenseのサポート状況+αTsukasa Sugiura
 
第38回 名古屋CV・PRML勉強会 「Kinect v2本の紹介とPCLの概要」
第38回 名古屋CV・PRML勉強会 「Kinect v2本の紹介とPCLの概要」第38回 名古屋CV・PRML勉強会 「Kinect v2本の紹介とPCLの概要」
第38回 名古屋CV・PRML勉強会 「Kinect v2本の紹介とPCLの概要」Tsukasa Sugiura
 
Kinect v2 Introduction and Tutorial
Kinect v2 Introduction and TutorialKinect v2 Introduction and Tutorial
Kinect v2 Introduction and TutorialTsukasa Sugiura
 
Introduction to Kinect v2
Introduction to Kinect v2Introduction to Kinect v2
Introduction to Kinect v2Tsukasa Sugiura
 
ViEW2013 「SS-01 画像センサと応用事例の紹介」
ViEW2013 「SS-01 画像センサと応用事例の紹介」ViEW2013 「SS-01 画像センサと応用事例の紹介」
ViEW2013 「SS-01 画像センサと応用事例の紹介」Tsukasa Sugiura
 
Leap Motion - 1st Review
Leap Motion - 1st ReviewLeap Motion - 1st Review
Leap Motion - 1st ReviewTsukasa Sugiura
 
OpenCV2.2 Install Guide ver.0.5
OpenCV2.2 Install Guide ver.0.5OpenCV2.2 Install Guide ver.0.5
OpenCV2.2 Install Guide ver.0.5Tsukasa Sugiura
 
第2回名古屋CV・PRML勉強会 「Kinectの導入」
第2回名古屋CV・PRML勉強会 「Kinectの導入」第2回名古屋CV・PRML勉強会 「Kinectの導入」
第2回名古屋CV・PRML勉強会 「Kinectの導入」Tsukasa Sugiura
 

Mais de Tsukasa Sugiura (8)

OpenCVとPCLでのRealSenseのサポート状況+α
OpenCVとPCLでのRealSenseのサポート状況+αOpenCVとPCLでのRealSenseのサポート状況+α
OpenCVとPCLでのRealSenseのサポート状況+α
 
第38回 名古屋CV・PRML勉強会 「Kinect v2本の紹介とPCLの概要」
第38回 名古屋CV・PRML勉強会 「Kinect v2本の紹介とPCLの概要」第38回 名古屋CV・PRML勉強会 「Kinect v2本の紹介とPCLの概要」
第38回 名古屋CV・PRML勉強会 「Kinect v2本の紹介とPCLの概要」
 
Kinect v2 Introduction and Tutorial
Kinect v2 Introduction and TutorialKinect v2 Introduction and Tutorial
Kinect v2 Introduction and Tutorial
 
Introduction to Kinect v2
Introduction to Kinect v2Introduction to Kinect v2
Introduction to Kinect v2
 
ViEW2013 「SS-01 画像センサと応用事例の紹介」
ViEW2013 「SS-01 画像センサと応用事例の紹介」ViEW2013 「SS-01 画像センサと応用事例の紹介」
ViEW2013 「SS-01 画像センサと応用事例の紹介」
 
Leap Motion - 1st Review
Leap Motion - 1st ReviewLeap Motion - 1st Review
Leap Motion - 1st Review
 
OpenCV2.2 Install Guide ver.0.5
OpenCV2.2 Install Guide ver.0.5OpenCV2.2 Install Guide ver.0.5
OpenCV2.2 Install Guide ver.0.5
 
第2回名古屋CV・PRML勉強会 「Kinectの導入」
第2回名古屋CV・PRML勉強会 「Kinectの導入」第2回名古屋CV・PRML勉強会 「Kinectの導入」
第2回名古屋CV・PRML勉強会 「Kinectの導入」
 

Último

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 

Último (20)

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 

Azure Kinect DK C/C++ 開発概要(仮)

  • 1. Azure Kinect DK C/C++開発概要(仮)
  • 2. Self Introduction 杉浦 司 (Tsukasa Sugiura) - Freelance Programmer - Microsoft MVP for Windows Development - Point Cloud Library Maintainer - @UnaNancyOwen
  • 4. Azure Kinect SDK Introduction Azure Kinect Sensor SDK (k4a / k4arecord) Azure Kinect Body Tracking SDK (k4abt) - Color, Depth, Infrared, IMU, Point Cloud - Open Source Library hosted on GitHub (Depth Engine is Closed Source) - Cross Platform (Windows, Linux) - C API, C++ and C# Wrapper - Body Index Map, Skeleton (26 Joints/Person) - Deep Learning based Pose Estimation - Closed Source Library - Cross Platform (Windows, Linux) - C API, (C++ Wrapper)
  • 5. How to Install Azure Kinect SDK? Azure Kinect Sensor SDK - Install Pre-Built SDK using Installer - Build and Install SDK from Source Code Azure Kinect Body Tracking SDK - Install SDK using Installer - Install NVIDIA GPU Driver and Visual C++ 2015 Runtime for ONNX Runtime (CUDA Backend) Download Azure Kinect Body Tracking SDK | Microsoft Docs https://docs.microsoft.com/en-us/azure/Kinect-dk/body-sdk-download About Azure Kinect Sensor SDK | Microsoft Docs https://docs.microsoft.com/en-us/azure/Kinect-dk/about-sensor-sdk
  • 6. How to Generate Project with Azure Kinect SDK? cmake_minimum_required( VERSION 3.6 ) project( Solution ) add_executable( Project main.cpp ) # Azure Kinect Sensor SDK (Official Support) find_package( k4a REQUIRED ) find_package( k4arecord REQUIRED ) # Azure Kinect Body Tracking SDK (Un-Official Support) set( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" ) find_package( k4abt REQUIRED ) if( k4a_FOUND AND k4arecord_FOUND AND k4abt_FOUND ) target_link_libraries( Project k4a::k4a ) target_link_libraries( Project k4a::k4arecord ) target_link_libraries( Project k4a::k4abt ) endif() CMake Module for Azure Kinect Sensor SDK | GitHub Gists https://gist.github.com/UnaNancyOwen/5ce9115ba8b71d12982e5aa9f99788f1#file-findk4abt-cmake Include CMake and MS Build files in the MSI #370 | GitHub/Azure-Kinect-Sensor-SDK https://github.com/microsoft/Azure-Kinect-Sensor-SDK/issues/370
  • 7. Azure Kinect Sensor SDK Overview Capture Image Playback Device
  • 8. Azure Kinect Sensor SDK Programming // Azure Kinect Sensor SDK #include <k4a/k4a.h> #include <k4a/k4a.hpp> /* C++ Wrapper */ // Get Connected Devices const int32_t device_count = k4a::device::get_installed_count(); if( device_count == 0 ){ throw k4a::error( "Failed to found device!" ); } // Open Default Device k4a::device device = k4a::device::open( K4A_DEVICE_DEFAULT ); // Start Cameras with Configuration k4a_device_configuration_t configuration = K4A_DEVICE_CONFIG_INIT_DISABLE_ALL; configuration.color_format = K4A_IMAGE_FORMAT_COLOR_BGRA32; configuration.color_resolution = K4A_COLOR_RESOLUTION_1080P; configuration.depth_mode = K4A_DEPTH_MODE_NFOV_UNBINNED; configuration.wired_sync_mode = K4A_WIRED_SYNC_MODE_STANDALONE; configuration.synchronized_images_only = true; device.start_cameras( &configuration );
  • 9. Azure Kinect Sensor SDK Programming // Get Capture k4a::capture capture; const std::chrono::milliseconds timeout( K4A_WAIT_INFINITE ); const bool result = device.get_capture( &capture, timeout ); if( !result ){ break; } // Get Color Image k4a::image color_image = capture.get_color_image(); cv::Mat color = k4a::get_mat( color_image ); // Get Depth Image k4a::image depth_image = capture.get_depth_image(); cv::Mat depth = k4a::get_mat( depth_image ); - k4a::get_mat() is utility function that defined in util.h Utility for Azure Kinect Sensor SDK | GitHub Gists https://gist.github.com/UnaNancyOwen/9f16ce7ea4c2673fe08b4ce4804fc209#file-util-h
  • 10. Azure Kinect Sensor SDK Programming // Show Image depth.convertTo( depth, CV_8U, -255.0 / 5000.0, 255.0 ); cv::imshow( "color", color ); cv::imshow( "depth", depth ); // Wait Key const int32_t key = cv::waitKey( 30 ); if( key == 'q' ){ break; } // Close Device device.close(); // Clear Handle color_image.reset(); depth_image.reset(); capture.reset();
  • 11. Azure Kinect Sensor SDK Programming // Initialize Transformation k4a::calibration calibration = device.get_calibration( configuration.depth_mode, configuration.color_resolution ); k4a::transformation transformation = k4a::transformation( calibration ); // Transform Color Image to Depth Camera k4a::image transformed_color_image = transformation.color_image_to_depth_camera( depth_image, color_image ); cv::Mat transformed_color = k4a::get_mat( transformed_color_image ); // Transform Depth Image to Color Camera k4a::image transformed_depth_image = transformation.depth_image_to_color_camera( depth_image ); cv::Mat transformed_depth = k4a::get_mat( transformed_depth_image ); // Transform Depth Image to Point Cloud k4a::image xyz_image = transformation.depth_image_to_point_cloud( depth_image, K4A_CALIBRATION_TYPE_DEPTH ); //k4a::image xyz_image = transformation.depth_image_to_point_cloud( transformed_depth_image, K4A_CALIBRATION_TYPE_COLOR ); cv::Mat xyz = k4a::get_mat( xyz_image ); - Transform Image to Other Coordinate System Color Image → Depth Camera Depth Image → Color Camera Depth Image → Point Cloud Add overload functions that returns k4a::image in k4a::transformation #596 | GitHub/Azure-Kinect-Sensor-SDK https://github.com/microsoft/Azure-Kinect-Sensor-SDK/pull/596 // Close Transformation transformation.destroy();
  • 12. Azure Kinect Sensor SDK Programming // Azure Kinect Sensor SDK #include <k4arecord/playback.h> #include <k4arecord/playback.hpp> /* C++ Wrapper from Azure Kinect Sensor SDK v1.2.0 */ // Open Playback File k4a::playback playback = k4a::playback::open( "./path/to/file.mkv" ); // Get Capture k4a::capture capture; bool result = playback.get_next_capture( &capture ); if( !result ){ break; } // Close Playback playback.close(); - NOTE: k4arecorder (Azure Kinect Sensor SDK v1.1.x) has a bug that first 2-frames are empty. Move C++ wrapper for playback #493 | GitHub/Azure-Kinect-Sensor-SDK https://github.com/microsoft/Azure-Kinect-Sensor-SDK/pull/493
  • 13. Azure Kinect Sensor SDK Programming Azure Kinect Office Sample Recordings | Microsoft Download Center https://www.microsoft.com/en-us/download/details.aspx?id=58385
  • 14. Azure Kinect Body Tracking SDK Overview Capture Queue Playback Device Frame Body
  • 15. Azure Kinect Body Tracking SDK Programming // Azure Kinect Body Tracking SDK #include <k4abt.h> #include "k4abt.hpp" /* Un-Official C++ Wrapper */ //#include <k4abt.hpp> /* Official C++ Wrapper Provide from Next Release */ // Create Tracker k4abt::tracker tracker = k4abt::tracker::create( calibration ); if( !tracker ){ throw k4a::error( "Failed to create tracker!" ); } // Enqueue Capture tracker.enqueue_capture( capture ); // Pop Tracker Result k4abt::frame body_frame = tracker.pop_result(); - Official C++ wrapper is coming soon … C++Wrapper for Azure Kinect Body Tracking SDK | GitHub Gists https://gist.github.com/UnaNancyOwen/41b578f5d272aa6f22cf8ff6565fb71b#file-k4abt-hpp
  • 16. Azure Kinect Body Tracking SDK Programming // Get Body Index Map k4a::image body_index_map_image = body_frame.get_body_index_map(); cv::Mat body_index_map = k4a::get_mat( body_index_map_image ); // Draw Body Index Map cv::Mat body_index = cv::Mat::zeros( body_index_map.size(), CV_8UC3 ); body_index.forEach<cv::Vec3b>( [&]( cv::Vec3b& pixel, const int32_t* position ){ const int32_t x = position[1], y = position[0]; const uint32_t index = body_index_map.at<uint8_t>( y, x ); if( index != K4ABT_BODY_INDEX_MAP_BACKGROUND ){ pixel = colors[index % colors.size()]; } } ); - Background Index is 255 (K4ABT_BODY_INDEX_MAP_BACKGROUND)
  • 17. Azure Kinect Body Tracking SDK Programming // Get Body Skeleton std::vector<k4abt_body_t> bodies = body_frame.get_bodies(); // Get Image that used for Inference k4a::capture body_capture = body_frame.get_capture(); k4a::image skeleton_image = body_capture.get_color_image(); cv::Mat skeleton = k4a::get_mat( skeleton_image ); // Draw Body Skeleton for( const k4abt_body_t& body : bodies ){ for( const k4abt_joint_t& joint : body.skeleton.joints ){ k4a_float2_t position; const bool result = calibration.convert_3d_to_2d( joint.position, K4A_CALIBRATION_TYPE_DEPTH, K4A_CALIBRATION_TYPE_COLOR, &position ); if( !result ){ continue; } const int32_t id = body.id; const cv::Point point( static_cast<int32_t>( position.xy.x ), static_cast<int32_t>( position.xy.y ) ); cv::circle( skeleton, point, 5, colors[id % colors.size()], -1 ); } } - Get Image that used for Inference - Convert Joint Position (3D) to 2D for Draw Circle on Image
  • 18. Azure Kinect Body Tracking SDK Programming // Show Image cv::imshow( "body index", body_index ); cv::imshow( "skeleton", skeleton ); // Wait Key const int32_t key = cv::waitKey( 30 ); if( key == 'q' ){ break; } // Close Tracker tracker.destroy(); // Clear Handle body_index_map_image.reset(); skeleton_image.reset(); body_capture.reset(); body_frame.reset();