SlideShare a Scribd company logo
1 of 11
OpenCVとPCLでのRealSenseのサポート状況+α
Self Introduction
杉浦 司 (Tsukasa Sugiura)
- Freelance Programmer
- Microsoft MVP for Windows Development
- Point Cloud Library Maintainer
- @UnaNancyOwen
What is OpenCV/PCL?
Open Source Library for Computer Vision Open Source Library for Point Cloud
- RealSense has been supported on OpenCV 4.0.0
- Input Color, Depth, and Infrared Video Frame
- We have a plan to support RealSense on PCL 1.10.0
- Input Point Cloud with Color, Infrared
RealSense Support on OpenCV
- Install RealSense SDK
- Clone OpenCV Source Code from Repository
- Configure and Generate OpenCV Project using CMake
- Build and Install OpenCV
▸ LIBREALSENSE
▹ LIBREALSENSE_INCLUDE_DIR
C:/Program Files (x86)/Intel RealSense SDK 2.0/include
▹ LIBREALSENSE_LIBRARIES
C:/Program Files (x86)/Intel RealSense SDK 2.0/lib/x64/realsense2.lib
▸ WITH
▹ WITH_LIBREALSENSE ☑(check)
RealSense Support on OpenCV
#include <opencv2/opencv.hpp>
int main( int argc, char* argv[] )
{
// (1) Open cv::VideoCapture() with RealSense
cv::VideoCapture capture( cv::VideoCaptureAPIs::CAP_REALSENSE ); // Synonym CAP_INTELPERC
if( !capture.isOpened() ){
return -1;
}
while( true ){
// (2) Grab All Frames
capture.grab();
// (3) Retrieve Each Frames
// (3.1) Color Frame
cv::Mat color_frame;
capture.retrieve( color_frame, cv::CAP_INTELPERC_IMAGE );
// (3.2) Depth Frame
cv::Mat depth_frame;
capture.retrieve( depth_frame, cv::CAP_INTELPERC_DEPTH_MAP );
// (3.3) Infrared Frame
cv::Mat infrared_frame;
capture.retrieve( infrared_frame, cv::CAP_INTELPERC_IR_MAP );
// (4) Show Image
cv::imshow( "Color", color_frame );
depth_frame.convertTo( depth_frame, CV_8U, -255.0 / 10000.0, 255.0 ); // Scaling
cv::imshow( "Depth", depth_frame );
cv::imshow( "Infrared", infrared_frame );
const int32_t key = cv::waitKey( 33 );
if( key == 'q' ){
break;
}
}
cv::destroyAllWindows();
return 0;
}
cv::VideoCaptureでRealSenseからデータを取得する | OpenCV Advent Calendar 2018 - 9日目
https://qiita.com/UnaNancyOwen/items/80e8b7c194bf8c334d6d
- Capture Video Frame using cv::VideoCapture()
- Can Handle Same Way as Any Other Camera
- Can’t Detail Settings (Resolution, FPS, ...)
- Can’t Apply Filter of RealSense SDK
- Access Flag Naming ...
UnaNancyOwen/RealSense2Sample | GitHub
https://github.com/UnaNancyOwen/RealSense2Sample
RealSense Support on OpenCV
RealSense Support on PCL
- Grabber for RealSense is under Development Review
- Build PCL with RealSense SDK from Source Code
- It is required a little patience ...
- Boost, Eigen, FLANN, QHull, VTK, ... Many Dependents
- Build Time is Booooooooooooooooooooooost
PointCloudLibrary/pcl - Add RSSDK 2.0 (librealsense 2.0) grabber implementation #2214 | GitHub
https://github.com/PointCloudLibrary/pcl/pull/2214
RealSense Support on PCL
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <pcl/io/real_sense_2_grabber.h>
#include <pcl/visualization/pcl_visualizer.h>
// Point Type ( pcl::PointXYZ, pcl::PointXYZI, pcl::PointXYZRGB, pcl::PointXYZRGBA )
typedef pcl::PointXYZRGB PointType;
int main( int argc, char* argv[] )
{
// PCL Visualizer
boost::shared_ptr<pcl::visualization::PCLVisualizer> viewer
= boost::make_shared<pcl::visualization::PCLVisualizer>( "Point Cloud Viewer" );
// Point Cloud Color Hndler
boost::shared_ptr<pcl::visualization::PointCloudColorHandler<PointType>> color_handler
= boost::make_shared<pcl::visualization::PointCloudColorHandlerRGBField<PointType>>();
// Point Cloud
pcl::PointCloud<PointType>::ConstPtr cloud;
// Retrieved Point Cloud Callback 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->makeShared();
};
// RealSense2Grabber
boost::shared_ptr<pcl::RealSense2Grabber> grabber
= boost::make_shared<pcl::RealSense2Grabber>();
// = boost::make_shared<pcl::RealSense2Grabber>( "000000000000" ); // serial number
// = boost::make_shared<pcl::RealSense2Grabber>( "../file.bag" ); // bag file
// 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( lock.owns_lock() && cloud ){
// Update Point Cloud
color_handler->setInputCloud( cloud );
if( !viewer->updatePointCloud( cloud, *color_handler, "cloud" ) ){
viewer->addPointCloud( cloud, *color_handler, "cloud" );
}
}
}
// Stop Grabber
grabber->stop();
// Disconnect Callback Function
if( connection.connected() ){
connection.disconnect();
}
return 0;
}
Drawing Point Cloud retrieve from Intel RealSense Depth Camera (D415/D435) | GitHub Gists
https://gist.github.com/UnaNancyOwen/2ac64d344a27e0c66f802545aefe4ca9
RealSense Support on PCL
To: Intel RealSense Team
Please Support CMake in Pre-Built RealSense SDK
Pre-Built RealSense SDK Not Support CMake
Pre-Built RealSense SDK Self-Built RealSense SDK

More Related Content

What's hot

eStargzイメージとlazy pullingによる高速なコンテナ起動
eStargzイメージとlazy pullingによる高速なコンテナ起動eStargzイメージとlazy pullingによる高速なコンテナ起動
eStargzイメージとlazy pullingによる高速なコンテナ起動Kohei Tokunaga
 
KubeCon EU 2021 Recap - Running Cache-Efficient Builds at Scale on Kubernetes...
KubeCon EU 2021 Recap - Running Cache-Efficient Builds at Scale on Kubernetes...KubeCon EU 2021 Recap - Running Cache-Efficient Builds at Scale on Kubernetes...
KubeCon EU 2021 Recap - Running Cache-Efficient Builds at Scale on Kubernetes...Preferred Networks
 
P2P Container Image Distribution on IPFS With containerd and nerdctl
P2P Container Image Distribution on IPFS With containerd and nerdctlP2P Container Image Distribution on IPFS With containerd and nerdctl
P2P Container Image Distribution on IPFS With containerd and nerdctlKohei Tokunaga
 
Enabling Cognitive Workloads on the Cloud: GPUs with Mesos, Docker and Marath...
Enabling Cognitive Workloads on the Cloud: GPUs with Mesos, Docker and Marath...Enabling Cognitive Workloads on the Cloud: GPUs with Mesos, Docker and Marath...
Enabling Cognitive Workloads on the Cloud: GPUs with Mesos, Docker and Marath...Indrajit Poddar
 
Tectonic Summit 2016: The Origins of Kubernetes
Tectonic Summit 2016: The Origins of KubernetesTectonic Summit 2016: The Origins of Kubernetes
Tectonic Summit 2016: The Origins of KubernetesCoreOS
 
OpenCL Programming 101
OpenCL Programming 101OpenCL Programming 101
OpenCL Programming 101Yoss Cohen
 
kubernetes-meetup-tokyo-20210624-kubevirt
kubernetes-meetup-tokyo-20210624-kubevirtkubernetes-meetup-tokyo-20210624-kubevirt
kubernetes-meetup-tokyo-20210624-kubevirtYukinori Sagara
 
Apache Spark with Hortonworks Data Platform - Seattle Meetup
Apache Spark with Hortonworks Data Platform - Seattle MeetupApache Spark with Hortonworks Data Platform - Seattle Meetup
Apache Spark with Hortonworks Data Platform - Seattle MeetupSaptak Sen
 
Kubernetes in kubernetes 搭建高可用環境
Kubernetes in kubernetes 搭建高可用環境Kubernetes in kubernetes 搭建高可用環境
Kubernetes in kubernetes 搭建高可用環境inwin stack
 
Kubered -Recipes for C2 Operations on Kubernetes
Kubered -Recipes for C2 Operations on KubernetesKubered -Recipes for C2 Operations on Kubernetes
Kubered -Recipes for C2 Operations on KubernetesJeffrey Holden
 
Asterisk as a Virtual Network Function Part 1
Asterisk as a Virtual Network Function Part 1Asterisk as a Virtual Network Function Part 1
Asterisk as a Virtual Network Function Part 1Leif Madsen
 
containerdの概要と最近の機能
containerdの概要と最近の機能containerdの概要と最近の機能
containerdの概要と最近の機能Kohei Tokunaga
 
KubeCon EU 2016: Killing containers to make weather beautiful
KubeCon EU 2016: Killing containers to make weather beautifulKubeCon EU 2016: Killing containers to make weather beautiful
KubeCon EU 2016: Killing containers to make weather beautifulKubeAcademy
 
Using source code management patterns to configure and secure your Kubernetes...
Using source code management patterns to configure and secure your Kubernetes...Using source code management patterns to configure and secure your Kubernetes...
Using source code management patterns to configure and secure your Kubernetes...Giovanni Galloro
 
Introduction kubernetes 2017_12_24
Introduction kubernetes 2017_12_24Introduction kubernetes 2017_12_24
Introduction kubernetes 2017_12_24Sam Zheng
 
Faster Container Image Distribution on a Variety of Tools with Lazy Pulling
Faster Container Image Distribution on a Variety of Tools with Lazy PullingFaster Container Image Distribution on a Variety of Tools with Lazy Pulling
Faster Container Image Distribution on a Variety of Tools with Lazy PullingKohei Tokunaga
 
KubeCon + CloudNativeCon Europe 2021 Virtual Overview / Kubernetes Meetup Tok...
KubeCon + CloudNativeCon Europe 2021 Virtual Overview / Kubernetes Meetup Tok...KubeCon + CloudNativeCon Europe 2021 Virtual Overview / Kubernetes Meetup Tok...
KubeCon + CloudNativeCon Europe 2021 Virtual Overview / Kubernetes Meetup Tok...Preferred Networks
 

What's hot (20)

Deep Learning Edge
Deep Learning Edge Deep Learning Edge
Deep Learning Edge
 
eStargzイメージとlazy pullingによる高速なコンテナ起動
eStargzイメージとlazy pullingによる高速なコンテナ起動eStargzイメージとlazy pullingによる高速なコンテナ起動
eStargzイメージとlazy pullingによる高速なコンテナ起動
 
KubeCon EU 2021 Recap - Running Cache-Efficient Builds at Scale on Kubernetes...
KubeCon EU 2021 Recap - Running Cache-Efficient Builds at Scale on Kubernetes...KubeCon EU 2021 Recap - Running Cache-Efficient Builds at Scale on Kubernetes...
KubeCon EU 2021 Recap - Running Cache-Efficient Builds at Scale on Kubernetes...
 
P2P Container Image Distribution on IPFS With containerd and nerdctl
P2P Container Image Distribution on IPFS With containerd and nerdctlP2P Container Image Distribution on IPFS With containerd and nerdctl
P2P Container Image Distribution on IPFS With containerd and nerdctl
 
Enabling Cognitive Workloads on the Cloud: GPUs with Mesos, Docker and Marath...
Enabling Cognitive Workloads on the Cloud: GPUs with Mesos, Docker and Marath...Enabling Cognitive Workloads on the Cloud: GPUs with Mesos, Docker and Marath...
Enabling Cognitive Workloads on the Cloud: GPUs with Mesos, Docker and Marath...
 
Tectonic Summit 2016: The Origins of Kubernetes
Tectonic Summit 2016: The Origins of KubernetesTectonic Summit 2016: The Origins of Kubernetes
Tectonic Summit 2016: The Origins of Kubernetes
 
OpenCL Programming 101
OpenCL Programming 101OpenCL Programming 101
OpenCL Programming 101
 
Introduction to OpenCL
Introduction to OpenCLIntroduction to OpenCL
Introduction to OpenCL
 
kubernetes-meetup-tokyo-20210624-kubevirt
kubernetes-meetup-tokyo-20210624-kubevirtkubernetes-meetup-tokyo-20210624-kubevirt
kubernetes-meetup-tokyo-20210624-kubevirt
 
Apache Spark with Hortonworks Data Platform - Seattle Meetup
Apache Spark with Hortonworks Data Platform - Seattle MeetupApache Spark with Hortonworks Data Platform - Seattle Meetup
Apache Spark with Hortonworks Data Platform - Seattle Meetup
 
Kubernetes in kubernetes 搭建高可用環境
Kubernetes in kubernetes 搭建高可用環境Kubernetes in kubernetes 搭建高可用環境
Kubernetes in kubernetes 搭建高可用環境
 
Kubered -Recipes for C2 Operations on Kubernetes
Kubered -Recipes for C2 Operations on KubernetesKubered -Recipes for C2 Operations on Kubernetes
Kubered -Recipes for C2 Operations on Kubernetes
 
Asterisk as a Virtual Network Function Part 1
Asterisk as a Virtual Network Function Part 1Asterisk as a Virtual Network Function Part 1
Asterisk as a Virtual Network Function Part 1
 
containerdの概要と最近の機能
containerdの概要と最近の機能containerdの概要と最近の機能
containerdの概要と最近の機能
 
KubeCon EU 2016: Killing containers to make weather beautiful
KubeCon EU 2016: Killing containers to make weather beautifulKubeCon EU 2016: Killing containers to make weather beautiful
KubeCon EU 2016: Killing containers to make weather beautiful
 
Getting Native with NDK
Getting Native with NDKGetting Native with NDK
Getting Native with NDK
 
Using source code management patterns to configure and secure your Kubernetes...
Using source code management patterns to configure and secure your Kubernetes...Using source code management patterns to configure and secure your Kubernetes...
Using source code management patterns to configure and secure your Kubernetes...
 
Introduction kubernetes 2017_12_24
Introduction kubernetes 2017_12_24Introduction kubernetes 2017_12_24
Introduction kubernetes 2017_12_24
 
Faster Container Image Distribution on a Variety of Tools with Lazy Pulling
Faster Container Image Distribution on a Variety of Tools with Lazy PullingFaster Container Image Distribution on a Variety of Tools with Lazy Pulling
Faster Container Image Distribution on a Variety of Tools with Lazy Pulling
 
KubeCon + CloudNativeCon Europe 2021 Virtual Overview / Kubernetes Meetup Tok...
KubeCon + CloudNativeCon Europe 2021 Virtual Overview / Kubernetes Meetup Tok...KubeCon + CloudNativeCon Europe 2021 Virtual Overview / Kubernetes Meetup Tok...
KubeCon + CloudNativeCon Europe 2021 Virtual Overview / Kubernetes Meetup Tok...
 

Similar to OpenCVとPCLでのRealSenseのサポート状況+α

Developer joy for distributed teams with CodeReady Workspaces | DevNation Tec...
Developer joy for distributed teams with CodeReady Workspaces | DevNation Tec...Developer joy for distributed teams with CodeReady Workspaces | DevNation Tec...
Developer joy for distributed teams with CodeReady Workspaces | DevNation Tec...Red Hat Developers
 
Docker module 1
Docker module 1Docker module 1
Docker module 1Liang Bo
 
The path to a serverless-native era with Kubernetes
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetessparkfabrik
 
PHPIDOL#80: Kubernetes 101 for PHP Developer. Yusuf Hadiwinata - VP Operation...
PHPIDOL#80: Kubernetes 101 for PHP Developer. Yusuf Hadiwinata - VP Operation...PHPIDOL#80: Kubernetes 101 for PHP Developer. Yusuf Hadiwinata - VP Operation...
PHPIDOL#80: Kubernetes 101 for PHP Developer. Yusuf Hadiwinata - VP Operation...Yusuf Hadiwinata Sutandar
 
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...AWS Summits
 
Docker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationDocker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationSuresh Balla
 
Kubernetes workshop -_the_basics
Kubernetes workshop -_the_basicsKubernetes workshop -_the_basics
Kubernetes workshop -_the_basicsSjuul Janssen
 
The App Developer's Kubernetes Toolbox
The App Developer's Kubernetes ToolboxThe App Developer's Kubernetes Toolbox
The App Developer's Kubernetes ToolboxNebulaworks
 
Making cloud native platform by kubernetes
Making cloud native platform by kubernetesMaking cloud native platform by kubernetes
Making cloud native platform by kubernetes어형 이
 
Cloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit KubernetesCloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit KubernetesQAware GmbH
 
Kubernetes for Java Developers
Kubernetes for Java DevelopersKubernetes for Java Developers
Kubernetes for Java DevelopersAnthony Dahanne
 
Java one kubernetes, jenkins and microservices
Java one   kubernetes, jenkins and microservicesJava one   kubernetes, jenkins and microservices
Java one kubernetes, jenkins and microservicesChristian Posta
 
A DevOps guide to Kubernetes
A DevOps guide to KubernetesA DevOps guide to Kubernetes
A DevOps guide to KubernetesPaul Czarkowski
 
Kolla talk at OpenStack Summit 2017 in Sydney
Kolla talk at OpenStack Summit 2017 in SydneyKolla talk at OpenStack Summit 2017 in Sydney
Kolla talk at OpenStack Summit 2017 in SydneyVikram G Hosakote
 
給 RD 的 Kubernetes 初體驗
給 RD 的 Kubernetes 初體驗給 RD 的 Kubernetes 初體驗
給 RD 的 Kubernetes 初體驗William Yeh
 
Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...
Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...
Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...Michael Hofmann
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developerPaul Czarkowski
 
The Big Cloud native FaaS Lebowski
The Big Cloud native FaaS Lebowski The Big Cloud native FaaS Lebowski
The Big Cloud native FaaS Lebowski QAware GmbH
 
Deploying Windows Apps to Kubernetes with Draft and Helm
Deploying Windows Apps to Kubernetes with Draft and HelmDeploying Windows Apps to Kubernetes with Draft and Helm
Deploying Windows Apps to Kubernetes with Draft and HelmJessica Deen
 

Similar to OpenCVとPCLでのRealSenseのサポート状況+α (20)

Developer joy for distributed teams with CodeReady Workspaces | DevNation Tec...
Developer joy for distributed teams with CodeReady Workspaces | DevNation Tec...Developer joy for distributed teams with CodeReady Workspaces | DevNation Tec...
Developer joy for distributed teams with CodeReady Workspaces | DevNation Tec...
 
Docker module 1
Docker module 1Docker module 1
Docker module 1
 
The path to a serverless-native era with Kubernetes
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetes
 
PHPIDOL#80: Kubernetes 101 for PHP Developer. Yusuf Hadiwinata - VP Operation...
PHPIDOL#80: Kubernetes 101 for PHP Developer. Yusuf Hadiwinata - VP Operation...PHPIDOL#80: Kubernetes 101 for PHP Developer. Yusuf Hadiwinata - VP Operation...
PHPIDOL#80: Kubernetes 101 for PHP Developer. Yusuf Hadiwinata - VP Operation...
 
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...
AWS Summit Singapore 2019 | Latest Trends for Cloud-Native Application Develo...
 
Docker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationDocker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualization
 
Kubernetes workshop -_the_basics
Kubernetes workshop -_the_basicsKubernetes workshop -_the_basics
Kubernetes workshop -_the_basics
 
The App Developer's Kubernetes Toolbox
The App Developer's Kubernetes ToolboxThe App Developer's Kubernetes Toolbox
The App Developer's Kubernetes Toolbox
 
Making cloud native platform by kubernetes
Making cloud native platform by kubernetesMaking cloud native platform by kubernetes
Making cloud native platform by kubernetes
 
Cloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit KubernetesCloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit Kubernetes
 
Kubernetes for Java Developers
Kubernetes for Java DevelopersKubernetes for Java Developers
Kubernetes for Java Developers
 
Java one kubernetes, jenkins and microservices
Java one   kubernetes, jenkins and microservicesJava one   kubernetes, jenkins and microservices
Java one kubernetes, jenkins and microservices
 
A DevOps guide to Kubernetes
A DevOps guide to KubernetesA DevOps guide to Kubernetes
A DevOps guide to Kubernetes
 
Kolla talk at OpenStack Summit 2017 in Sydney
Kolla talk at OpenStack Summit 2017 in SydneyKolla talk at OpenStack Summit 2017 in Sydney
Kolla talk at OpenStack Summit 2017 in Sydney
 
給 RD 的 Kubernetes 初體驗
給 RD 的 Kubernetes 初體驗給 RD 的 Kubernetes 初體驗
給 RD 的 Kubernetes 初體驗
 
Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...
Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...
Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developer
 
The Big Cloud native FaaS Lebowski
The Big Cloud native FaaS Lebowski The Big Cloud native FaaS Lebowski
The Big Cloud native FaaS Lebowski
 
Deploying Windows Apps to Kubernetes with Draft and Helm
Deploying Windows Apps to Kubernetes with Draft and HelmDeploying Windows Apps to Kubernetes with Draft and Helm
Deploying Windows Apps to Kubernetes with Draft and Helm
 
Javaone kubernetesjenkins
Javaone kubernetesjenkinsJavaone kubernetesjenkins
Javaone kubernetesjenkins
 

More from 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
 

More from Tsukasa Sugiura (6)

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の導入」
 

Recently uploaded

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
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
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 

Recently uploaded (20)

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
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
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 

