Public Member Functions | Protected Attributes

cloud3 Class Reference

#include <cloud.h>

Inheritance diagram for cloud3:
cloud< point_vector > observation< point_vector > kinect_cloud point_cloud triclops_cloud cloud_and_stick< point_cloud > point_cloud_and_stick

List of all members.

Public Member Functions

 cloud3 (const options &opts, const calibration &_calib)
void init ()
virtual bool read_background (const std::string &depth_background)
void render_background_image (IplImage *retval, double scale=1.0) const
void show () const
vector3 operator[] (const size_t i) const
size_t size () const
const project2dget_project2d () const
const knn_cloudget_knn_cloud () const
const knn_cloudget_knn_bg_cloud () const

Protected Attributes

point_vector points
point_vector colours
const int downsample
const int first_frame
bool use_background_subtraction
std::string depth_background
project2d proj2d
knn_cloud nearest_cloud
knn_cloud bg_nearest_cloud
IplImage * background

Detailed Description

cloud3 is an abstract class used for representing observations consisting of coloured 3D points, such as those generated by stereo cameras or depth sensors.


Constructor & Destructor Documentation

cloud3::cloud3 ( const options opts,
const calibration _calib 
) [inline]

Constructor for the cloud3 class. Call this from derived class constructors. Also, do not forgot to call the 'init' function as part of the derived constructor.


Member Function Documentation

const knn_cloud& cloud3::get_knn_bg_cloud (  )  const [inline]

Return a knn_cloud object corresponding to the 3D points in the background.

Returns:
An object of class knn_cloud.
const knn_cloud& cloud3::get_knn_cloud (  )  const [inline]

Return a knn_cloud object corresponding to the 3D points in the point_cloud.

Returns:
An object of class knn_cloud.
const project2d& cloud3::get_project2d (  )  const [inline]

Return a project2d object where the binary segment corresponds to a projection of the 3D points onto the image plane. This allows for easy 2D projection of 2D points onto the binary segment.

Returns:
An object of class project2d. The used binary segment is a projection of the 3D points onto the original image plane.
void cloud3::init (  )  [inline]

Initialise the cloud3 object. You need to call this in the constructor of derived classes.

vector3 cloud3::operator[] ( const size_t  i  )  const [inline]

Return one 3D point. This allows you to access the data currently held in the object. As an example,

     for (size_t i = 0; i < my_point_cloud.size (); i++)
       do_something_with_point (my_point_cloud [i]);
Parameters:
[in] i The index of the point you want to read.
Returns:
The 3D point at the given index.
virtual bool cloud3::read_background ( const std::string depth_background  )  [inline, virtual]

Attempt to read information about the scene background. You need to implement this function in derived classes.

Returns:
true if the background could be read succesfully; false otherwise.

Reimplemented in kinect_cloud, point_cloud, and triclops_cloud.

void cloud3::render_background_image ( IplImage *  retval,
double  scale = 1.0 
) const [inline]

Render background subtracted image from the 3D point. Each 3D point currently stored in the object is projected into retval (using the calibration object given to the object constructor). Projected pixels are rendered with a value of 255, while other pixels are assigned a 0 value. A morphologic closing operation is performed on the image afterwards.

Parameters:
[out] retval An 8-bit unsigned gray scale image (IPL_DEPTH_8U with 1 channel) in which the result is rendered.
[in] scale An optional scaling parameter. This is passed to the world_to_pixel function in the calibration object.
void cloud3::show (  )  const [inline, virtual]

Draw the point cloud using OpenGL.

Implements cloud< point_vector >.

Reimplemented in kinect_cloud, and cloud_and_stick< point_cloud >.

size_t cloud3::size (  )  const [inline, virtual]
Returns:
The number of 3D points in the current frame.

Implements cloud< point_vector >.


Member Data Documentation

IplImage* cloud3::background [protected]
const int cloud3::downsample [protected]
const int cloud3::first_frame [protected]

The documentation for this class was generated from the following file: