#structure_grabber
Grabber for Structure Sensor (Depth and Infrared) using OpenNI2 (optionally, OpenCV and PointCloudLibrary)
##Requirement
Usage
Preparation
- Create the project by
cmake
Basic
- Include "structure_grabber.h".
- To start, write:
StructureGrabber grabber;
grabber.open();
- To capture, write:
grabber.acquire();
- To get raw data, write:
unsigned short *depth_data, *infrared_data;
grabber.copyDepthDataTo(depth_data);
grabber.copyInfraredDataTo(infrared_data);
With OpenCV
- Include OpenCV headers before including "structure_grabber.h".
- To get
IplImage
orcv::Mat
, write:
cv::Mat depth_image, infrared_image;
grabber.acquire();
grabber.copyDepthImageTo(depth_image);
grabber.copyInfraredImageTo(infrared_image)
With PCL
- Include PCL headers before including "structure_grabber.h".
- To get
pcl::PointCloud
, write:
pcl::PointCloud<pcl::PointXYZ> cloud;
grabber.acquire();
grabber.copyPointCloudTo(cloud);
© 2014 kenken.