Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Private Attributes
icl::geom::DepthCameraPointCloudGrabber Class Reference

PointCloudGrabber implementation for 2D core::depth-image based creation of point clouds. More...

#include <DepthCameraPointCloudGrabber.h>

Inheritance diagram for icl::geom::DepthCameraPointCloudGrabber:
icl::geom::PointCloudGrabber icl::utils::Configurable

List of all members.

Public Member Functions

 DepthCameraPointCloudGrabber (const Camera &depthCam=get_default_depth_cam(), const Camera &colorCam=get_null_color_cam(), const std::string &depthDeviceType="kinectd", const std::string &depthDeviceID="0", const std::string &colorDeviceType="kinectc", const std::string &colorDeviceID="0")
 constructor with a set of given parameters
 ~DepthCameraPointCloudGrabber ()
 Destructor.
void setColorImageMask (const core::Img8u *mask, bool passOwnerShip=true)
 sets a mask, that is applied to the color image before creatig the point cloud
void setDepthImageMask (const core::Img8u *mask, bool passOwnerShip=true)
 sets a mask, that is applied to the depth image before creatig the point cloud
virtual void grab (PointCloudObjectBase &dst)
 virtual grab implementation
const core::Img32fgetLastDepthImage () const
 returns the last grabbed core::depth image
const core::Img8ugetLastColorImage () const throw (utils::ICLException)
 returns the last grabbed color image
void mapImage (const core::ImgBase *src, core::ImgBase **dst, const core::Img32f *depthImageMM=0)
 maps another given image just like the rgbImage would be mapped
void setUseCL (bool enable)
 defines whether opencl is to be used
PointCloudCreatorgetCreator ()
 returns the internal point cloud creator instance
const PointCloudCreatorgetCreator () const
 returns the internal point cloud creator instance (const)
RGBDMapping getMapping () const throw (utils::ICLException)
 returns the internal RGBDMapping
virtual const core::Img32fgetDepthImage () const
 returns the last grabbed point cloud's underlying depth image
virtual const core::Img8ugetColorImage () const
 returns the last grabbed point cloud's underlying color image (if available)

Static Public Member Functions

static const Cameraget_default_depth_cam ()
 creates the defautl VGA core::depth camera
static const Cameraget_null_color_cam ()
 creates the defautl null color camera

Private Attributes

Data * m_data
 pimpl type

Detailed Description

PointCloudGrabber implementation for 2D core::depth-image based creation of point clouds.

This Grabber implementation can be used for all point-cloud sources, where the point cloud must still be created from a given core::depth images. Internally an instance of PointCloudCreator is used.


Constructor & Destructor Documentation

icl::geom::DepthCameraPointCloudGrabber::DepthCameraPointCloudGrabber ( const Camera depthCam = get_default_depth_cam(),
const Camera colorCam = get_null_color_cam(),
const std::string &  depthDeviceType = "kinectd",
const std::string &  depthDeviceID = "0",
const std::string &  colorDeviceType = "kinectc",
const std::string &  colorDeviceID = "0" 
)

constructor with a set of given parameters

Parameters:
depthCamcore::depth camera parameters (if nothing is passed, a simple VGA camera is used automatically)
colorCamcolor camera parameters. If get_null_color_cam() is passed, then no color camera information will be available, no color images will be grabbed and only xyz point cloud data is created (all other fiels are just left untouched)
depthDeviceType,depthDeviceID,:device type (e.g. kinectd for Kinect source of file filepattern for using a list of source files that contained core::depth images) Analogously for colorDeviceType and colorDeviceID, however the latter two are ignored if not colorCam was passed.
colorDeviceType,colorDeviceID(See depthDeviceType and depthDeviceID)

Destructor.


Member Function Documentation

creates the defautl VGA core::depth camera

creates the defautl null color camera

The camera is never really used, only it's address is used to decide whether it is the static null-color-camera or not

returns the last grabbed point cloud's underlying color image (if available)

Reimplemented from icl::geom::PointCloudGrabber.

returns the internal point cloud creator instance

returns the internal point cloud creator instance (const)

returns the last grabbed point cloud's underlying depth image

Reimplemented from icl::geom::PointCloudGrabber.

returns the last grabbed color image

Throws an exception if no color camera or not valid color camera device type and ID were passed.

returns the last grabbed core::depth image

returns the internal RGBDMapping

only if both color- and depth camera is available

virtual grab implementation

Implements icl::geom::PointCloudGrabber.

void icl::geom::DepthCameraPointCloudGrabber::mapImage ( const core::ImgBase src,
core::ImgBase **  dst,
const core::Img32f depthImageMM = 0 
)

maps another given image just like the rgbImage would be mapped

Parameters:
srcimage assumed to be captured from the perspective of the color camera
dstdestimation image (automatically adapted)
depthImageMMoptionally given depth image (if NULL, then the last depthImage passed to the "create"-is used, which should usually be the right one)
void icl::geom::DepthCameraPointCloudGrabber::setColorImageMask ( const core::Img8u mask,
bool  passOwnerShip = true 
)

sets a mask, that is applied to the color image before creatig the point cloud

color pixels that correspond to 0-mask pixels are set to black

void icl::geom::DepthCameraPointCloudGrabber::setDepthImageMask ( const core::Img8u mask,
bool  passOwnerShip = true 
)

sets a mask, that is applied to the depth image before creatig the point cloud

depth image pixels that correspond to 0-mask pixels are set to 0

defines whether opencl is to be used

Please note that OpenCL is only used if The graphics card supports OpenCL ICL is build with OpenCL support for the most common point cloud types (i.e. color type is rgba32f) color- and depth-camera size are equal


Member Data Documentation

pimpl type

pimpl pointer


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines