SlideShare a Scribd company logo
1 of 45
Download to read offline
[PR] Kinect v2本の紹介とPCLの概要
Tsukasa Sugiura
@UnaNancyOwen
Self-Introduction
Tsukasa Sugiura
Microsoft MVP for Kinect for Windows
 @UnaNancyOwen
 http://UnaNancyOwen.com
 t.sugiura0204@gmail.com
Agenda
 Kinect v2の概要
 Kinect v2本の紹介
 Kinect v2本のプレゼント
 Kinect v2とPCL
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 of View 0.8~4.0 m 0.5~8.0 m
Range of Detection 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 ◯ ◯
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)
Basic Features
 Color
 1920×1080@30fps / 15fps (Lighting Condition)
 RGBA, YUV, BGRA, Bayer, YUY2
Basic Features
 Depth
 512×424@30fps
 500~8000[mm]
 ToF (Time of Flight)
Basic Features
 Infrared / LongExposureInfrared
 512×424@30fps
 16bit (higher 8 bits)
Basic Features
 BodyIndex
 512×424@30fps
 500~4500[mm]
 6 people
 Body Area : 0~5, Other Area : 255 (5 < Index)
255
0 1
Basic Features
 Body
 500~4500[mm]
 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)
Kinect v2 Book
Kinect for Windows SDK プログラミング
Kinect for Windows v2センサー対応版
中村薫, 杉浦司, 高田智広, 上田智章
秀和システム
480ページ
3,400円+税
Publisher : http://www.shuwasystem.co.jp/products/7980html/4395.html
Sample : https://github.com/K4W2-Book/K4W2-Book
Reference : https://github.com/K4W2-Book/Docs
Contents
 Basic Streams
 Color, Depth, Infrared, BodyIndex, Body, Audio
 Application Futures
 Speech, Fusion, Gesture, Control, Face, HDFace
Contents
 NUI Tools
 Kinect Studio, Visual Gesture Builder, Configuration Verifier
 3rdParty Library, Tools, Math., Sensing
 Unity, Point Cloud Library, Vector
Review Copy
Point Cloud Library
 About PCL(Point Cloud Library)
 3次元点群のためのオープンソースのライブラリ
 様々な点群処理が含まれている
http://pointclouds.org/
Point Cloud Library
 PCL Features
Point Cloud Library
 PCL All-in-one Installer
 ビルド済みのPCLと依存ライブラリを一括でインストールする
 ただし、公式サイトでは旧い開発環境向けのパッケージしか配布していない
(PCL 1.6.0 All-in-one Installer MSVC 2008/2010)
Download : PCL 1.7.2 All-in-one Installer MSVC 2012/2013/2015
 Self-Build
 PCLと依存ライブラリをビルドする
Reference : Building PCL with Visual Studio
PCL All-in-one Installer
 Point Cloud Library
 PCL (1.7.2)
 Dependencies Library
 Boost (1.57.0) … C++準標準ライブラリ
 Eigen (3.2.4) … 行列ライブラリ
 FLANN (1.8.4) … 最近傍探索ライブラリ
 Qhull (2012.1) … 計算幾何ライブラリ
 VTK (6.2.0) … 可視化ライブラリ
 (OpenNI / OpenNI2) … RGB-Dセンサーライブラリ
PCL Grabber
 OpenNI/OpenNI2
 オープンソースのRGB-Dセンサーライブラリ
 ただし、OpenNIはVisual Studio 2010までしか利用できない
 PCL 1.7.2からOpenNI2がサポートされた
openni_grabber / openni2_grabber
 Kinect for Windows SDK v1/v2
 Microsoft公式のKinectセンサーのソフトウェア開発キット
 最新のVisual Studioで利用できる
kinect_grabber / kinect2_grabber
PCL Project
 Create Project
 Visaul C++のプロジェクトを作成、プロパティシートを読み込む
PCL.props
 CMakeでVisual C++のプロジェクトを自動生成する
