Image Component Library (ICL)
|
PointCloudGrabber implementation for 2D core::depth-image based creation of point clouds. More...
#include <DepthCameraPointCloudGrabber.h>
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::Img32f & | getLastDepthImage () const |
returns the last grabbed core::depth image | |
const core::Img8u & | getLastColorImage () 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 | |
PointCloudCreator & | getCreator () |
returns the internal point cloud creator instance | |
const PointCloudCreator & | getCreator () const |
returns the internal point cloud creator instance (const) | |
RGBDMapping | getMapping () const throw (utils::ICLException) |
returns the internal RGBDMapping | |
virtual const core::Img32f * | getDepthImage () const |
returns the last grabbed point cloud's underlying depth image | |
virtual const core::Img8u * | getColorImage () const |
returns the last grabbed point cloud's underlying color image (if available) | |
Static Public Member Functions | |
static const Camera & | get_default_depth_cam () |
creates the defautl VGA core::depth camera | |
static const Camera & | get_null_color_cam () |
creates the defautl null color camera | |
Private Attributes | |
Data * | m_data |
pimpl type |
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.
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
depthCam | core::depth camera parameters (if nothing is passed, a simple VGA camera is used automatically) |
colorCam | color 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) |
static const Camera& icl::geom::DepthCameraPointCloudGrabber::get_default_depth_cam | ( | ) | [static] |
creates the defautl VGA core::depth camera
static const Camera& icl::geom::DepthCameraPointCloudGrabber::get_null_color_cam | ( | ) | [static] |
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
virtual const core::Img8u* icl::geom::DepthCameraPointCloudGrabber::getColorImage | ( | ) | const [virtual] |
returns the last grabbed point cloud's underlying color image (if available)
Reimplemented from icl::geom::PointCloudGrabber.
returns the internal point cloud creator instance
const PointCloudCreator& icl::geom::DepthCameraPointCloudGrabber::getCreator | ( | ) | const |
returns the internal point cloud creator instance (const)
virtual const core::Img32f* icl::geom::DepthCameraPointCloudGrabber::getDepthImage | ( | ) | const [virtual] |
returns the last grabbed point cloud's underlying depth image
Reimplemented from icl::geom::PointCloudGrabber.
const core::Img8u& icl::geom::DepthCameraPointCloudGrabber::getLastColorImage | ( | ) | const throw (utils::ICLException) |
returns the last grabbed color image
Throws an exception if no color camera or not valid color camera device type and ID were passed.
const core::Img32f& icl::geom::DepthCameraPointCloudGrabber::getLastDepthImage | ( | ) | const |
returns the last grabbed core::depth image
RGBDMapping icl::geom::DepthCameraPointCloudGrabber::getMapping | ( | ) | const throw (utils::ICLException) |
returns the internal RGBDMapping
only if both color- and depth camera is available
virtual void icl::geom::DepthCameraPointCloudGrabber::grab | ( | PointCloudObjectBase & | dst | ) | [virtual] |
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
src | image assumed to be captured from the perspective of the color camera |
dst | destimation image (automatically adapted) |
depthImageMM | optionally 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
void icl::geom::DepthCameraPointCloudGrabber::setUseCL | ( | bool | enable | ) |
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
Data* icl::geom::DepthCameraPointCloudGrabber::m_data [private] |
pimpl type
pimpl pointer