OpenCVとPCLでのRealSenseのサポート状況+α

  • 2. Self Introduction 杉浦 司 (Tsukasa Sugiura) - Freelance Programmer - Microsoft MVP for Windows Development - Point Cloud Library Maintainer - @UnaNancyOwen
  • 3. What is OpenCV/PCL? Open Source Library for Computer Vision Open Source Library for Point Cloud - RealSense has been supported on OpenCV 4.0.0 - Input Color, Depth, and Infrared Video Frame - We have a plan to support RealSense on PCL 1.10.0 - Input Point Cloud with Color, Infrared
  • 4. RealSense Support on OpenCV - Install RealSense SDK - Clone OpenCV Source Code from Repository - Configure and Generate OpenCV Project using CMake - Build and Install OpenCV ▸ LIBREALSENSE ▹ LIBREALSENSE_INCLUDE_DIR C:/Program Files (x86)/Intel RealSense SDK 2.0/include ▹ LIBREALSENSE_LIBRARIES C:/Program Files (x86)/Intel RealSense SDK 2.0/lib/x64/realsense2.lib ▸ WITH ▹ WITH_LIBREALSENSE ☑(check)
  • 5. RealSense Support on OpenCV #include <opencv2/opencv.hpp> int main( int argc, char* argv[] ) { // (1) Open cv::VideoCapture() with RealSense cv::VideoCapture capture( cv::VideoCaptureAPIs::CAP_REALSENSE ); // Synonym CAP_INTELPERC if( !capture.isOpened() ){ return -1; } while( true ){ // (2) Grab All Frames capture.grab(); // (3) Retrieve Each Frames // (3.1) Color Frame cv::Mat color_frame; capture.retrieve( color_frame, cv::CAP_INTELPERC_IMAGE ); // (3.2) Depth Frame cv::Mat depth_frame; capture.retrieve( depth_frame, cv::CAP_INTELPERC_DEPTH_MAP ); // (3.3) Infrared Frame cv::Mat infrared_frame; capture.retrieve( infrared_frame, cv::CAP_INTELPERC_IR_MAP ); // (4) Show Image cv::imshow( "Color", color_frame ); depth_frame.convertTo( depth_frame, CV_8U, -255.0 / 10000.0, 255.0 ); // Scaling cv::imshow( "Depth", depth_frame ); cv::imshow( "Infrared", infrared_frame ); const int32_t key = cv::waitKey( 33 ); if( key == 'q' ){ break; } } cv::destroyAllWindows(); return 0; } cv::VideoCaptureでRealSenseからデータを取得する | OpenCV Advent Calendar 2018 - 9日目 https://qiita.com/UnaNancyOwen/items/80e8b7c194bf8c334d6d - Capture Video Frame using cv::VideoCapture() - Can Handle Same Way as Any Other Camera - Can’t Detail Settings (Resolution, FPS, ...) - Can’t Apply Filter of RealSense SDK - Access Flag Naming ... UnaNancyOwen/RealSense2Sample | GitHub https://github.com/UnaNancyOwen/RealSense2Sample
  • 7. RealSense Support on PCL - Grabber for RealSense is under Development Review - Build PCL with RealSense SDK from Source Code - It is required a little patience ... - Boost, Eigen, FLANN, QHull, VTK, ... Many Dependents - Build Time is Booooooooooooooooooooooost PointCloudLibrary/pcl - Add RSSDK 2.0 (librealsense 2.0) grabber implementation #2214 | GitHub https://github.com/PointCloudLibrary/pcl/pull/2214
  • 8. RealSense Support on PCL #include <pcl/point_cloud.h> #include <pcl/point_types.h> #include <pcl/io/real_sense_2_grabber.h> #include <pcl/visualization/pcl_visualizer.h> // Point Type ( pcl::PointXYZ, pcl::PointXYZI, pcl::PointXYZRGB, pcl::PointXYZRGBA ) typedef pcl::PointXYZRGB PointType; int main( int argc, char* argv[] ) { // PCL Visualizer boost::shared_ptr<pcl::visualization::PCLVisualizer> viewer = boost::make_shared<pcl::visualization::PCLVisualizer>( "Point Cloud Viewer" ); // Point Cloud Color Hndler boost::shared_ptr<pcl::visualization::PointCloudColorHandler<PointType>> color_handler = boost::make_shared<pcl::visualization::PointCloudColorHandlerRGBField<PointType>>(); // Point Cloud pcl::PointCloud<PointType>::ConstPtr cloud; // Retrieved Point Cloud Callback 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->makeShared(); }; // RealSense2Grabber boost::shared_ptr<pcl::RealSense2Grabber> grabber = boost::make_shared<pcl::RealSense2Grabber>(); // = boost::make_shared<pcl::RealSense2Grabber>( "000000000000" ); // serial number // = boost::make_shared<pcl::RealSense2Grabber>( "../file.bag" ); // bag file // 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( lock.owns_lock() && cloud ){ // Update Point Cloud color_handler->setInputCloud( cloud ); if( !viewer->updatePointCloud( cloud, *color_handler, "cloud" ) ){ viewer->addPointCloud( cloud, *color_handler, "cloud" ); } } } // Stop Grabber grabber->stop(); // Disconnect Callback Function if( connection.connected() ){ connection.disconnect(); } return 0; } Drawing Point Cloud retrieve from Intel RealSense Depth Camera (D415/D435) | GitHub Gists https://gist.github.com/UnaNancyOwen/2ac64d344a27e0c66f802545aefe4ca9
  • 10. To: Intel RealSense Team Please Support CMake in Pre-Built RealSense SDK
  • 11. Pre-Built RealSense SDK Not Support CMake Pre-Built RealSense SDK Self-Built RealSense SDK