/structure_grabber

Grabber for Structure Sensor (Depth and Infrared) using OpenNI2 (optionally, OpenCV and PCL)

Primary LanguageC++

#structure_grabber

Grabber for Structure Sensor (Depth and Infrared) using OpenNI2 (optionally, OpenCV and PointCloudLibrary)

##Requirement

Usage

Preparation

  1. Create the project by cmake

Basic

  1. Include "structure_grabber.h".
  2. To start, write:
StructureGrabber grabber;
grabber.open();
  1. To capture, write:
grabber.acquire();
  1. To get raw data, write:
unsigned short *depth_data, *infrared_data;
grabber.copyDepthDataTo(depth_data);
grabber.copyInfraredDataTo(infrared_data);

With OpenCV

  1. Include OpenCV headers before including "structure_grabber.h".
  2. To get IplImage or cv::Mat, write:
cv::Mat depth_image, infrared_image;
grabber.acquire();
grabber.copyDepthImageTo(depth_image);
grabber.copyInfraredImageTo(infrared_image)

With PCL

  1. Include PCL headers before including "structure_grabber.h".
  2. To get pcl::PointCloud, write:
pcl::PointCloud<pcl::PointXYZ> cloud;
grabber.acquire();
grabber.copyPointCloudTo(cloud);

© 2014 kenken.