SlideShare a Scribd company logo
1 of 37
Download to read offline
Introduction to Kinect v2
Tsukasa Sugiura
@UnaNancyOwen
Self-Introduction
Tsukasa Sugiura
Microsoft MVP for Kinect for Windows
 @UnaNancyOwen
 http://UnaNancyOwen.com
 t.sugiura0204@gmail.com
(July 2014 - June 2015)
Agenda
 What is Kinect v2
 Specifications
 New Features
 Demo
 Tutorial
Disclaimer
“This is preliminary software and/or hardware and APIs
are preliminary and subject to change.”
(Kinect for Windows v2は暫定的なものであり、ソフトウェア、ハード
ウェア、およびAPIは製品版で変更される可能性があります。)
Kinect for Windows v1 Sensor
MULTI-ARRAY MIC MOTORIZED TILT
3D DEPTH SENSORS
RGB CAMERA
Kinect for Windows v2 Sensor
MULTI-ARRAY MIC
3D DEPTH SENSOR
( IR Camera + IR Emitters )
RGB CAMERA
Kinect for Windows v2 Sensor
Image by iFixit
IR EMITTERS
IR CAMERA
Specifications
Kinect for Windows v1 Kinect for Windows v2
Color 640×480 @ 30fps 1920×1080 @ 30fps
Depth 320×240 @ 30fps 512×424 @ 30fps
Sensor Structured Light
(PrimeSense Light Coding)
Time of Flight
(ToF)
Range 0.8~4.0 m 0.5~4.5 m
Angle of View
Horizontal / Vertical
57 / 43 degree 70 / 60 degree
Microphone Array ◯ ◯
Specifications
Kinect for Windows v1 Kinect for Windows v2
BodyIndex 6 people 6 people
Body 2 people 6 people
Joint 20 joint/people 25 joint/people
Hand State Open / Closed Open / Closed / Lasso
Gesture ☓ ◯
Face ◯
Speech / Beamforming ◯ ◯
Basic Features
 Color
 1920×1080@30fps / 15fps (Lighting Condition)
 RGBA, YUV, BGRA, Bayer, YUY2
Basic Features
 Depth
 512×424@30fps
 500~4500[mm]
 ToF (Time of Flight)
Basic Features
 Infrared / LongExposureInfrared
 512×424@30fps
 16bit (higher 8 bits)
Basic Features
 BodyIndex
 512×424@30fps
 6 people
 Body Area : 0~5, Other Area : 255 (5 < Index)
255
0 1
Basic Features
 Body
 6 people
 25 joint / people (Add Tip, Thumb, Neck)
 Orientation (Quaternion)
 Hand Type (Right, Left),Hand State (Open, Closed, Lasso), Lean (-1.0f~1.0f)
Basic Features
 Audio
 Beamforming (+/-50 degree)
 Speaker Estimation
 Speech Recognition
Application Features
 Gesture
 Gesture Recognition using Machine Learning
 Discrete (detected true/false), Continuous (progress 0.0f~1.0f)
 Learning Classifier Tool “Visual Gesture Builder”
Video by http://youtu.be/-XYoblrnDpg
Application Features
 Face
 Bounding Box, Rotation, Points (Eye, Nose, Mouth Corner)
 Activity, Appearance, Expression
 Activity … Eye Closed, Mouth Open / Moved, Looking Away
 Appearance … Wearing Glasses
 Expression … Happy
Application Features
 HDFace
 For Creating 3D Face Model
 Points (1347), Triangles (2340), Hair Color, Skin Color
 Fitting Face Model
Application Features
 Other
 Kinect Fusion (3D Shape Reconstruction)
 Controls (Assist in implementation of NUI)