CMakeLists.txt
PCL Project
 CMake
 CMakeLists.txt
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project(solution)
find_package(PCL 1.7 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
include_directories($ENV{KINECTSDK20_DIR}/inc)
link_directories(${PCL_LIBRARY_DIRS})
link_directories($ENV{KINECTSDK20_DIR}/Lib/$(PlatformTarget))
add_definitions(${PCL_DEFINITIONS})
set(HEADER kinect2_grabber.h)
set(SOURCE main.cpp)
add_executable(project ${HEADER} ${SOURCE})
target_link_libraries(project ${PCL_LIBRARIES})
target_link_libraries(project Kinect20.lib)
Basic Usage Example
 Source Code
 main.cpp
#include "kinect2_grabber.h"
#include <pcl/visualization/pcl_visualizer.h>
typedef pcl::PointXYZRGB PointType;
int main( int argc, char* argv[] )
{
// PCL Visualizer
boost::shared_ptr<pcl::visualization::PCLVisualizer> viewer(
new pcl::visualization::PCLVisualizer( "Point Cloud Viewer" ) );
// Point Cloud
pcl::PointCloud<PointType>::ConstPtr cloud;
// Retrieved Point Cloud Function
boost::mutex mutex;
boost::function<void( const pcl::PointCloud<PointType>::ConstPtr& )> function =
[&cloud, &mutex]( const pcl::PointCloud<PointType>::ConstPtr& ptr ){
boost::mutex::scoped_lock lock( mutex );
cloud = ptr;
};
Basic Usage Example
 Source Code
// Kinect2Grabber
pcl::Grabber* grabber = new pcl::Kinect2Grabber();
// Register Callback Function
boost::signals2::connection connection = grabber->registerCallback( function );
// Start Grabber
grabber->start();
while( !viewer->wasStopped() ){
// Update Viewer
viewer->spinOnce();
boost::mutex::scoped_try_lock lock( mutex );
if( cloud && lock.owns_lock() ){
if( cloud->size() != 0 ){
/* Processing Point Cloud */
// Update Point Cloud
if( !viewer->updatePointCloud( cloud, "cloud" ) ){
viewer->addPointCloud( cloud, "cloud" );
viewer->resetCameraViewpoint( "cloud" );
}
}
}
}
Basic Usage Example
 Source Code
// Stop Grabber
grabber->stop();
return 0;
}
 Kinect2Grabber Supported Point Types
 pcl::PointXYZRGB … 3次元位置(XYZ)と色(RGB)
 pcl::PointXYZ … 3次元位置(XYZ)
Down Sampling
 VoxcelGrid
#include <pcl/filters/voxel_grid.h>
// Create Object
pcl::VoxelGrid<PointType> grid;
// Setting
grid.setLeafSize( 0.01f, 0.01f, 0.01f );
// Input
grid.setInputCloud( *input );
// Processing
pcl::PointCloud<PointType>::Ptr output( new pcl::PointCloud<PointType> );
grid.filter( *output );
 Point CloudをVoxcel Gridフィルターでダウンサンプルする
 Voxcel Gridの間隔を0.01[m]に設定
http://pointclouds.org/documentation/tutorials/voxel_grid.php
Down Sampling
 Result
Segmentation
 SACSegmentation
#include <pcl/segmentation/sac_segmentation.h>
// Create Object
pcl::SACSegmentation<PointType> seg;
// Setting
seg.setOptimizeCoefficients( true );
seg.setModelType( pcl::SACMODEL_PLANE );
seg.setMethodType( pcl::SAC_RANSAC );
seg.setMaxIterations( 1000 );
seg.setDistanceThreshold( 0.01 );
// Input
seg.setInputCloud( *input );
// Processing
pcl::PointIndices::Ptr inliers( new pcl::PointIndices );
pcl::ModelCoefficients::Ptr coefficients( new pcl::ModelCoefficients );
seg.segment( *inliers, *coefficients );
 Point Cloudから平面(SACMODEL_PLANE)を検出する
 最大反復回数を1000回、距離閾値を0.01[m]に設定
http://pointclouds.org/documentation/tutorials/planar_segmentation.php
Segmentation
 Draw Segmentation Result
// Drawing Detection Area
pcl::PointCloud<PointType>::Ptr output( new pcl::PointCloud<PointType> );
output = input;
for( size_t i = 0; i < inliers->indices.size(); i++ ){
int index = inliers->indices[i];
output->points[index].r = 255;
output->points[index].g = 0;
output->points[index].b = 0;
}
Segmentation
 Result
Extracting
 ExtractIndices
#include <pcl/filters/extract_indices.h>
// Create Object
pcl::ExtractIndices<PointType> extract;
// Setting
extract.setIndices( inliers );
// Input
extract.setInputCloud( *input );
// Processing
pcl::PointCloud<PointType>::Ptr output_positive( new pcl::PointCloud<PointType> );
extract.setNegative( false );
extract.filter( *output_positive );
pcl::PointCloud<PointType>::Ptr output_negative( new pcl::PointCloud<PointType> );
Extract.setNegative( true );
extract.filter( *output_negative );
 Point Cloudから検出した平面を抽出する
 Positiveは検出領域、Negativeは非検出領域
http://pointclouds.org/documentation/tutorials/extract_indices.php
Extracting
 Result
Extracting
 Result
Tips
 Convert ConstPtr tp Ptr
// Convert pcl::PointCloud<T>::ConstPtr pcl::PointCloud<T>::Ptr
pcl::PointCloud<PointType>::ConstPtr ConstPtr( new pcl::PointCloud<PointType> );
pcl::PointCloud<PointType>::Ptr Ptr;
Ptr.reset( new pcl::PointCloud<PointType>( *ConstPtr ) );
 Save/Load Point Cloud
#include <pcl/io/pcd_io.h>
// Save Point Cloud
pcl::PointCloud<PointType>::Ptr cloud( new pcl::PointCloud<PointType> );
pcl::io::savePCDFileBinary( "pointcloud.pcd", *cloud );
// Load Point Cloud
pcl::PointCloud<PointType>::Ptr cloud( new pcl::PointCloud<PointType> );
pcl::io::loadPCDFile( "pointcloud.pcd", *cloud );
Tips
 CloudCompare
CloudCompare http://www.danielgm.net/cc/
Reference
 PCL Official
 Documentation - Tutorials
 Documentation - API Reference
 Users Forum
 Japanese
 DERiVE - PCLを触ってみよう!
 第13回 名古屋CV・PRML勉強会 - PCL (Point Cloud Library)
 PCL Development
 GitHub - PointCloudLibrary/pcl (issues/pull requests)
PCL Next All-in-one Installer
 Point Cloud Library
 PCL (1.8.0)
 Dependencies Library
 Boost (1.59.0) … C++準標準ライブラリ
 Eigen (3.2.6) … 行列ライブラリ
 FLANN (1.8.4) … 最近傍探索ライブラリ
 Qhull (2012.1) … 計算幾何ライブラリ
 VTK (6.3.0) … 可視化ライブラリ
 OpenNI2 … RGB-Dセンサーライブラリ
 RealSense … Intel RealSense SDK

More Related Content

What's hot

Jetson Nano x TensorFlowで始めるモバイルAI画像認識
Jetson Nano x TensorFlowで始めるモバイルAI画像認識Jetson Nano x TensorFlowで始めるモバイルAI画像認識
Jetson Nano x TensorFlowで始めるモバイルAI画像認識karaage0703
 
第11回 配信講義 計算科学技術特論A(2021)
第11回 配信講義 計算科学技術特論A(2021)第11回 配信講義 計算科学技術特論A(2021)
第11回 配信講義 計算科学技術特論A(2021)RCCSRENKEI
 
OpenGL NVIDIA Command-List: Approaching Zero Driver Overhead
OpenGL NVIDIA Command-List: Approaching Zero Driver OverheadOpenGL NVIDIA Command-List: Approaching Zero Driver Overhead
OpenGL NVIDIA Command-List: Approaching Zero Driver OverheadTristan Lorach
 
Odessa .NET User Group - Kinect v2
Odessa .NET User Group - Kinect v2Odessa .NET User Group - Kinect v2
Odessa .NET User Group - Kinect v2Dmytro Mindra
 
4 track kinect@Bicocca - skeletal tracking
4   track kinect@Bicocca - skeletal tracking4   track kinect@Bicocca - skeletal tracking
4 track kinect@Bicocca - skeletal trackingMatteo Valoriani
 
DIANNE - A distributed deep learning framework on OSGi - Tim Verbelen
DIANNE - A distributed deep learning framework on OSGi - Tim VerbelenDIANNE - A distributed deep learning framework on OSGi - Tim Verbelen
DIANNE - A distributed deep learning framework on OSGi - Tim Verbelenmfrancis
 
Intro to GPGPU Programming with Cuda
Intro to GPGPU Programming with CudaIntro to GPGPU Programming with Cuda
Intro to GPGPU Programming with CudaRob Gillen
 
[html5jロボット部 第7回勉強会] Microsoft Cognitive Toolkit (CNTK) Overview
[html5jロボット部 第7回勉強会] Microsoft Cognitive Toolkit (CNTK) Overview[html5jロボット部 第7回勉強会] Microsoft Cognitive Toolkit (CNTK) Overview
[html5jロボット部 第7回勉強会] Microsoft Cognitive Toolkit (CNTK) OverviewNaoki (Neo) SATO
 
426 lecture6a osgART Development
426 lecture6a osgART Development426 lecture6a osgART Development
426 lecture6a osgART DevelopmentMark Billinghurst
 
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basicsnpinto
 
Landuse Classification from Satellite Imagery using Deep Learning
Landuse Classification from Satellite Imagery using Deep LearningLanduse Classification from Satellite Imagery using Deep Learning
Landuse Classification from Satellite Imagery using Deep LearningDataWorks Summit
 
[251] implementing deep learning using cu dnn
[251] implementing deep learning using cu dnn[251] implementing deep learning using cu dnn
[251] implementing deep learning using cu dnnNAVER D2
 
Using the Kinect for Fun and Profit by Tam Hanna
Using the Kinect for Fun and Profit by Tam HannaUsing the Kinect for Fun and Profit by Tam Hanna
Using the Kinect for Fun and Profit by Tam HannaCodemotion
 
Exploiting Concurrency with Dynamic Languages
Exploiting Concurrency with Dynamic LanguagesExploiting Concurrency with Dynamic Languages
Exploiting Concurrency with Dynamic LanguagesTobias Lindaaker
 
【論文紹介】Relay: A New IR for Machine Learning Frameworks
【論文紹介】Relay: A New IR for Machine Learning Frameworks【論文紹介】Relay: A New IR for Machine Learning Frameworks
【論文紹介】Relay: A New IR for Machine Learning FrameworksTakeo Imai
 
Large scale landuse classification of satellite imagery
Large scale landuse classification of satellite imageryLarge scale landuse classification of satellite imagery
Large scale landuse classification of satellite imagerySuneel Marthi
 
Kinectic vision looking deep into depth
Kinectic vision   looking deep into depthKinectic vision   looking deep into depth
Kinectic vision looking deep into depthppd1961
 
PT-4054, "OpenCL™ Accelerated Compute Libraries" by John Melonakos
PT-4054, "OpenCL™ Accelerated Compute Libraries" by John MelonakosPT-4054, "OpenCL™ Accelerated Compute Libraries" by John Melonakos
PT-4054, "OpenCL™ Accelerated Compute Libraries" by John MelonakosAMD Developer Central
 
Machine learning with py torch
Machine learning with py torchMachine learning with py torch
Machine learning with py torchRiza Fahmi
 

What's hot (20)

Jetson Nano x TensorFlowで始めるモバイルAI画像認識
Jetson Nano x TensorFlowで始めるモバイルAI画像認識Jetson Nano x TensorFlowで始めるモバイルAI画像認識
Jetson Nano x TensorFlowで始めるモバイルAI画像認識
 
第11回 配信講義 計算科学技術特論A(2021)
第11回 配信講義 計算科学技術特論A(2021)第11回 配信講義 計算科学技術特論A(2021)
第11回 配信講義 計算科学技術特論A(2021)
 
OpenGL NVIDIA Command-List: Approaching Zero Driver Overhead
OpenGL NVIDIA Command-List: Approaching Zero Driver OverheadOpenGL NVIDIA Command-List: Approaching Zero Driver Overhead
OpenGL NVIDIA Command-List: Approaching Zero Driver Overhead
 
Odessa .NET User Group - Kinect v2
Odessa .NET User Group - Kinect v2Odessa .NET User Group - Kinect v2
Odessa .NET User Group - Kinect v2
 
4 track kinect@Bicocca - skeletal tracking
4   track kinect@Bicocca - skeletal tracking4   track kinect@Bicocca - skeletal tracking
4 track kinect@Bicocca - skeletal tracking
 
DIANNE - A distributed deep learning framework on OSGi - Tim Verbelen
DIANNE - A distributed deep learning framework on OSGi - Tim VerbelenDIANNE - A distributed deep learning framework on OSGi - Tim Verbelen
DIANNE - A distributed deep learning framework on OSGi - Tim Verbelen
 
Deep Learning Edge
Deep Learning Edge Deep Learning Edge
Deep Learning Edge
 
Intro to GPGPU Programming with Cuda
Intro to GPGPU Programming with CudaIntro to GPGPU Programming with Cuda
Intro to GPGPU Programming with Cuda
 
[html5jロボット部 第7回勉強会] Microsoft Cognitive Toolkit (CNTK) Overview
[html5jロボット部 第7回勉強会] Microsoft Cognitive Toolkit (CNTK) Overview[html5jロボット部 第7回勉強会] Microsoft Cognitive Toolkit (CNTK) Overview
[html5jロボット部 第7回勉強会] Microsoft Cognitive Toolkit (CNTK) Overview
 
426 lecture6a osgART Development
426 lecture6a osgART Development426 lecture6a osgART Development
426 lecture6a osgART Development
 
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics
 
Landuse Classification from Satellite Imagery using Deep Learning
Landuse Classification from Satellite Imagery using Deep LearningLanduse Classification from Satellite Imagery using Deep Learning
Landuse Classification from Satellite Imagery using Deep Learning
 
[251] implementing deep learning using cu dnn
[251] implementing deep learning using cu dnn[251] implementing deep learning using cu dnn
[251] implementing deep learning using cu dnn
 
Using the Kinect for Fun and Profit by Tam Hanna
Using the Kinect for Fun and Profit by Tam HannaUsing the Kinect for Fun and Profit by Tam Hanna
Using the Kinect for Fun and Profit by Tam Hanna
 
Exploiting Concurrency with Dynamic Languages
Exploiting Concurrency with Dynamic LanguagesExploiting Concurrency with Dynamic Languages
Exploiting Concurrency with Dynamic Languages
 
【論文紹介】Relay: A New IR for Machine Learning Frameworks
【論文紹介】Relay: A New IR for Machine Learning Frameworks【論文紹介】Relay: A New IR for Machine Learning Frameworks
【論文紹介】Relay: A New IR for Machine Learning Frameworks
 
Large scale landuse classification of satellite imagery
Large scale landuse classification of satellite imageryLarge scale landuse classification of satellite imagery
Large scale landuse classification of satellite imagery
 
Kinectic vision looking deep into depth
Kinectic vision   looking deep into depthKinectic vision   looking deep into depth
Kinectic vision looking deep into depth
 
PT-4054, "OpenCL™ Accelerated Compute Libraries" by John Melonakos
PT-4054, "OpenCL™ Accelerated Compute Libraries" by John MelonakosPT-4054, "OpenCL™ Accelerated Compute Libraries" by John Melonakos
PT-4054, "OpenCL™ Accelerated Compute Libraries" by John Melonakos
 
Machine learning with py torch
Machine learning with py torchMachine learning with py torch
Machine learning with py torch
 

Similar to 第38回 名古屋CV・PRML勉強会 「Kinect v2本の紹介とPCLの概要」

Becoming a kinect hacker innovator v2
Becoming a kinect hacker innovator v2Becoming a kinect hacker innovator v2
Becoming a kinect hacker innovator v2Jeff Sipko
 
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
 
Kinect v2 Introduction and Tutorial
Kinect v2 Introduction and TutorialKinect v2 Introduction and Tutorial
Kinect v2 Introduction and TutorialTsukasa Sugiura
 
Vipul divyanshu documentation on Kinect and Motion Tracking
Vipul divyanshu documentation  on Kinect and Motion TrackingVipul divyanshu documentation  on Kinect and Motion Tracking
Vipul divyanshu documentation on Kinect and Motion TrackingVipul Divyanshu
 
The not so short introduction to Kinect
The not so short introduction to KinectThe not so short introduction to Kinect
The not so short introduction to KinectAXM
 
Lidnug Presentation - Kinect - The How, Were and When of developing with it
Lidnug Presentation - Kinect - The How, Were and When of developing with itLidnug Presentation - Kinect - The How, Were and When of developing with it
Lidnug Presentation - Kinect - The How, Were and When of developing with itPhilip Wheat
 
Develop store apps with kinect for windows v2
Develop store apps with kinect for windows v2Develop store apps with kinect for windows v2
Develop store apps with kinect for windows v2Matteo Valoriani
 
Develop Store Apps with Kinect for Windows v2
Develop Store Apps with Kinect for Windows v2Develop Store Apps with Kinect for Windows v2
Develop Store Apps with Kinect for Windows v2Clemente Giorio
 
Open frameworks 101_fitc
Open frameworks 101_fitcOpen frameworks 101_fitc
Open frameworks 101_fitcbenDesigning
 
Introduction to Kinect v2
Introduction to Kinect v2Introduction to Kinect v2
Introduction to Kinect v2Tsukasa Sugiura
 
Monitoring Cloud Native Applications with Prometheus
Monitoring Cloud Native Applications with PrometheusMonitoring Cloud Native Applications with Prometheus
Monitoring Cloud Native Applications with PrometheusJacopo Nardiello
 
The not so short
The not so shortThe not so short
The not so shortAXM
 
Tutorial on Point Cloud Compression and standardisation
Tutorial on Point Cloud Compression and standardisationTutorial on Point Cloud Compression and standardisation
Tutorial on Point Cloud Compression and standardisationRufael Mekuria
 
Kinect kunkuk final_
Kinect kunkuk final_Kinect kunkuk final_
Kinect kunkuk final_Yunkyu Choi
 
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them allEclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them allMarc Dutoo
 
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open WideOCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open WideOCCIware
 
Matteo Valoriani, Antimo Musone - The Future of Factory - Codemotion Rome 2019
Matteo Valoriani, Antimo Musone - The Future of Factory - Codemotion Rome 2019Matteo Valoriani, Antimo Musone - The Future of Factory - Codemotion Rome 2019
Matteo Valoriani, Antimo Musone - The Future of Factory - Codemotion Rome 2019Codemotion
 

Similar to 第38回 名古屋CV・PRML勉強会 「Kinect v2本の紹介とPCLの概要」 (20)

Becoming a kinect hacker innovator v2
Becoming a kinect hacker innovator v2Becoming a kinect hacker innovator v2
Becoming a kinect hacker innovator v2
 
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
 
Kinect v2 Introduction and Tutorial
Kinect v2 Introduction and TutorialKinect v2 Introduction and Tutorial
Kinect v2 Introduction and Tutorial
 
Vipul divyanshu documentation on Kinect and Motion Tracking
Vipul divyanshu documentation  on Kinect and Motion TrackingVipul divyanshu documentation  on Kinect and Motion Tracking
Vipul divyanshu documentation on Kinect and Motion Tracking
 
The not so short introduction to Kinect
The not so short introduction to KinectThe not so short introduction to Kinect
The not so short introduction to Kinect
 
Lidnug Presentation - Kinect - The How, Were and When of developing with it
Lidnug Presentation - Kinect - The How, Were and When of developing with itLidnug Presentation - Kinect - The How, Were and When of developing with it
Lidnug Presentation - Kinect - The How, Were and When of developing with it
 
Develop store apps with kinect for windows v2
Develop store apps with kinect for windows v2Develop store apps with kinect for windows v2
Develop store apps with kinect for windows v2
 
Develop Store Apps with Kinect for Windows v2
Develop Store Apps with Kinect for Windows v2Develop Store Apps with Kinect for Windows v2
Develop Store Apps with Kinect for Windows v2
 
Open frameworks 101_fitc
Open frameworks 101_fitcOpen frameworks 101_fitc
Open frameworks 101_fitc
 
Introduction to Kinect v2
Introduction to Kinect v2Introduction to Kinect v2
Introduction to Kinect v2
 
BA_Kinect1.7SDK
BA_Kinect1.7SDKBA_Kinect1.7SDK
BA_Kinect1.7SDK
 
Monitoring Cloud Native Applications with Prometheus
Monitoring Cloud Native Applications with PrometheusMonitoring Cloud Native Applications with Prometheus
Monitoring Cloud Native Applications with Prometheus
 
The not so short
The not so shortThe not so short
The not so short
 
Tutorial on Point Cloud Compression and standardisation
Tutorial on Point Cloud Compression and standardisationTutorial on Point Cloud Compression and standardisation
Tutorial on Point Cloud Compression and standardisation
 
Opencv
OpencvOpencv
Opencv
 
3D scanner using kinect
3D scanner using kinect3D scanner using kinect
3D scanner using kinect
 
Kinect kunkuk final_
Kinect kunkuk final_Kinect kunkuk final_
Kinect kunkuk final_
 
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them allEclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
 
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open WideOCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
 
Matteo Valoriani, Antimo Musone - The Future of Factory - Codemotion Rome 2019
Matteo Valoriani, Antimo Musone - The Future of Factory - Codemotion Rome 2019Matteo Valoriani, Antimo Musone - The Future of Factory - Codemotion Rome 2019
Matteo Valoriani, Antimo Musone - The Future of Factory - Codemotion Rome 2019
 

Recently uploaded

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
"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
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
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
 
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
 
"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
 
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
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
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
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 

Recently uploaded (20)

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
"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
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
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
 
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
 
"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
 
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
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
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
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 

第38回 名古屋CV・PRML勉強会 「Kinect v2本の紹介とPCLの概要」

  • 2. Self-Introduction Tsukasa Sugiura Microsoft MVP for Kinect for Windows  @UnaNancyOwen  http://UnaNancyOwen.com  t.sugiura0204@gmail.com
  • 3. Agenda  Kinect v2の概要  Kinect v2本の紹介  Kinect v2本のプレゼント  Kinect v2とPCL
  • 4. Kinect for Windows v1 Sensor MULTI-ARRAY MIC MOTORIZED TILT 3D DEPTH SENSORS RGB CAMERA
  • 5. Kinect for Windows v2 Sensor MULTI-ARRAY MIC 3D DEPTH SENSOR ( IR Camera + IR Emitters ) RGB CAMERA
  • 6. Kinect for Windows v2 Sensor Image by iFixit IR EMITTERS IR CAMERA
  • 7. 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 of View 0.8~4.0 m 0.5~8.0 m Range of Detection 0.8~4.0 m 0.5~4.5 m Angle of View Horizontal / Vertical 57 / 43 degree 70 / 60 degree Microphone Array ◯ ◯
  • 8. 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 ◯ ◯
  • 9. 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)
  • 10. Basic Features  Color  1920×1080@30fps / 15fps (Lighting Condition)  RGBA, YUV, BGRA, Bayer, YUY2
  • 11. Basic Features  Depth  512×424@30fps  500~8000[mm]  ToF (Time of Flight)
  • 12. Basic Features  Infrared / LongExposureInfrared  512×424@30fps  16bit (higher 8 bits)
  • 13. Basic Features  BodyIndex  512×424@30fps  500~4500[mm]  6 people  Body Area : 0~5, Other Area : 255 (5 < Index) 255 0 1
  • 14. Basic Features  Body  500~4500[mm]  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. Kinect v2 Book Kinect for Windows SDK プログラミング Kinect for Windows v2センサー対応版 中村薫, 杉浦司, 高田智広, 上田智章 秀和システム 480ページ 3,400円+税 Publisher : http://www.shuwasystem.co.jp/products/7980html/4395.html Sample : https://github.com/K4W2-Book/K4W2-Book Reference : https://github.com/K4W2-Book/Docs
  • 21. Contents  Basic Streams  Color, Depth, Infrared, BodyIndex, Body, Audio  Application Futures  Speech, Fusion, Gesture, Control, Face, HDFace
  • 22. Contents  NUI Tools  Kinect Studio, Visual Gesture Builder, Configuration Verifier  3rdParty Library, Tools, Math., Sensing  Unity, Point Cloud Library, Vector
  • 24. Point Cloud Library  About PCL(Point Cloud Library)  3次元点群のためのオープンソースのライブラリ  様々な点群処理が含まれている http://pointclouds.org/
  • 25. Point Cloud Library  PCL Features
  • 26. Point Cloud Library  PCL All-in-one Installer  ビルド済みのPCLと依存ライブラリを一括でインストールする  ただし、公式サイトでは旧い開発環境向けのパッケージしか配布していない (PCL 1.6.0 All-in-one Installer MSVC 2008/2010) Download : PCL 1.7.2 All-in-one Installer MSVC 2012/2013/2015  Self-Build  PCLと依存ライブラリをビルドする Reference : Building PCL with Visual Studio
  • 27. PCL All-in-one Installer  Point Cloud Library  PCL (1.7.2)  Dependencies Library  Boost (1.57.0) … C++準標準ライブラリ  Eigen (3.2.4) … 行列ライブラリ  FLANN (1.8.4) … 最近傍探索ライブラリ  Qhull (2012.1) … 計算幾何ライブラリ  VTK (6.2.0) … 可視化ライブラリ  (OpenNI / OpenNI2) … RGB-Dセンサーライブラリ
  • 28. PCL Grabber  OpenNI/OpenNI2  オープンソースのRGB-Dセンサーライブラリ  ただし、OpenNIはVisual Studio 2010までしか利用できない  PCL 1.7.2からOpenNI2がサポートされた openni_grabber / openni2_grabber  Kinect for Windows SDK v1/v2  Microsoft公式のKinectセンサーのソフトウェア開発キット  最新のVisual Studioで利用できる kinect_grabber / kinect2_grabber
  • 29. PCL Project  Create Project  Visaul C++のプロジェクトを作成、プロパティシートを読み込む PCL.props  CMakeでVisual C++のプロジェクトを自動生成する CMakeLists.txt
  • 30. PCL Project  CMake  CMakeLists.txt cmake_minimum_required(VERSION 2.8 FATAL_ERROR) project(solution) find_package(PCL 1.7 REQUIRED) include_directories(${PCL_INCLUDE_DIRS}) include_directories($ENV{KINECTSDK20_DIR}/inc) link_directories(${PCL_LIBRARY_DIRS}) link_directories($ENV{KINECTSDK20_DIR}/Lib/$(PlatformTarget)) add_definitions(${PCL_DEFINITIONS}) set(HEADER kinect2_grabber.h) set(SOURCE main.cpp) add_executable(project ${HEADER} ${SOURCE}) target_link_libraries(project ${PCL_LIBRARIES}) target_link_libraries(project Kinect20.lib)
  • 31. Basic Usage Example  Source Code  main.cpp #include "kinect2_grabber.h" #include <pcl/visualization/pcl_visualizer.h> typedef pcl::PointXYZRGB PointType; int main( int argc, char* argv[] ) { // PCL Visualizer boost::shared_ptr<pcl::visualization::PCLVisualizer> viewer( new pcl::visualization::PCLVisualizer( "Point Cloud Viewer" ) ); // Point Cloud pcl::PointCloud<PointType>::ConstPtr cloud; // Retrieved Point Cloud Function boost::mutex mutex; boost::function<void( const pcl::PointCloud<PointType>::ConstPtr& )> function = [&cloud, &mutex]( const pcl::PointCloud<PointType>::ConstPtr& ptr ){ boost::mutex::scoped_lock lock( mutex ); cloud = ptr; };
  • 32. Basic Usage Example  Source Code // Kinect2Grabber pcl::Grabber* grabber = new pcl::Kinect2Grabber(); // Register Callback Function boost::signals2::connection connection = grabber->registerCallback( function ); // Start Grabber grabber->start(); while( !viewer->wasStopped() ){ // Update Viewer viewer->spinOnce(); boost::mutex::scoped_try_lock lock( mutex ); if( cloud && lock.owns_lock() ){ if( cloud->size() != 0 ){ /* Processing Point Cloud */ // Update Point Cloud if( !viewer->updatePointCloud( cloud, "cloud" ) ){ viewer->addPointCloud( cloud, "cloud" ); viewer->resetCameraViewpoint( "cloud" ); } } } }
  • 33. Basic Usage Example  Source Code // Stop Grabber grabber->stop(); return 0; }  Kinect2Grabber Supported Point Types  pcl::PointXYZRGB … 3次元位置(XYZ)と色(RGB)  pcl::PointXYZ … 3次元位置(XYZ)
  • 34. Down Sampling  VoxcelGrid #include <pcl/filters/voxel_grid.h> // Create Object pcl::VoxelGrid<PointType> grid; // Setting grid.setLeafSize( 0.01f, 0.01f, 0.01f ); // Input grid.setInputCloud( *input ); // Processing pcl::PointCloud<PointType>::Ptr output( new pcl::PointCloud<PointType> ); grid.filter( *output );  Point CloudをVoxcel Gridフィルターでダウンサンプルする  Voxcel Gridの間隔を0.01[m]に設定 http://pointclouds.org/documentation/tutorials/voxel_grid.php
  • 36. Segmentation  SACSegmentation #include <pcl/segmentation/sac_segmentation.h> // Create Object pcl::SACSegmentation<PointType> seg; // Setting seg.setOptimizeCoefficients( true ); seg.setModelType( pcl::SACMODEL_PLANE ); seg.setMethodType( pcl::SAC_RANSAC ); seg.setMaxIterations( 1000 ); seg.setDistanceThreshold( 0.01 ); // Input seg.setInputCloud( *input ); // Processing pcl::PointIndices::Ptr inliers( new pcl::PointIndices ); pcl::ModelCoefficients::Ptr coefficients( new pcl::ModelCoefficients ); seg.segment( *inliers, *coefficients );  Point Cloudから平面(SACMODEL_PLANE)を検出する  最大反復回数を1000回、距離閾値を0.01[m]に設定 http://pointclouds.org/documentation/tutorials/planar_segmentation.php
  • 37. Segmentation  Draw Segmentation Result // Drawing Detection Area pcl::PointCloud<PointType>::Ptr output( new pcl::PointCloud<PointType> ); output = input; for( size_t i = 0; i < inliers->indices.size(); i++ ){ int index = inliers->indices[i]; output->points[index].r = 255; output->points[index].g = 0; output->points[index].b = 0; }
  • 39. Extracting  ExtractIndices #include <pcl/filters/extract_indices.h> // Create Object pcl::ExtractIndices<PointType> extract; // Setting extract.setIndices( inliers ); // Input extract.setInputCloud( *input ); // Processing pcl::PointCloud<PointType>::Ptr output_positive( new pcl::PointCloud<PointType> ); extract.setNegative( false ); extract.filter( *output_positive ); pcl::PointCloud<PointType>::Ptr output_negative( new pcl::PointCloud<PointType> ); Extract.setNegative( true ); extract.filter( *output_negative );  Point Cloudから検出した平面を抽出する  Positiveは検出領域、Negativeは非検出領域 http://pointclouds.org/documentation/tutorials/extract_indices.php
  • 42. Tips  Convert ConstPtr tp Ptr // Convert pcl::PointCloud<T>::ConstPtr pcl::PointCloud<T>::Ptr pcl::PointCloud<PointType>::ConstPtr ConstPtr( new pcl::PointCloud<PointType> ); pcl::PointCloud<PointType>::Ptr Ptr; Ptr.reset( new pcl::PointCloud<PointType>( *ConstPtr ) );  Save/Load Point Cloud #include <pcl/io/pcd_io.h> // Save Point Cloud pcl::PointCloud<PointType>::Ptr cloud( new pcl::PointCloud<PointType> ); pcl::io::savePCDFileBinary( "pointcloud.pcd", *cloud ); // Load Point Cloud pcl::PointCloud<PointType>::Ptr cloud( new pcl::PointCloud<PointType> ); pcl::io::loadPCDFile( "pointcloud.pcd", *cloud );
  • 44. Reference  PCL Official  Documentation - Tutorials  Documentation - API Reference  Users Forum  Japanese  DERiVE - PCLを触ってみよう!  第13回 名古屋CV・PRML勉強会 - PCL (Point Cloud Library)  PCL Development  GitHub - PointCloudLibrary/pcl (issues/pull requests)
  • 45. PCL Next All-in-one Installer  Point Cloud Library  PCL (1.8.0)  Dependencies Library  Boost (1.59.0) … C++準標準ライブラリ  Eigen (3.2.6) … 行列ライブラリ  FLANN (1.8.4) … 最近傍探索ライブラリ  Qhull (2012.1) … 計算幾何ライブラリ  VTK (6.3.0) … 可視化ライブラリ  OpenNI2 … RGB-Dセンサーライブラリ  RealSense … Intel RealSense SDK