Demo
System / Software Requirements
OS * Windows 8, 8.1, Embedded 8, Embedded 8.1 (x64)
CPU Intel Core i7 3.1GHz (or higher)
RAM 4GB (or more)
GPU * DirectX 11 supported
USB * USB 3.0 (Intel or Renesas Host Controller)
Compiler * Visual Studio 2012, 2013 (Supported Express)
Language Native (C++), Managed (C#,VB.NET), WinRT (C#,HTML)
Other Unity Pro (Add-in), Cinder, openFrameworks (wrapper)
Connection
Kinect for Windows v1 Kinect for Windows v2
PCPC
Example Multiple Connection
PCPC PC
Hub
Server
System
Kinect
Driver
Kinect SDK
Application
Kinect
Driver
Kinect SDK
Application
Kinect
Service
Kinect SDK
Application
Kinect SDK
Application
Kinect for Windows v1 Kinect for Windows v2
Tutorial
 Basic Flow of Programming (C++)
Sensor Stream Frame Data
Sensor Source Reader Frame Data
Kinect for Windows SDK v1
Kinect for Windows SDK v2
 Source independent to each Data
(e.g. ColorSource, DepthSource, InfraredSource, BodyIndexSource, BodySource, …)
 Doesn’t depend on each other Source
(e.g. Doesn't need to Depth Source when retrieve Body Data)
Tutorial
 Sensor
Sensor Source Reader Frame Data
// Sensor
IKinectSensor* pSensor;
HRESULT hResult = S_OK;
hResult = GetDefaultKinectSensor( &pSensor );
if( FAILED( hResult ) ){
std::cerr << "Error : GetDefaultKinectSensor" << std::endl;
return -1;
}
hResult = pSensor->Open();
if( FAILED( hResult ) ){
std::cerr << "Error : IKinectSensor::Open()" << std::endl;
return -1;
}
 IKinectSensor
Tutorial
 Source
Sensor Source Reader Frame Data
// Source
I***FrameSource* pSource;
hResult = pSensor->get_***FrameSource( &pSource );
if( FAILED( hResult ) ){
std::cerr << "Error : IKinectSensor::get_FrameSource()" << std::endl;
return -1;
}
 IColorFrameSource
 IDepthFrameSource
 IInfraredFrameSource
 IBodyIndexFrameSource
 IBodyFrameSource
Tutorial
 Reader
Sensor Source Reader Frame Data
// Reader
I***FrameReader* pReader;
hResult = pSource->OpenReader( &pReader );
if( FAILED( hResult ) ){
std::cerr << "Error : IFrameSource::OpenReader()" << std::endl;
return -1;
}
 IColorFrameReader
 IDepthFrameReader
 IInfraredFrameReader
 IBodyIndexFrameReader
 IBodyFrameReader
Tutorial
 Frame
Sensor Source Reader Frame Data
while( 1 ){
// Frame
I***Frame* pFrame = nullptr;
hResult = pReader->AcquireLatestFrame( &pFrame );
if( SUCCEEDED( hResult ) ){
/* Data */
}
SafeRelease( pFrame );
}
 IColorFrame
 IDepthFrame
 IInfraredFrame
 IBodyIndexFrame
 IBodyFrame
Tutorial
 Data (Depth, Infrared, BodyIndex)
Sensor Source Reader Frame Data
while( 1 ){
// Frame
IDepthFrame* pDepthFrame = nullptr;
hResult = pDepthReader->AcquireLatestFrame( &pDepthFrame );
if( SUCCEEDED( hResult ) ){
unsigned int bufferSize = 0;
unsigned short* pBuffer = nullptr;
hResult = pDepthFrame->AccessUnderlyingBuffer( &bufferSize, &pBuffer );
if( SUCCEEDED( hResult ) ){
/* Processing*/
}
}
SafeRelease( pDepthFrame );
}
 Depth, Infrared … unsigned short
 BodyIndex … unsigned char
Tutorial
 Data (Color)
Sensor Source Reader Frame Data
while( 1 ){
// Frame
IColorFrame* pColorFrame = nullptr;
hResult = pColorReader->AcquireLatestFrame( &pColorFrame );
if( SUCCEEDED( hResult ) ){
unsigned int bufferSize = 0;
unsigned char* pBuffer = nullptr;
hResult = pColorFrame->AccessUnderlyingBuffer( &bufferSize, &pBuffer );
if( SUCCEEDED( hResult ) ){
/* Processing*/
}
}
SafeRelease( pColorFrame );
}
 Color … unsigned char
 Default Color Image Format … YUY2
Tutorial
 Data (Color with Converted Format)
Sensor Source Reader Frame Data
unsigned int buffeerSize = width * height * channel * sizeof(unsigned char);
unsigned char* pBuffer = new unsigned char[bufferSize];
while( 1 ){
// Frame
IColorFrame* pColorFrame = nullptr;
hResult = pReader->AcquireLatestFrame( &pColorFrame );
if( SUCCEEDED( hResult ) ){
hResult = pColorFrame->CopyConvertedFrameDataToArray( bufferSize, pBuffer,
ColorImageFormat::ColorImageFormat_Bgra );
if( SUCCEEDED( hResult ) ){
/* Processing */
}
}
SafeRelease( pColorFrame );
}
delete[] pBuffer;
Tutorial
Sensor Source Reader Frame Data
while( 1 ){
IBodyFrame* pFrame = nullptr;
hResult = pBodyReader->AcquireLatestFrame( &pBodyFrame );
if( SUCCEEDED( hResult ) ){
IBody* pBody[BODY_COUNT] = { 0 };
hResult = pBodyFrame->GetAndRefreshBodyData( BODY_COUNT, pBody );
if( SUCCEEDED( hResult ) ){
/* Processing */
}
for( int count = 0; count < BODY_COUNT; count++ ){
SafeRelease( pBody[count] );
}
}
SafeRelease( pBodyFrame );
}
 Data (Body)
Tutorial
Sensor Source Reader Frame Data
for( int count = 0; count < BODY_COUNT; count++ ){
BOOLEAN bTracked = false;
hResult = pBody[count]->get_IsTracked( &bTracked );
if( SUCCEEDED( hResult ) && bTracked ){
Joint joint[JointType::JointType_Count];
hResult = pBody[count]->GetJoints( JointType::JointType_Count, joint );
if( SUCCEEDED( hResult ) ){
for( int type = 0; type < JointType::JointType_Count; type++ ){
if( joint[type].TrackingState != TrackingState::TrackingState_NotTracked ){
CameraSpacePoint cameraSpacePoint = joint[type].Position;
cameraSpacePoint.x; // x (+/- 1.0f)
cameraSpacePoint.y; // y (+/- 1.0f)
cameraSpacePoint.z; // z (500~4500[mm])
}
}
}
}
}
 Data (Joint)
Tutorial
 Coordinate System
 ColorSpace (Coordinate System of the Color Image)
… Color
 DepthSpace (Coordinate System of the Depth Data)
… Depth, Infrared, BodyIndex
 CameraSpace (Coordinate System with the origin located the Depth Sensor)
… Body (Joint)
Tutorial
 Coordinate Mapper
// Coordinate Mapper
ICoordinateMapper* pCoordinateMapper;
hResult = pSensor->get_CoordinateMapper( &pCoordinateMapper );
if( FAILED( hResult ) ){
std::cerr << "Error : IKinectSensor::get_CoordinateMapper()" << std::endl;
return -1;
}
 ICoordinateMapper::Map○○○FrameTo△△△Space()
… Mapping Coordinate System in the Frame
 ICoordinateMapper::Map○○○PointsTo△△△Space()
… Mapping Coordinate System in the Array of Points
 ICoordinateMapper::Map○○○PointTo△△△Space()
… Mapping Coordinate System in the Point
Reference
 Sample Program
 Kinect2Sample | GitHub
https://github.com/UnaNancyOwen/Kinect2Sample
 Article Series
 Introduction to Kinect for Windows v2 | Build Insider
http://www.buildinsider.net/small/kinectv2cpp
 Blog
 Kinect | Summary?Blog
http://unanancyowen.com/?cat=3

More Related Content

What's hot

Comp 4010 2021 Lecture1-Introduction to XR
Comp 4010 2021 Lecture1-Introduction to XRComp 4010 2021 Lecture1-Introduction to XR
Comp 4010 2021 Lecture1-Introduction to XRMark Billinghurst
 
2022 COMP4010 Lecture 6: Designing AR Systems
2022 COMP4010 Lecture 6: Designing AR Systems2022 COMP4010 Lecture 6: Designing AR Systems
2022 COMP4010 Lecture 6: Designing AR SystemsMark Billinghurst
 
Comp4010 Lecture4 AR Tracking and Interaction
Comp4010 Lecture4 AR Tracking and InteractionComp4010 Lecture4 AR Tracking and Interaction
Comp4010 Lecture4 AR Tracking and InteractionMark Billinghurst
 
The Importance of Terminology and sRGB Uncertainty - Notes - 0.4
The Importance of Terminology and sRGB Uncertainty - Notes - 0.4The Importance of Terminology and sRGB Uncertainty - Notes - 0.4
The Importance of Terminology and sRGB Uncertainty - Notes - 0.4Thomas Mansencal
 
Volume Rendering in Unity3D
Volume Rendering in Unity3DVolume Rendering in Unity3D
Volume Rendering in Unity3DMatias Lavik
 
Sentiment analysis using naive bayes classifier
Sentiment analysis using naive bayes classifier Sentiment analysis using naive bayes classifier
Sentiment analysis using naive bayes classifier Dev Sahu
 
Netty Notes Part 3 - Channel Pipeline and EventLoops
Netty Notes Part 3 - Channel Pipeline and EventLoopsNetty Notes Part 3 - Channel Pipeline and EventLoops
Netty Notes Part 3 - Channel Pipeline and EventLoopsRick Hightower
 
Comp4010 Lecture8 Introduction to VR
Comp4010 Lecture8 Introduction to VRComp4010 Lecture8 Introduction to VR
Comp4010 Lecture8 Introduction to VRMark Billinghurst
 
Comp4010 Lecture9 VR Input and Systems
Comp4010 Lecture9 VR Input and SystemsComp4010 Lecture9 VR Input and Systems
Comp4010 Lecture9 VR Input and SystemsMark Billinghurst
 
Deep Learning Tutorial | Deep Learning Tutorial for Beginners | Neural Networ...
Deep Learning Tutorial | Deep Learning Tutorial for Beginners | Neural Networ...Deep Learning Tutorial | Deep Learning Tutorial for Beginners | Neural Networ...
Deep Learning Tutorial | Deep Learning Tutorial for Beginners | Neural Networ...Edureka!
 
WebRTC multitrack / multistream
WebRTC multitrack / multistreamWebRTC multitrack / multistream
WebRTC multitrack / multistreammganeko
 
biometric technology
biometric technologybiometric technology
biometric technologyAnmol Bagga
 
Photon勉強会(クライアントサイド)2015/8/4 発表資料
Photon勉強会(クライアントサイド)2015/8/4 発表資料Photon勉強会(クライアントサイド)2015/8/4 発表資料
Photon勉強会(クライアントサイド)2015/8/4 発表資料GMO GlobalSign Holdings K.K.
 
Comp4010 lecture11 VR Applications
Comp4010 lecture11 VR ApplicationsComp4010 lecture11 VR Applications
Comp4010 lecture11 VR ApplicationsMark Billinghurst
 
Comp 4010 2021 Snap Tutorial 2
Comp 4010 2021 Snap Tutorial 2Comp 4010 2021 Snap Tutorial 2
Comp 4010 2021 Snap Tutorial 2Mark Billinghurst
 
Ui in unity
Ui in unityUi in unity
Ui in unityNoam Gat
 
Developing AR and VR Experiences with Unity
Developing AR and VR Experiences with UnityDeveloping AR and VR Experiences with Unity
Developing AR and VR Experiences with UnityMark Billinghurst
 

What's hot (20)

Comp 4010 2021 Lecture1-Introduction to XR
Comp 4010 2021 Lecture1-Introduction to XRComp 4010 2021 Lecture1-Introduction to XR
Comp 4010 2021 Lecture1-Introduction to XR
 
2022 COMP4010 Lecture 6: Designing AR Systems
2022 COMP4010 Lecture 6: Designing AR Systems2022 COMP4010 Lecture 6: Designing AR Systems
2022 COMP4010 Lecture 6: Designing AR Systems
 
Comp4010 Lecture4 AR Tracking and Interaction
Comp4010 Lecture4 AR Tracking and InteractionComp4010 Lecture4 AR Tracking and Interaction
Comp4010 Lecture4 AR Tracking and Interaction
 
The Importance of Terminology and sRGB Uncertainty - Notes - 0.4
The Importance of Terminology and sRGB Uncertainty - Notes - 0.4The Importance of Terminology and sRGB Uncertainty - Notes - 0.4
The Importance of Terminology and sRGB Uncertainty - Notes - 0.4
 
Volume Rendering in Unity3D
Volume Rendering in Unity3DVolume Rendering in Unity3D
Volume Rendering in Unity3D
 
Sentiment analysis using naive bayes classifier
Sentiment analysis using naive bayes classifier Sentiment analysis using naive bayes classifier
Sentiment analysis using naive bayes classifier
 
Netty Notes Part 3 - Channel Pipeline and EventLoops
Netty Notes Part 3 - Channel Pipeline and EventLoopsNetty Notes Part 3 - Channel Pipeline and EventLoops
Netty Notes Part 3 - Channel Pipeline and EventLoops
 
Comp4010 Lecture8 Introduction to VR
Comp4010 Lecture8 Introduction to VRComp4010 Lecture8 Introduction to VR
Comp4010 Lecture8 Introduction to VR
 
Comp4010 Lecture9 VR Input and Systems
Comp4010 Lecture9 VR Input and SystemsComp4010 Lecture9 VR Input and Systems
Comp4010 Lecture9 VR Input and Systems
 
Deep Learning Tutorial | Deep Learning Tutorial for Beginners | Neural Networ...
Deep Learning Tutorial | Deep Learning Tutorial for Beginners | Neural Networ...Deep Learning Tutorial | Deep Learning Tutorial for Beginners | Neural Networ...
Deep Learning Tutorial | Deep Learning Tutorial for Beginners | Neural Networ...
 
WebRTC multitrack / multistream
WebRTC multitrack / multistreamWebRTC multitrack / multistream
WebRTC multitrack / multistream
 
biometric technology
biometric technologybiometric technology
biometric technology
 
Face recognition system
Face recognition systemFace recognition system
Face recognition system
 
Photon勉強会(クライアントサイド)2015/8/4 発表資料
Photon勉強会(クライアントサイド)2015/8/4 発表資料Photon勉強会(クライアントサイド)2015/8/4 発表資料
Photon勉強会(クライアントサイド)2015/8/4 発表資料
 
Biometric encryption
Biometric encryptionBiometric encryption
Biometric encryption
 
Comp4010 lecture11 VR Applications
Comp4010 lecture11 VR ApplicationsComp4010 lecture11 VR Applications
Comp4010 lecture11 VR Applications
 
Comp 4010 2021 Snap Tutorial 2
Comp 4010 2021 Snap Tutorial 2Comp 4010 2021 Snap Tutorial 2
Comp 4010 2021 Snap Tutorial 2
 
Dssg talk CNN intro
Dssg talk CNN introDssg talk CNN intro
Dssg talk CNN intro
 
Ui in unity
Ui in unityUi in unity
Ui in unity
 
Developing AR and VR Experiences with Unity
Developing AR and VR Experiences with UnityDeveloping AR and VR Experiences with Unity
Developing AR and VR Experiences with Unity
 

Similar to Kinect v2 Introduction and Tutorial

Becoming a kinect hacker innovator v2
Becoming a kinect hacker innovator v2Becoming a kinect hacker innovator v2
Becoming a kinect hacker innovator v2Jeff Sipko
 
Ultracode Berlin #2 : Introduction to Perceptual Computing by Sulamita Garcia
Ultracode Berlin #2 : Introduction to Perceptual Computing by Sulamita GarciaUltracode Berlin #2 : Introduction to Perceptual Computing by Sulamita Garcia
Ultracode Berlin #2 : Introduction to Perceptual Computing by Sulamita GarciaBeMyApp
 
Perceptual Computing Workshop à Paris
Perceptual Computing Workshop à ParisPerceptual Computing Workshop à Paris
Perceptual Computing Workshop à ParisBeMyApp
 
Perceptual Computing Workshop in Munich
Perceptual Computing Workshop in MunichPerceptual Computing Workshop in Munich
Perceptual Computing Workshop in MunichBeMyApp
 
第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
 
Accelerating Real Time Video Analytics on a Heterogenous CPU + FPGA Platform
Accelerating Real Time Video Analytics on a Heterogenous CPU + FPGA PlatformAccelerating Real Time Video Analytics on a Heterogenous CPU + FPGA Platform
Accelerating Real Time Video Analytics on a Heterogenous CPU + FPGA PlatformDatabricks
 
OWF12/PAUG Conf Days Pro guard optimizer and obfuscator for android, eric l...
OWF12/PAUG Conf Days Pro guard   optimizer and obfuscator for android, eric l...OWF12/PAUG Conf Days Pro guard   optimizer and obfuscator for android, eric l...
OWF12/PAUG Conf Days Pro guard optimizer and obfuscator for android, eric l...Paris Open Source Summit
 
COSC 426 Lect. 3 -AR Developer Tools
COSC 426 Lect. 3 -AR Developer ToolsCOSC 426 Lect. 3 -AR Developer Tools
COSC 426 Lect. 3 -AR Developer ToolsMark Billinghurst
 
Developing natural user interface applications with real sense devices
Developing natural user interface applications with real sense devicesDeveloping natural user interface applications with real sense devices
Developing natural user interface applications with real sense devicespeteohanlon
 
426 lecture 4: AR Developer Tools
426 lecture 4: AR Developer Tools426 lecture 4: AR Developer Tools
426 lecture 4: AR Developer ToolsMark Billinghurst
 
XebiCon'17 : Faites chauffer les neurones de votre Smartphone avec du Deep Le...
XebiCon'17 : Faites chauffer les neurones de votre Smartphone avec du Deep Le...XebiCon'17 : Faites chauffer les neurones de votre Smartphone avec du Deep Le...
XebiCon'17 : Faites chauffer les neurones de votre Smartphone avec du Deep Le...Publicis Sapient Engineering
 
Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Remy Sharp
 
Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02PL dream
 
Programming with RealSense using .NET
Programming with RealSense using .NETProgramming with RealSense using .NET
Programming with RealSense using .NETMatteo Valoriani
 
Manage software dependencies with ioc and aop
Manage software dependencies with ioc and aopManage software dependencies with ioc and aop
Manage software dependencies with ioc and aopStefano Leli
 
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NCAndroid Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NCJim Tochterman
 
Using Android Things to Detect & Exterminate Reptilians
Using Android Things to Detect & Exterminate ReptiliansUsing Android Things to Detect & Exterminate Reptilians
Using Android Things to Detect & Exterminate ReptiliansNilhcem
 
How Automated Vulnerability Analysis Discovered Hundreds of Android 0-days
How Automated Vulnerability Analysis Discovered Hundreds of Android 0-daysHow Automated Vulnerability Analysis Discovered Hundreds of Android 0-days
How Automated Vulnerability Analysis Discovered Hundreds of Android 0-daysPriyanka Aash
 

Similar to Kinect v2 Introduction and Tutorial (20)

Becoming a kinect hacker innovator v2
Becoming a kinect hacker innovator v2Becoming a kinect hacker innovator v2
Becoming a kinect hacker innovator v2
 
Ultracode Berlin #2 : Introduction to Perceptual Computing by Sulamita Garcia
Ultracode Berlin #2 : Introduction to Perceptual Computing by Sulamita GarciaUltracode Berlin #2 : Introduction to Perceptual Computing by Sulamita Garcia
Ultracode Berlin #2 : Introduction to Perceptual Computing by Sulamita Garcia
 
Perceptual Computing Workshop à Paris
Perceptual Computing Workshop à ParisPerceptual Computing Workshop à Paris
Perceptual Computing Workshop à Paris
 
Perceptual Computing Workshop in Munich
Perceptual Computing Workshop in MunichPerceptual Computing Workshop in Munich
Perceptual Computing Workshop in Munich
 
第38回 名古屋CV・PRML勉強会 「Kinect v2本の紹介とPCLの概要」
第38回 名古屋CV・PRML勉強会 「Kinect v2本の紹介とPCLの概要」第38回 名古屋CV・PRML勉強会 「Kinect v2本の紹介とPCLの概要」
第38回 名古屋CV・PRML勉強会 「Kinect v2本の紹介とPCLの概要」
 
Accelerating Real Time Video Analytics on a Heterogenous CPU + FPGA Platform
Accelerating Real Time Video Analytics on a Heterogenous CPU + FPGA PlatformAccelerating Real Time Video Analytics on a Heterogenous CPU + FPGA Platform
Accelerating Real Time Video Analytics on a Heterogenous CPU + FPGA Platform
 
OWF12/PAUG Conf Days Pro guard optimizer and obfuscator for android, eric l...
OWF12/PAUG Conf Days Pro guard   optimizer and obfuscator for android, eric l...OWF12/PAUG Conf Days Pro guard   optimizer and obfuscator for android, eric l...
OWF12/PAUG Conf Days Pro guard optimizer and obfuscator for android, eric l...
 
Kinect de-theremin
Kinect de-thereminKinect de-theremin
Kinect de-theremin
 
Android workshop
Android workshopAndroid workshop
Android workshop
 
COSC 426 Lect. 3 -AR Developer Tools
COSC 426 Lect. 3 -AR Developer ToolsCOSC 426 Lect. 3 -AR Developer Tools
COSC 426 Lect. 3 -AR Developer Tools
 
Developing natural user interface applications with real sense devices
Developing natural user interface applications with real sense devicesDeveloping natural user interface applications with real sense devices
Developing natural user interface applications with real sense devices
 
426 lecture 4: AR Developer Tools
426 lecture 4: AR Developer Tools426 lecture 4: AR Developer Tools
426 lecture 4: AR Developer Tools
 
XebiCon'17 : Faites chauffer les neurones de votre Smartphone avec du Deep Le...
XebiCon'17 : Faites chauffer les neurones de votre Smartphone avec du Deep Le...XebiCon'17 : Faites chauffer les neurones de votre Smartphone avec du Deep Le...
XebiCon'17 : Faites chauffer les neurones de votre Smartphone avec du Deep Le...
 
Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)
 
Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02
 
Programming with RealSense using .NET
Programming with RealSense using .NETProgramming with RealSense using .NET
Programming with RealSense using .NET
 
Manage software dependencies with ioc and aop
Manage software dependencies with ioc and aopManage software dependencies with ioc and aop
Manage software dependencies with ioc and aop
 
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NCAndroid Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
 
Using Android Things to Detect & Exterminate Reptilians
Using Android Things to Detect & Exterminate ReptiliansUsing Android Things to Detect & Exterminate Reptilians
Using Android Things to Detect & Exterminate Reptilians
 
How Automated Vulnerability Analysis Discovered Hundreds of Android 0-days
How Automated Vulnerability Analysis Discovered Hundreds of Android 0-daysHow Automated Vulnerability Analysis Discovered Hundreds of Android 0-days
How Automated Vulnerability Analysis Discovered Hundreds of Android 0-days
 

More from Tsukasa Sugiura

Azure Kinect DK C/C++ 開発概要(仮)
Azure Kinect DK C/C++ 開発概要(仮)Azure Kinect DK C/C++ 開発概要(仮)
Azure Kinect DK C/C++ 開発概要(仮)Tsukasa Sugiura
 
OpenCVとPCLでのRealSenseのサポート状況+α
OpenCVとPCLでのRealSenseのサポート状況+αOpenCVとPCLでのRealSenseのサポート状況+α
OpenCVとPCLでのRealSenseのサポート状況+αTsukasa 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
 

More from Tsukasa Sugiura (6)

Azure Kinect DK C/C++ 開発概要(仮)
Azure Kinect DK C/C++ 開発概要(仮)Azure Kinect DK C/C++ 開発概要(仮)
Azure Kinect DK C/C++ 開発概要(仮)
 
OpenCVとPCLでのRealSenseのサポート状況+α
OpenCVとPCLでのRealSenseのサポート状況+αOpenCVとPCLでのRealSenseのサポート状況+α
OpenCVとPCLでのRealSenseのサポート状況+α
 
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の導入」
 

Recently uploaded

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 

Recently uploaded (20)

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 

Kinect v2 Introduction and Tutorial

  • 1. Introduction to Kinect v2 Tsukasa Sugiura @UnaNancyOwen
  • 2. Self-Introduction Tsukasa Sugiura Microsoft MVP for Kinect for Windows  @UnaNancyOwen  http://UnaNancyOwen.com  t.sugiura0204@gmail.com (July 2014 - June 2015)
  • 3. Agenda  What is Kinect v2  Specifications  New Features  Demo  Tutorial
  • 4. Disclaimer “This is preliminary software and/or hardware and APIs are preliminary and subject to change.” (Kinect for Windows v2は暫定的なものであり、ソフトウェア、ハード ウェア、およびAPIは製品版で変更される可能性があります。)
  • 5. Kinect for Windows v1 Sensor MULTI-ARRAY MIC MOTORIZED TILT 3D DEPTH SENSORS RGB CAMERA
  • 6. Kinect for Windows v2 Sensor MULTI-ARRAY MIC 3D DEPTH SENSOR ( IR Camera + IR Emitters ) RGB CAMERA
  • 7. Kinect for Windows v2 Sensor Image by iFixit IR EMITTERS IR CAMERA
  • 8. Specifications Kinect for Windows v1 Kinect for Windows v2 Color 640×480 @ 30fps 1920×1080 @ 30fps Depth 320×240 @ 30fps 512×424 @ 30fps Sensor Structured Light (PrimeSense Light Coding) Time of Flight (ToF) Range 0.8~4.0 m 0.5~4.5 m Angle of View Horizontal / Vertical 57 / 43 degree 70 / 60 degree Microphone Array ◯ ◯
  • 9. Specifications Kinect for Windows v1 Kinect for Windows v2 BodyIndex 6 people 6 people Body 2 people 6 people Joint 20 joint/people 25 joint/people Hand State Open / Closed Open / Closed / Lasso Gesture ☓ ◯ Face ◯ Speech / Beamforming ◯ ◯
  • 10. Basic Features  Color  1920×1080@30fps / 15fps (Lighting Condition)  RGBA, YUV, BGRA, Bayer, YUY2
  • 11. Basic Features  Depth  512×424@30fps  500~4500[mm]  ToF (Time of Flight)
  • 12. Basic Features  Infrared / LongExposureInfrared  512×424@30fps  16bit (higher 8 bits)
  • 13. Basic Features  BodyIndex  512×424@30fps  6 people  Body Area : 0~5, Other Area : 255 (5 < Index) 255 0 1
  • 14. Basic Features  Body  6 people  25 joint / people (Add Tip, Thumb, Neck)  Orientation (Quaternion)  Hand Type (Right, Left),Hand State (Open, Closed, Lasso), Lean (-1.0f~1.0f)
  • 15. Basic Features  Audio  Beamforming (+/-50 degree)  Speaker Estimation  Speech Recognition
  • 16. Application Features  Gesture  Gesture Recognition using Machine Learning  Discrete (detected true/false), Continuous (progress 0.0f~1.0f)  Learning Classifier Tool “Visual Gesture Builder” Video by http://youtu.be/-XYoblrnDpg
  • 17. Application Features  Face  Bounding Box, Rotation, Points (Eye, Nose, Mouth Corner)  Activity, Appearance, Expression  Activity … Eye Closed, Mouth Open / Moved, Looking Away  Appearance … Wearing Glasses  Expression … Happy
  • 18. Application Features  HDFace  For Creating 3D Face Model  Points (1347), Triangles (2340), Hair Color, Skin Color  Fitting Face Model
  • 19. Application Features  Other  Kinect Fusion (3D Shape Reconstruction)  Controls (Assist in implementation of NUI)
  • 20. Demo
  • 21. System / Software Requirements OS * Windows 8, 8.1, Embedded 8, Embedded 8.1 (x64) CPU Intel Core i7 3.1GHz (or higher) RAM 4GB (or more) GPU * DirectX 11 supported USB * USB 3.0 (Intel or Renesas Host Controller) Compiler * Visual Studio 2012, 2013 (Supported Express) Language Native (C++), Managed (C#,VB.NET), WinRT (C#,HTML) Other Unity Pro (Add-in), Cinder, openFrameworks (wrapper)
  • 22. Connection Kinect for Windows v1 Kinect for Windows v2 PCPC
  • 24. System Kinect Driver Kinect SDK Application Kinect Driver Kinect SDK Application Kinect Service Kinect SDK Application Kinect SDK Application Kinect for Windows v1 Kinect for Windows v2
  • 25. Tutorial  Basic Flow of Programming (C++) Sensor Stream Frame Data Sensor Source Reader Frame Data Kinect for Windows SDK v1 Kinect for Windows SDK v2  Source independent to each Data (e.g. ColorSource, DepthSource, InfraredSource, BodyIndexSource, BodySource, …)  Doesn’t depend on each other Source (e.g. Doesn't need to Depth Source when retrieve Body Data)
  • 26. Tutorial  Sensor Sensor Source Reader Frame Data // Sensor IKinectSensor* pSensor; HRESULT hResult = S_OK; hResult = GetDefaultKinectSensor( &pSensor ); if( FAILED( hResult ) ){ std::cerr << "Error : GetDefaultKinectSensor" << std::endl; return -1; } hResult = pSensor->Open(); if( FAILED( hResult ) ){ std::cerr << "Error : IKinectSensor::Open()" << std::endl; return -1; }  IKinectSensor
  • 27. Tutorial  Source Sensor Source Reader Frame Data // Source I***FrameSource* pSource; hResult = pSensor->get_***FrameSource( &pSource ); if( FAILED( hResult ) ){ std::cerr << "Error : IKinectSensor::get_FrameSource()" << std::endl; return -1; }  IColorFrameSource  IDepthFrameSource  IInfraredFrameSource  IBodyIndexFrameSource  IBodyFrameSource
  • 28. Tutorial  Reader Sensor Source Reader Frame Data // Reader I***FrameReader* pReader; hResult = pSource->OpenReader( &pReader ); if( FAILED( hResult ) ){ std::cerr << "Error : IFrameSource::OpenReader()" << std::endl; return -1; }  IColorFrameReader  IDepthFrameReader  IInfraredFrameReader  IBodyIndexFrameReader  IBodyFrameReader
  • 29. Tutorial  Frame Sensor Source Reader Frame Data while( 1 ){ // Frame I***Frame* pFrame = nullptr; hResult = pReader->AcquireLatestFrame( &pFrame ); if( SUCCEEDED( hResult ) ){ /* Data */ } SafeRelease( pFrame ); }  IColorFrame  IDepthFrame  IInfraredFrame  IBodyIndexFrame  IBodyFrame
  • 30. Tutorial  Data (Depth, Infrared, BodyIndex) Sensor Source Reader Frame Data while( 1 ){ // Frame IDepthFrame* pDepthFrame = nullptr; hResult = pDepthReader->AcquireLatestFrame( &pDepthFrame ); if( SUCCEEDED( hResult ) ){ unsigned int bufferSize = 0; unsigned short* pBuffer = nullptr; hResult = pDepthFrame->AccessUnderlyingBuffer( &bufferSize, &pBuffer ); if( SUCCEEDED( hResult ) ){ /* Processing*/ } } SafeRelease( pDepthFrame ); }  Depth, Infrared … unsigned short  BodyIndex … unsigned char
  • 31. Tutorial  Data (Color) Sensor Source Reader Frame Data while( 1 ){ // Frame IColorFrame* pColorFrame = nullptr; hResult = pColorReader->AcquireLatestFrame( &pColorFrame ); if( SUCCEEDED( hResult ) ){ unsigned int bufferSize = 0; unsigned char* pBuffer = nullptr; hResult = pColorFrame->AccessUnderlyingBuffer( &bufferSize, &pBuffer ); if( SUCCEEDED( hResult ) ){ /* Processing*/ } } SafeRelease( pColorFrame ); }  Color … unsigned char  Default Color Image Format … YUY2
  • 32. Tutorial  Data (Color with Converted Format) Sensor Source Reader Frame Data unsigned int buffeerSize = width * height * channel * sizeof(unsigned char); unsigned char* pBuffer = new unsigned char[bufferSize]; while( 1 ){ // Frame IColorFrame* pColorFrame = nullptr; hResult = pReader->AcquireLatestFrame( &pColorFrame ); if( SUCCEEDED( hResult ) ){ hResult = pColorFrame->CopyConvertedFrameDataToArray( bufferSize, pBuffer, ColorImageFormat::ColorImageFormat_Bgra ); if( SUCCEEDED( hResult ) ){ /* Processing */ } } SafeRelease( pColorFrame ); } delete[] pBuffer;
  • 33. Tutorial Sensor Source Reader Frame Data while( 1 ){ IBodyFrame* pFrame = nullptr; hResult = pBodyReader->AcquireLatestFrame( &pBodyFrame ); if( SUCCEEDED( hResult ) ){ IBody* pBody[BODY_COUNT] = { 0 }; hResult = pBodyFrame->GetAndRefreshBodyData( BODY_COUNT, pBody ); if( SUCCEEDED( hResult ) ){ /* Processing */ } for( int count = 0; count < BODY_COUNT; count++ ){ SafeRelease( pBody[count] ); } } SafeRelease( pBodyFrame ); }  Data (Body)
  • 34. Tutorial Sensor Source Reader Frame Data for( int count = 0; count < BODY_COUNT; count++ ){ BOOLEAN bTracked = false; hResult = pBody[count]->get_IsTracked( &bTracked ); if( SUCCEEDED( hResult ) && bTracked ){ Joint joint[JointType::JointType_Count]; hResult = pBody[count]->GetJoints( JointType::JointType_Count, joint ); if( SUCCEEDED( hResult ) ){ for( int type = 0; type < JointType::JointType_Count; type++ ){ if( joint[type].TrackingState != TrackingState::TrackingState_NotTracked ){ CameraSpacePoint cameraSpacePoint = joint[type].Position; cameraSpacePoint.x; // x (+/- 1.0f) cameraSpacePoint.y; // y (+/- 1.0f) cameraSpacePoint.z; // z (500~4500[mm]) } } } } }  Data (Joint)
  • 35. Tutorial  Coordinate System  ColorSpace (Coordinate System of the Color Image) … Color  DepthSpace (Coordinate System of the Depth Data) … Depth, Infrared, BodyIndex  CameraSpace (Coordinate System with the origin located the Depth Sensor) … Body (Joint)
  • 36. Tutorial  Coordinate Mapper // Coordinate Mapper ICoordinateMapper* pCoordinateMapper; hResult = pSensor->get_CoordinateMapper( &pCoordinateMapper ); if( FAILED( hResult ) ){ std::cerr << "Error : IKinectSensor::get_CoordinateMapper()" << std::endl; return -1; }  ICoordinateMapper::Map○○○FrameTo△△△Space() … Mapping Coordinate System in the Frame  ICoordinateMapper::Map○○○PointsTo△△△Space() … Mapping Coordinate System in the Array of Points  ICoordinateMapper::Map○○○PointTo△△△Space() … Mapping Coordinate System in the Point
  • 37. Reference  Sample Program  Kinect2Sample | GitHub https://github.com/UnaNancyOwen/Kinect2Sample  Article Series  Introduction to Kinect for Windows v2 | Build Insider http://www.buildinsider.net/small/kinectv2cpp  Blog  Kinect | Summary?Blog http://unanancyowen.com/?cat=3