Point Cloud Library (PCL)  1.5.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
pcl::RangeImage Class Reference

RangeImage is derived from pcl/PointCloud and provides functionalities with focus on situations where a 3D scene was captured from a specific view point. More...

#include <pcl/range_image/range_image.h>

Inheritance diagram for pcl::RangeImage:
Inheritance graph
[legend]
Collaboration diagram for pcl::RangeImage:
Collaboration graph
[legend]

List of all members.

Classes

struct  ExtractedPlane
 Helper struct to return the results of a plane extraction. More...

Public Types

enum  CoordinateFrame { CAMERA_FRAME = 0, LASER_FRAME = 1 }
typedef pcl::PointCloud
< PointWithRange
BaseClass
typedef std::vector
< Eigen::Vector3f,
Eigen::aligned_allocator
< Eigen::Vector3f > > 
VectorOfEigenVector3f
typedef boost::shared_ptr
< RangeImage
Ptr
typedef boost::shared_ptr
< const RangeImage
ConstPtr
typedef PointWithRange PointType
typedef std::vector
< PointWithRange,
Eigen::aligned_allocator
< PointWithRange > > 
VectorType
typedef VectorType::iterator iterator
typedef VectorType::const_iterator const_iterator

Public Member Functions

PCL_EXPORTS RangeImage ()
 Constructor.
PCL_EXPORTS ~RangeImage ()
 Destructor.
Ptr makeShared ()
 Get a boost shared pointer of a copy of this.
PCL_EXPORTS void reset ()
 Reset all values to an empty range image.
template<typename PointCloudType >
void createFromPointCloud (const PointCloudType &point_cloud, float angular_resolution, float max_angle_width, float max_angle_height, const Eigen::Affine3f &sensor_pose=Eigen::Affine3f::Identity(), CoordinateFrame coordinate_frame=CAMERA_FRAME, float noise_level=0.0f, float min_range=0.0f, int border_size=0)
 Create the depth image from a point cloud.
template<typename PointCloudType >
void createFromPointCloudWithKnownSize (const PointCloudType &point_cloud, float angular_resolution, const Eigen::Vector3f &point_cloud_center, float point_cloud_radius, const Eigen::Affine3f &sensor_pose=Eigen::Affine3f::Identity(), CoordinateFrame coordinate_frame=CAMERA_FRAME, float noise_level=0.0f, float min_range=0.0f, int border_size=0)
 Create the depth image from a point cloud, getting a hint about the size of the scene for faster calculation.
template<typename PointCloudTypeWithViewpoints >
void createFromPointCloudWithViewpoints (const PointCloudTypeWithViewpoints &point_cloud, float angular_resolution, float max_angle_width, float max_angle_height, CoordinateFrame coordinate_frame=CAMERA_FRAME, float noise_level=0.0f, float min_range=0.0f, int border_size=0)
 Create the depth image from a point cloud, using the average viewpoint of the points (vp_x,vp_y,vp_z in the point type) in the point cloud as sensor pose (assuming a rotation of (0,0,0)).
void createEmpty (float angular_resolution, const Eigen::Affine3f &sensor_pose=Eigen::Affine3f::Identity(), RangeImage::CoordinateFrame coordinate_frame=CAMERA_FRAME, float angle_width=pcl::deg2rad(360.0f), float angle_height=pcl::deg2rad(180.0f))
 Create an empty depth image (filled with unobserved points)
PCL_EXPORTS void integrateFarRanges (const PointCloud< PointWithViewpoint > &far_ranges)
 Integrates the given far range measurements into the range image.
PCL_EXPORTS void cropImage (int border_size=0, int top=-1, int right=-1, int bottom=-1, int left=-1)
 Cut the range image to the minimal size so that it still contains all actual range readings.
PCL_EXPORTS float * getRangesArray () const
 Get all the range values in one float array of size width*height.
const Eigen::Affine3f & getTransformationToRangeImageSystem () const
 Getter for the transformation from the world system into the range image system (the sensor coordinate frame)
void setTransformationToRangeImageSystem (const Eigen::Affine3f &to_range_image_system)
 Setter for the transformation from the range image system (the sensor coordinate frame) into the world system.
const Eigen::Affine3f & getTransformationToWorldSystem () const
 Getter for the transformation from the range image system (the sensor coordinate frame) into the world system.
float getAngularResolution () const
 Getter for the angular resolution of the range image in radians per pixel.
void setAngularResolution (float angular_resolution)
 Set the angular resolution of the range image.
const PointWithRangegetPoint (int image_x, int image_y) const
 Return the 3D point with range at the given image position.
PointWithRangegetPoint (int image_x, int image_y)
 Non-const-version of getPoint.
const PointWithRangegetPoint (float image_x, float image_y) const
 Return the 3d point with range at the given image position.
PointWithRangegetPoint (float image_x, float image_y)
 Non-const-version of the above.
const PointWithRangegetPointNoCheck (int image_x, int image_y) const
 Return the 3D point with range at the given image position.
PointWithRangegetPointNoCheck (int image_x, int image_y)
 Non-const-version of getPointNoCheck.
void getPoint (int image_x, int image_y, Eigen::Vector3f &point) const
 Same as above.
void getPoint (int index, Eigen::Vector3f &point) const
 Same as above.
const Eigen::Map< const
Eigen::Vector3f > 
getEigenVector3f (int x, int y) const
 Same as above.
const Eigen::Map< const
Eigen::Vector3f > 
getEigenVector3f (int index) const
 Same as above.
const PointWithRangegetPoint (int index) const
 Return the 3d point with range at the given index (whereas index=y*width+x)
const PointWithRangegetPointConsideringWrapAround (int image_x, int image_y) const
 Return the 3d point with range at the given image point.
void calculate3DPoint (float image_x, float image_y, float range, PointWithRange &point) const
 Calculate the 3D point according to the given image point and range.
void calculate3DPoint (float image_x, float image_y, PointWithRange &point) const
 Calculate the 3D point according to the given image point and the range value at the closest pixel.
virtual void calculate3DPoint (float image_x, float image_y, float range, Eigen::Vector3f &point) const
 Calculate the 3D point according to the given image point and range.
void calculate3DPoint (float image_x, float image_y, Eigen::Vector3f &point) const
 Calculate the 3D point according to the given image point and the range value at the closest pixel.
PCL_EXPORTS void recalculate3DPointPositions ()
 Recalculate all 3D point positions according to their pixel position and range.
virtual void getImagePoint (const Eigen::Vector3f &point, float &image_x, float &image_y, float &range) const
 Get imagePoint from 3D point in world coordinates.
void getImagePoint (const Eigen::Vector3f &point, int &image_x, int &image_y, float &range) const
 Same as above.
void getImagePoint (const Eigen::Vector3f &point, float &image_x, float &image_y) const
 Same as above.
void getImagePoint (const Eigen::Vector3f &point, int &image_x, int &image_y) const
 Same as above.
void getImagePoint (float x, float y, float z, float &image_x, float &image_y, float &range) const
 Same as above.
void getImagePoint (float x, float y, float z, float &image_x, float &image_y) const
 Same as above.
void getImagePoint (float x, float y, float z, int &image_x, int &image_y) const
 Same as above.
float checkPoint (const Eigen::Vector3f &point, PointWithRange &point_in_image) const
 point_in_image will be the point in the image at the position the given point would be.
float getRangeDifference (const Eigen::Vector3f &point) const
 Returns the difference in range between the given point and the range of the point in the image at the position the given point would be.
void getImagePointFromAngles (float angle_x, float angle_y, float &image_x, float &image_y) const
 Get the image point corresponding to the given angles.
void getAnglesFromImagePoint (float image_x, float image_y, float &angle_x, float &angle_y) const
 Get the angles corresponding to the given image point.
void real2DToInt2D (float x, float y, int &xInt, int &yInt) const
 Transforms an image point in float values to an image point in int values.
bool isInImage (int x, int y) const
 Check if a point is inside of the image.
bool isValid (int x, int y) const
 Check if a point is inside of the image and has a finite range.
bool isValid (int index) const
 Check if a point has a finite range.
bool isObserved (int x, int y) const
 Check if a point is inside of the image and has either a finite range or a max reading (range=INFINITY)
bool isMaxRange (int x, int y) const
 Check if a point is a max range (range=INFINITY) - please check isInImage or isObserved first!
bool getNormal (int x, int y, int radius, Eigen::Vector3f &normal, int step_size=1) const
 Calculate the normal of an image point using the neighbors with a maximum pixel distance of radius.
bool getNormalForClosestNeighbors (int x, int y, int radius, const PointWithRange &point, int no_of_nearest_neighbors, Eigen::Vector3f &normal, int step_size=1) const
 Same as above, but only the no_of_nearest_neighbors points closest to the given point are considered.
bool getNormalForClosestNeighbors (int x, int y, int radius, const Eigen::Vector3f &point, int no_of_nearest_neighbors, Eigen::Vector3f &normal, Eigen::Vector3f *point_on_plane=NULL, int step_size=1) const
 Same as above.
bool getNormalForClosestNeighbors (int x, int y, Eigen::Vector3f &normal, int radius=2) const
 Same as above, using default values.
bool getSurfaceInformation (int x, int y, int radius, const Eigen::Vector3f &point, int no_of_closest_neighbors, int step_size, float &max_closest_neighbor_distance_squared, Eigen::Vector3f &normal, Eigen::Vector3f &mean, Eigen::Vector3f &eigen_values, Eigen::Vector3f *normal_all_neighbors=NULL, Eigen::Vector3f *mean_all_neighbors=NULL, Eigen::Vector3f *eigen_values_all_neighbors=NULL) const
 Same as above but extracts some more data and can also return the extracted information for all neighbors in radius if normal_all_neighbors is not NULL.
float getSquaredDistanceOfNthNeighbor (int x, int y, int radius, int n, int step_size) const
float getImpactAngle (const PointWithRange &point1, const PointWithRange &point2) const
 Calculate the impact angle based on the sensor position and the two given points - will return -INFINITY if one of the points is unobserved.
float getImpactAngle (int x1, int y1, int x2, int y2) const
 Same as above.
float getImpactAngleBasedOnLocalNormal (int x, int y, int radius) const
 Extract a local normal (with a heuristic not to include background points) and calculate the impact angle based on this.
PCL_EXPORTS float * getImpactAngleImageBasedOnLocalNormals (int radius) const
 Uses the above function for every point in the image.
float getNormalBasedAcutenessValue (int x, int y, int radius) const
 Calculate a score [0,1] that tells how acute the impact angle is (1.0f - getImpactAngle/90deg) This uses getImpactAngleBasedOnLocalNormal Will return -INFINITY if no normal could be calculated.
float getAcutenessValue (const PointWithRange &point1, const PointWithRange &point2) const
 Calculate a score [0,1] that tells how acute the impact angle is (1.0f - getImpactAngle/90deg) will return -INFINITY if one of the points is unobserved.
float getAcutenessValue (int x1, int y1, int x2, int y2) const
 Same as above.
PCL_EXPORTS void getAcutenessValueImages (int pixel_distance, float *&acuteness_value_image_x, float *&acuteness_value_image_y) const
 Calculate getAcutenessValue for every point.
PCL_EXPORTS float getSurfaceChange (int x, int y, int radius) const
 Calculates, how much the surface changes at a point.
PCL_EXPORTS float * getSurfaceChangeImage (int radius) const
 Uses the above function for every point in the image.
void getSurfaceAngleChange (int x, int y, int radius, float &angle_change_x, float &angle_change_y) const
 Calculates, how much the surface changes at a point.
PCL_EXPORTS void getSurfaceAngleChangeImages (int radius, float *&angle_change_image_x, float *&angle_change_image_y) const
 Uses the above function for every point in the image.
float getCurvature (int x, int y, int radius, int step_size) const
 Calculates the curvature in a point using pca.
const Eigen::Vector3f getSensorPos () const
 Get the sensor position.
PCL_EXPORTS void setUnseenToMaxRange ()
 Sets all -INFINITY values to INFINITY.
int getImageOffsetX () const
 Getter for image_offset_x_.
int getImageOffsetY () const
 Getter for image_offset_y_.
void setImageOffsets (int offset_x, int offset_y)
 Setter for image offsets.
virtual void getSubImage (int sub_image_image_offset_x, int sub_image_image_offset_y, int sub_image_width, int sub_image_height, int combine_pixels, RangeImage &sub_image) const
 Get a sub part of the complete image as a new range image.
virtual void getHalfImage (RangeImage &half_image) const
 Get a range image with half the resolution.
PCL_EXPORTS void getMinMaxRanges (float &min_range, float &max_range) const
 Find the minimum and maximum range in the image.
PCL_EXPORTS void change3dPointsToLocalCoordinateFrame ()
 This function sets the sensor pose to 0 and transforms all point positions to this local coordinate frame.
PCL_EXPORTS float * getInterpolatedSurfaceProjection (const Eigen::Affine3f &pose, int pixel_size, float world_size) const
 Calculate a range patch as the z values of the coordinate frame given by pose.
PCL_EXPORTS float * getInterpolatedSurfaceProjection (const Eigen::Vector3f &point, int pixel_size, float world_size) const
 Same as above, but using the local coordinate frame defined by point and the viewing direction.
Eigen::Affine3f getTransformationToViewerCoordinateFrame (const Eigen::Vector3f &point) const
 Get the local coordinate frame with 0,0,0 in point, upright and Z as the viewing direction.
void getTransformationToViewerCoordinateFrame (const Eigen::Vector3f &point, Eigen::Affine3f &transformation) const
 Same as above, using a reference for the retrurn value.
void getRotationToViewerCoordinateFrame (const Eigen::Vector3f &point, Eigen::Affine3f &transformation) const
 Same as above, but only returning the rotation.
PCL_EXPORTS bool getNormalBasedUprightTransformation (const Eigen::Vector3f &point, float max_dist, Eigen::Affine3f &transformation) const
 Get a local coordinate frame at the given point based on the normal.
PCL_EXPORTS void getIntegralImage (float *&integral_image, int *&valid_points_num_image) const
 Get the integral image of the range values (used for fast blur operations).
PCL_EXPORTS void getBlurredImageUsingIntegralImage (int blur_radius, float *integral_image, int *valid_points_num_image, RangeImage &range_image) const
 Get a blurred version of the range image using box filters on the provided integral image.
PCL_EXPORTS void getBlurredImage (int blur_radius, RangeImage &range_image) const
 Get a blurred version of the range image using box filters.
float getEuclideanDistanceSquared (int x1, int y1, int x2, int y2) const
 Get the squared euclidean distance between the two image points.
float getAverageEuclideanDistance (int x, int y, int offset_x, int offset_y, int max_steps) const
 Doing the above for some steps in the given direction and averaging.
PCL_EXPORTS void getRangeImageWithSmoothedSurface (int radius, RangeImage &smoothed_range_image) const
 Project all points on the local plane approximation, thereby smoothing the surface of the scan.
void get1dPointAverage (int x, int y, int delta_x, int delta_y, int no_of_points, PointWithRange &average_point) const
 Calculates the average 3D position of the no_of_points points described by the start point x,y in the direction delta.
PCL_EXPORTS Eigen::Affine3f doIcp (const VectorOfEigenVector3f &points, const Eigen::Affine3f &initial_guess, int search_radius, float max_distance_start, float max_distance_end, int num_iterations) const
 Perform ICP (Iterative closest point) on the given data.
PCL_EXPORTS Eigen::Affine3f doIcp (const RangeImage &other_range_image, const Eigen::Affine3f &initial_guess, int search_radius, float max_distance_start, float max_distance_end, int num_iterations, int pixel_step_start=1, int pixel_step_end=1) const
 Perform ICP (Iterative closest point) on the given data pixel_step_start, pixel_step_end can be used to improve performance by starting with low resolution and going to higher resolution with later iterations (not used for default values)
PCL_EXPORTS void extractPlanes (float initial_max_plane_error, std::vector< ExtractedPlane > &planes) const
 Extracts planes from the range image using a region growing approach.
PCL_EXPORTS float getOverlap (const RangeImage &other_range_image, const Eigen::Affine3f &relative_transformation, int search_radius, float max_distance, int pixel_step=1) const
 Calculates the overlap of two range images given the relative transformation (from the given image to *this)
bool getViewingDirection (int x, int y, Eigen::Vector3f &viewing_direction) const
 Get the viewing direction for the given point.
void getViewingDirection (const Eigen::Vector3f &point, Eigen::Vector3f &viewing_direction) const
 Get the viewing direction for the given point.
virtual RangeImagegetNew () const
 Return a newly created Range image.
PointCloudoperator+= (const PointCloud &rhs)
 Add a point cloud to the current cloud.
const PointCloud operator+ (const PointCloud &rhs)
 Add a point cloud to another cloud.
const PointWithRangeat (int column, int row) const
 Obtain the point given by the (column, row) coordinates.
PointWithRangeat (int column, int row)
 Obtain the point given by the (column, row) coordinates.
const PointWithRangeat (size_t n) const
PointWithRangeat (size_t n)
const PointWithRangeoperator() (size_t column, size_t row) const
 Obtain the point given by the (column, row) coordinates.
PointWithRangeoperator() (size_t column, size_t row)
 Obtain the point given by the (column, row) coordinates.
bool isOrganized () const
 Return whether a dataset is organized (e.g., arranged in a structured grid).
Eigen::Map< Eigen::MatrixXf,
Eigen::Aligned,
Eigen::OuterStride<> > 
getMatrixXfMap (int dim, int stride, int offset)
 Return an Eigen MatrixXf (assumes float values) mapped to the specified dimensions of the PointCloud.
const Eigen::Map< const
Eigen::MatrixXf,
Eigen::Aligned,
Eigen::OuterStride<> > 
getMatrixXfMap (int dim, int stride, int offset) const
 Return an Eigen MatrixXf (assumes float values) mapped to the specified dimensions of the PointCloud.
Eigen::Map< Eigen::MatrixXf,
Eigen::Aligned,
Eigen::OuterStride<> > 
getMatrixXfMap ()
 Return an Eigen MatrixXf (assumes float values) mapped to the PointCloud.
const Eigen::Map< const
Eigen::MatrixXf,
Eigen::Aligned,
Eigen::OuterStride<> > 
getMatrixXfMap () const
 Return an Eigen MatrixXf (assumes float values) mapped to the PointCloud.
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
size_t size () const
void reserve (size_t n)
void resize (size_t n)
bool empty () const
const PointWithRangeoperator[] (size_t n) const
PointWithRangeoperator[] (size_t n)
const PointWithRangefront () const
PointWithRangefront ()
const PointWithRangeback () const
PointWithRangeback ()
void push_back (const PointWithRange &pt)
 Insert a new point in the cloud, at the end of the container.
iterator insert (iterator position, const PointWithRange &pt)
 Insert a new point in the cloud, given an iterator.
void insert (iterator position, size_t n, const PointWithRange &pt)
 Insert a new point in the cloud N times, given an iterator.
void insert (iterator position, InputIterator first, InputIterator last)
 Insert a new range of points in the cloud, at a certain position.
iterator erase (iterator position)
 Erase a point in the cloud.
iterator erase (iterator first, iterator last)
 Erase a set of points given by a (first, last) iterator pair.
void swap (PointCloud< PointWithRange > &rhs)
 Swap a point cloud with another cloud.
void clear ()
 Removes all points in a cloud and sets the width and height to 0.
Ptr makeShared () const
 Copy the cloud to the heap and return a smart pointer Note that deep copy is performed, so avoid using this function on non-empty clouds.

Static Public Member Functions

static float getMaxAngleSize (const Eigen::Affine3f &viewer_pose, const Eigen::Vector3f &center, float radius)
 Get the size of a certain area when seen from the given pose.
static Eigen::Vector3f getEigenVector3f (const PointWithRange &point)
 Get Eigen::Vector3f from PointWithRange.
static PCL_EXPORTS void getCoordinateFrameTransformation (RangeImage::CoordinateFrame coordinate_frame, Eigen::Affine3f &transformation)
 Get the transformation that transforms the given coordinate frame into CAMERA_FRAME.
template<typename PointCloudTypeWithViewpoints >
static Eigen::Vector3f getAverageViewPoint (const PointCloudTypeWithViewpoints &point_cloud)
 Get the average viewpoint of a point cloud where each point carries viewpoint information as vp_x, vp_y, vp_z.
static PCL_EXPORTS void extractFarRanges (const sensor_msgs::PointCloud2 &point_cloud_data, PointCloud< PointWithViewpoint > &far_ranges)
 Check if the provided data includes far ranges and add them to far_ranges.
static bool isLargerPlane (const ExtractedPlane &p1, const ExtractedPlane &p2)
 Comparator to enable us to sort a vector of Planes regarding their size using std::sort(begin(), end(), RangeImage::isLargerPlane);.

Public Attributes

std_msgs::Header header
 The point cloud header.
std::vector< PointWithRange,
Eigen::aligned_allocator
< PointWithRange > > 
points
 The point data.
uint32_t width
 The point cloud width (if organized as an image-structure).
uint32_t height
 The point cloud height (if organized as an image-structure).
bool is_dense
 True if no points are invalid (e.g., have NaN or Inf values).
Eigen::Vector4f sensor_origin_
 Sensor acquisition pose (origin/translation).
Eigen::Quaternionf sensor_orientation_
 Sensor acquisition pose (rotation).

Static Public Attributes

static int max_no_of_threads
 The maximum number of openmp threads that can be used in this class.
static bool debug
 Just for...

Detailed Description

RangeImage is derived from pcl/PointCloud and provides functionalities with focus on situations where a 3D scene was captured from a specific view point.

Author:
Bastian Steder

Definition at line 56 of file range_image.h.


Member Typedef Documentation

Reimplemented in pcl::RangeImagePlanar.

Definition at line 60 of file range_image.h.

typedef VectorType::const_iterator pcl::PointCloud< PointWithRange >::const_iterator [inherited]

Definition at line 446 of file point_cloud.h.

typedef boost::shared_ptr<const RangeImage> pcl::RangeImage::ConstPtr

Reimplemented from pcl::PointCloud< PointWithRange >.

Reimplemented in pcl::RangeImagePlanar.

Definition at line 63 of file range_image.h.

typedef VectorType::iterator pcl::PointCloud< PointWithRange >::iterator [inherited]

Definition at line 445 of file point_cloud.h.

Definition at line 439 of file point_cloud.h.

typedef boost::shared_ptr<RangeImage> pcl::RangeImage::Ptr

Reimplemented from pcl::PointCloud< PointWithRange >.

Reimplemented in pcl::RangeImagePlanar.

Definition at line 62 of file range_image.h.

typedef std::vector<Eigen::Vector3f, Eigen::aligned_allocator<Eigen::Vector3f> > pcl::RangeImage::VectorOfEigenVector3f

Definition at line 61 of file range_image.h.

typedef std::vector<PointWithRange , Eigen::aligned_allocator<PointWithRange > > pcl::PointCloud< PointWithRange >::VectorType [inherited]

Definition at line 440 of file point_cloud.h.


Member Enumeration Documentation

Enumerator:
CAMERA_FRAME 
LASER_FRAME 

Definition at line 65 of file range_image.h.


Constructor & Destructor Documentation

Constructor.

Destructor.


Member Function Documentation

const PointWithRange & pcl::PointCloud< PointWithRange >::at ( int  column,
int  row 
) const [inline, inherited]

Obtain the point given by the (column, row) coordinates.

Only works on organized datasets (those that have height != 1).

Parameters:
[in]columnthe column coordinate
[in]rowthe row coordinate

Definition at line 293 of file point_cloud.h.

PointWithRange & pcl::PointCloud< PointWithRange >::at ( int  column,
int  row 
) [inline, inherited]

Obtain the point given by the (column, row) coordinates.

Only works on organized datasets (those that have height != 1).

Parameters:
[in]columnthe column coordinate
[in]rowthe row coordinate

Definition at line 307 of file point_cloud.h.

const PointWithRange & pcl::PointCloud< PointWithRange >::at ( size_t  n) const [inline, inherited]

Definition at line 461 of file point_cloud.h.

PointWithRange & pcl::PointCloud< PointWithRange >::at ( size_t  n) [inline, inherited]

Definition at line 462 of file point_cloud.h.

const PointWithRange & pcl::PointCloud< PointWithRange >::back ( ) const [inline, inherited]

Definition at line 465 of file point_cloud.h.

PointWithRange & pcl::PointCloud< PointWithRange >::back ( ) [inline, inherited]

Definition at line 466 of file point_cloud.h.

iterator pcl::PointCloud< PointWithRange >::begin ( ) [inline, inherited]

Definition at line 447 of file point_cloud.h.

const_iterator pcl::PointCloud< PointWithRange >::begin ( ) const [inline, inherited]

Definition at line 449 of file point_cloud.h.

void pcl::RangeImage::calculate3DPoint ( float  image_x,
float  image_y,
float  range,
PointWithRange point 
) const [inline]

Calculate the 3D point according to the given image point and range.

Definition at line 566 of file range_image.hpp.

void pcl::RangeImage::calculate3DPoint ( float  image_x,
float  image_y,
PointWithRange point 
) const [inline]

Calculate the 3D point according to the given image point and the range value at the closest pixel.

Definition at line 575 of file range_image.hpp.

void pcl::RangeImage::calculate3DPoint ( float  image_x,
float  image_y,
float  range,
Eigen::Vector3f &  point 
) const [inline, virtual]

Calculate the 3D point according to the given image point and range.

Reimplemented in pcl::RangeImagePlanar.

Definition at line 545 of file range_image.hpp.

void pcl::RangeImage::calculate3DPoint ( float  image_x,
float  image_y,
Eigen::Vector3f &  point 
) const [inline]

Calculate the 3D point according to the given image point and the range value at the closest pixel.

Definition at line 558 of file range_image.hpp.

This function sets the sensor pose to 0 and transforms all point positions to this local coordinate frame.

float pcl::RangeImage::checkPoint ( const Eigen::Vector3f &  point,
PointWithRange point_in_image 
) const [inline]

point_in_image will be the point in the image at the position the given point would be.

Returns the range of the given point.

Definition at line 352 of file range_image.hpp.

void pcl::PointCloud< PointWithRange >::clear ( ) [inline, inherited]

Removes all points in a cloud and sets the width and height to 0.

Definition at line 568 of file point_cloud.h.

void pcl::RangeImage::createEmpty ( float  angular_resolution,
const Eigen::Affine3f &  sensor_pose = Eigen::Affine3f::Identity(),
RangeImage::CoordinateFrame  coordinate_frame = CAMERA_FRAME,
float  angle_width = pcl::deg2rad(360.0f),
float  angle_height = pcl::deg2rad(180.0f) 
)

Create an empty depth image (filled with unobserved points)

Parameters:
[in]angular_resolutionthe angle (in radians) between each sample in the depth image
[in]sensor_posean affine matrix defining the pose of the sensor (defaults to Eigen::Affine3f::Identity() )
[in]coordinate_framethe coordinate frame (defaults to CAMERA_FRAME)
[in]angle_widthan angle (in radians) defining the horizontal bounds of the sensor (defaults to 2*pi (360deg))
[in]angle_heightan angle (in radians) defining the vertical bounds of the sensor (defaults to pi (180deg))
template<typename PointCloudType >
void pcl::RangeImage::createFromPointCloud ( const PointCloudType &  point_cloud,
float  angular_resolution,
float  max_angle_width,
float  max_angle_height,
const Eigen::Affine3f &  sensor_pose = Eigen::Affine3f::Identity(),
RangeImage::CoordinateFrame  coordinate_frame = CAMERA_FRAME,
float  noise_level = 0.0f,
float  min_range = 0.0f,
int  border_size = 0 
)

Create the depth image from a point cloud.

Parameters:
point_cloudthe input point cloud
angular_resolutionthe angle (in radians) between each sample in the depth image
max_angle_widthan angle (in radians) defining the horizontal bounds of the sensor
max_angle_heightan angle (in radians) defining the vertical bounds of the sensor
sensor_posean affine matrix defining the pose of the sensor (defaults to Eigen::Affine3f::Identity() )
coordinate_framethe coordinate frame (defaults to CAMERA_FRAME)
noise_level- The distance in meters inside of which the z-buffer will not use the minimum, but the mean of the points. If 0.0 it is equivalent to a normal z-buffer and will always take the minimum per cell.
min_rangethe minimum visible range (defaults to 0)
border_sizethe border size (defaults to 0)

Definition at line 95 of file range_image.hpp.

template<typename PointCloudType >
void pcl::RangeImage::createFromPointCloudWithKnownSize ( const PointCloudType &  point_cloud,
float  angular_resolution,
const Eigen::Vector3f &  point_cloud_center,
float  point_cloud_radius,
const Eigen::Affine3f &  sensor_pose = Eigen::Affine3f::Identity(),
RangeImage::CoordinateFrame  coordinate_frame = CAMERA_FRAME,
float  noise_level = 0.0f,
float  min_range = 0.0f,
int  border_size = 0 
)

Create the depth image from a point cloud, getting a hint about the size of the scene for faster calculation.

Parameters:
point_cloudthe input point cloud
angular_resolutionthe angle (in radians) between each sample in the depth image
point_cloud_centerthe center of bounding sphere
point_cloud_radiusthe radius of the bounding sphere
sensor_posean affine matrix defining the pose of the sensor (defaults to Eigen::Affine3f::Identity() )
coordinate_framethe coordinate frame (defaults to CAMERA_FRAME)
noise_level- The distance in meters inside of which the z-buffer will not use the minimum, but the mean of the points. If 0.0 it is equivalent to a normal z-buffer and will always take the minimum per cell.
min_rangethe minimum visible range (defaults to 0)
border_sizethe border size (defaults to 0)

Definition at line 148 of file range_image.hpp.

template<typename PointCloudTypeWithViewpoints >
void pcl::RangeImage::createFromPointCloudWithViewpoints ( const PointCloudTypeWithViewpoints &  point_cloud,
float  angular_resolution,
float  max_angle_width,
float  max_angle_height,
RangeImage::CoordinateFrame  coordinate_frame = CAMERA_FRAME,
float  noise_level = 0.0f,
float  min_range = 0.0f,
int  border_size = 0 
)

Create the depth image from a point cloud, using the average viewpoint of the points (vp_x,vp_y,vp_z in the point type) in the point cloud as sensor pose (assuming a rotation of (0,0,0)).

Parameters:
point_cloudthe input point cloud
angular_resolutionthe angle (in radians) between each sample in the depth image
max_angle_widthan angle (in radians) defining the horizontal bounds of the sensor
max_angle_heightan angle (in radians) defining the vertical bounds of the sensor
coordinate_framethe coordinate frame (defaults to CAMERA_FRAME)
noise_level- The distance in meters inside of which the z-buffer will not use the minimum, but the mean of the points. If 0.0 it is equivalent to a normal z-buffer and will always take the minimum per cell.
min_rangethe minimum visible range (defaults to 0)
border_sizethe border size (defaults to 0)
Note:
If wrong_coordinate_system is true, the sensor pose will be rotated to change from a coordinate frame with x to the front, y to the left and z to the top to the coordinate frame we use here (x to the right, y to the bottom and z to the front)

Definition at line 133 of file range_image.hpp.

PCL_EXPORTS void pcl::RangeImage::cropImage ( int  border_size = 0,
int  top = -1,
int  right = -1,
int  bottom = -1,
int  left = -1 
)

Cut the range image to the minimal size so that it still contains all actual range readings.

Parameters:
border_sizeallows increase from the minimal size by the specified number of pixels (defaults to 0)
topif positive, this value overrides the position of the top edge (defaults to -1)
rightif positive, this value overrides the position of the right edge (defaults to -1)
bottomif positive, this value overrides the position of the bottom edge (defaults to -1)
leftif positive, this value overrides the position of the left edge (defaults to -1)
PCL_EXPORTS Eigen::Affine3f pcl::RangeImage::doIcp ( const VectorOfEigenVector3f points,
const Eigen::Affine3f &  initial_guess,
int  search_radius,
float  max_distance_start,
float  max_distance_end,
int  num_iterations 
) const

Perform ICP (Iterative closest point) on the given data.

PCL_EXPORTS Eigen::Affine3f pcl::RangeImage::doIcp ( const RangeImage other_range_image,
const Eigen::Affine3f &  initial_guess,
int  search_radius,
float  max_distance_start,
float  max_distance_end,
int  num_iterations,
int  pixel_step_start = 1,
int  pixel_step_end = 1 
) const

Perform ICP (Iterative closest point) on the given data pixel_step_start, pixel_step_end can be used to improve performance by starting with low resolution and going to higher resolution with later iterations (not used for default values)

bool pcl::PointCloud< PointWithRange >::empty ( ) const [inline, inherited]

Definition at line 456 of file point_cloud.h.

iterator pcl::PointCloud< PointWithRange >::end ( ) [inline, inherited]

Definition at line 448 of file point_cloud.h.

const_iterator pcl::PointCloud< PointWithRange >::end ( ) const [inline, inherited]

Definition at line 450 of file point_cloud.h.

iterator pcl::PointCloud< PointWithRange >::erase ( iterator  position) [inline, inherited]

Erase a point in the cloud.

Note:
This breaks the organized structure of the cloud by setting the height to 1!
Parameters:
[in]positionwhat data point to erase
Returns:
returns the new position iterator

Definition at line 529 of file point_cloud.h.

iterator pcl::PointCloud< PointWithRange >::erase ( iterator  first,
iterator  last 
) [inline, inherited]

Erase a set of points given by a (first, last) iterator pair.

Note:
This breaks the organized structure of the cloud by setting the height to 1!
Parameters:
[in]firstwhere to start erasing points from
[in]lastwhere to stop erasing points from
Returns:
returns the new position iterator

Definition at line 544 of file point_cloud.h.

static PCL_EXPORTS void pcl::RangeImage::extractFarRanges ( const sensor_msgs::PointCloud2 point_cloud_data,
PointCloud< PointWithViewpoint > &  far_ranges 
) [static]

Check if the provided data includes far ranges and add them to far_ranges.

Parameters:
point_cloud_dataa PointCloud2 message containing the input cloud
far_rangesthe resulting cloud containing those points with far ranges
PCL_EXPORTS void pcl::RangeImage::extractPlanes ( float  initial_max_plane_error,
std::vector< ExtractedPlane > &  planes 
) const

Extracts planes from the range image using a region growing approach.

Parameters:
initial_max_plane_errorthe maximum error that a point is allowed to have regarding the current plane estimate. This value is used only in the initial plane estimate, which will later on be refined, allowing only a maximum error of 3 sigma.
planesthe found planes. The vector contains the individual found planes.
const PointWithRange & pcl::PointCloud< PointWithRange >::front ( ) const [inline, inherited]

Definition at line 463 of file point_cloud.h.

PointWithRange & pcl::PointCloud< PointWithRange >::front ( ) [inline, inherited]

Definition at line 464 of file point_cloud.h.

void pcl::RangeImage::get1dPointAverage ( int  x,
int  y,
int  delta_x,
int  delta_y,
int  no_of_points,
PointWithRange average_point 
) const [inline]

Calculates the average 3D position of the no_of_points points described by the start point x,y in the direction delta.

Returns a max range point (range=INFINITY) if the first point is max range and an unobserved point (range=-INFINITY) if non of the points is observed.

Definition at line 781 of file range_image.hpp.

float pcl::RangeImage::getAcutenessValue ( const PointWithRange point1,
const PointWithRange point2 
) const [inline]

Calculate a score [0,1] that tells how acute the impact angle is (1.0f - getImpactAngle/90deg) will return -INFINITY if one of the points is unobserved.

Definition at line 631 of file range_image.hpp.

float pcl::RangeImage::getAcutenessValue ( int  x1,
int  y1,
int  x2,
int  y2 
) const [inline]

Same as above.

Definition at line 646 of file range_image.hpp.

PCL_EXPORTS void pcl::RangeImage::getAcutenessValueImages ( int  pixel_distance,
float *&  acuteness_value_image_x,
float *&  acuteness_value_image_y 
) const

Calculate getAcutenessValue for every point.

void pcl::RangeImage::getAnglesFromImagePoint ( float  image_x,
float  image_y,
float &  angle_x,
float &  angle_y 
) const [inline]

Get the angles corresponding to the given image point.

Definition at line 583 of file range_image.hpp.

float pcl::RangeImage::getAngularResolution ( ) const [inline]

Getter for the angular resolution of the range image in radians per pixel.

Definition at line 244 of file range_image.h.

float pcl::RangeImage::getAverageEuclideanDistance ( int  x,
int  y,
int  offset_x,
int  offset_y,
int  max_steps 
) const [inline]

Doing the above for some steps in the given direction and averaging.

Definition at line 836 of file range_image.hpp.

template<typename PointCloudTypeWithViewpoints >
Eigen::Vector3f pcl::RangeImage::getAverageViewPoint ( const PointCloudTypeWithViewpoints &  point_cloud) [static]

Get the average viewpoint of a point cloud where each point carries viewpoint information as vp_x, vp_y, vp_z.

Parameters:
point_cloudthe input point cloud
Returns:
the average viewpoint (as an Eigen::Vector3f)

Definition at line 1104 of file range_image.hpp.

PCL_EXPORTS void pcl::RangeImage::getBlurredImage ( int  blur_radius,
RangeImage range_image 
) const

Get a blurred version of the range image using box filters.

PCL_EXPORTS void pcl::RangeImage::getBlurredImageUsingIntegralImage ( int  blur_radius,
float *  integral_image,
int *  valid_points_num_image,
RangeImage range_image 
) const

Get a blurred version of the range image using box filters on the provided integral image.

static PCL_EXPORTS void pcl::RangeImage::getCoordinateFrameTransformation ( RangeImage::CoordinateFrame  coordinate_frame,
Eigen::Affine3f &  transformation 
) [static]

Get the transformation that transforms the given coordinate frame into CAMERA_FRAME.

Parameters:
coordinate_framethe input coordinate frame
transformationthe resulting transformation that warps coordinate_frame into CAMERA_FRAME
float pcl::RangeImage::getCurvature ( int  x,
int  y,
int  radius,
int  step_size 
) const [inline]

Calculates the curvature in a point using pca.

Definition at line 1079 of file range_image.hpp.

Eigen::Vector3f pcl::RangeImage::getEigenVector3f ( const PointWithRange point) [inline, static]

Get Eigen::Vector3f from PointWithRange.

Parameters:
pointthe input point
Returns:
an Eigen::Vector3f representation of the input point

Definition at line 774 of file range_image.hpp.

const Eigen::Map< const Eigen::Vector3f > pcl::RangeImage::getEigenVector3f ( int  x,
int  y 
) const [inline]

Same as above.

Definition at line 531 of file range_image.hpp.

const Eigen::Map< const Eigen::Vector3f > pcl::RangeImage::getEigenVector3f ( int  index) const [inline]

Same as above.

Definition at line 538 of file range_image.hpp.

float pcl::RangeImage::getEuclideanDistanceSquared ( int  x1,
int  y1,
int  x2,
int  y2 
) const [inline]

Get the squared euclidean distance between the two image points.

Returns -INFINITY if one of the points was not observed

Definition at line 821 of file range_image.hpp.

virtual void pcl::RangeImage::getHalfImage ( RangeImage half_image) const [virtual]

Get a range image with half the resolution.

Reimplemented in pcl::RangeImagePlanar.

int pcl::RangeImage::getImageOffsetX ( ) const [inline]

Getter for image_offset_x_.

Definition at line 511 of file range_image.h.

int pcl::RangeImage::getImageOffsetY ( ) const [inline]

Getter for image_offset_y_.

Definition at line 514 of file range_image.h.

void pcl::RangeImage::getImagePoint ( const Eigen::Vector3f &  point,
float &  image_x,
float &  image_y,
float &  range 
) const [inline, virtual]

Get imagePoint from 3D point in world coordinates.

Reimplemented in pcl::RangeImagePlanar.

Definition at line 313 of file range_image.hpp.

void pcl::RangeImage::getImagePoint ( const Eigen::Vector3f &  point,
int &  image_x,
int &  image_y,
float &  range 
) const [inline]

Same as above.

Definition at line 327 of file range_image.hpp.

void pcl::RangeImage::getImagePoint ( const Eigen::Vector3f &  point,
float &  image_x,
float &  image_y 
) const [inline]

Same as above.

Definition at line 335 of file range_image.hpp.

void pcl::RangeImage::getImagePoint ( const Eigen::Vector3f &  point,
int &  image_x,
int &  image_y 
) const [inline]

Same as above.

Definition at line 343 of file range_image.hpp.

void pcl::RangeImage::getImagePoint ( float  x,
float  y,
float  z,
float &  image_x,
float &  image_y,
float &  range 
) const [inline]

Same as above.

Definition at line 288 of file range_image.hpp.

void pcl::RangeImage::getImagePoint ( float  x,
float  y,
float  z,
float &  image_x,
float &  image_y 
) const [inline]

Same as above.

Definition at line 296 of file range_image.hpp.

void pcl::RangeImage::getImagePoint ( float  x,
float  y,
float  z,
int &  image_x,
int &  image_y 
) const [inline]

Same as above.

Definition at line 304 of file range_image.hpp.

void pcl::RangeImage::getImagePointFromAngles ( float  angle_x,
float  angle_y,
float &  image_x,
float &  image_y 
) const [inline]

Get the image point corresponding to the given angles.

Definition at line 386 of file range_image.hpp.

float pcl::RangeImage::getImpactAngle ( const PointWithRange point1,
const PointWithRange point2 
) const [inline]

Calculate the impact angle based on the sensor position and the two given points - will return -INFINITY if one of the points is unobserved.

Definition at line 601 of file range_image.hpp.

float pcl::RangeImage::getImpactAngle ( int  x1,
int  y1,
int  x2,
int  y2 
) const [inline]

Same as above.

Definition at line 592 of file range_image.hpp.

float pcl::RangeImage::getImpactAngleBasedOnLocalNormal ( int  x,
int  y,
int  radius 
) const [inline]

Extract a local normal (with a heuristic not to include background points) and calculate the impact angle based on this.

Definition at line 864 of file range_image.hpp.

Uses the above function for every point in the image.

PCL_EXPORTS void pcl::RangeImage::getIntegralImage ( float *&  integral_image,
int *&  valid_points_num_image 
) const

Get the integral image of the range values (used for fast blur operations).

You are responsible for deleting it after usage!

PCL_EXPORTS float* pcl::RangeImage::getInterpolatedSurfaceProjection ( const Eigen::Affine3f &  pose,
int  pixel_size,
float  world_size 
) const

Calculate a range patch as the z values of the coordinate frame given by pose.

The patch will have size pixel_size x pixel_size and each pixel covers world_size/pixel_size meters in the world You are responsible for deleting the structure afterwards!

PCL_EXPORTS float* pcl::RangeImage::getInterpolatedSurfaceProjection ( const Eigen::Vector3f &  point,
int  pixel_size,
float  world_size 
) const

Same as above, but using the local coordinate frame defined by point and the viewing direction.

Eigen::Map<Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> > pcl::PointCloud< PointWithRange >::getMatrixXfMap ( int  dim,
int  stride,
int  offset 
) [inline, inherited]

Return an Eigen MatrixXf (assumes float values) mapped to the specified dimensions of the PointCloud.

Note:
This method is for advanced users only! Use with care!
Attention:
Since 1.4.0, Eigen matrices are forced to Row Major to increase the efficiency of the algorithms in PCL This means that the behavior of getMatrixXfMap changed, and is now correctly mapping 1-1 with a PointCloud structure, that is: number of points in a cloud = rows in a matrix, number of point dimensions = columns in a matrix
Parameters:
[in]dimthe number of dimensions to consider for each point
[in]stridethe number of values in each point (will be the number of values that separate two of the columns)
[in]offsetthe number of dimensions to skip from the beginning of each point (stride = offset + dim + x, where x is the number of dimensions to skip from the end of each point)
Note:
for getting only XYZ coordinates out of PointXYZ use dim=3, stride=4 and offset=0 due to the alignment.
Attention:
PointT types are most of the time aligned, so the offsets are not continuous!

Definition at line 365 of file point_cloud.h.

const Eigen::Map<const Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> > pcl::PointCloud< PointWithRange >::getMatrixXfMap ( int  dim,
int  stride,
int  offset 
) const [inline, inherited]

Return an Eigen MatrixXf (assumes float values) mapped to the specified dimensions of the PointCloud.

Note:
This method is for advanced users only! Use with care!
Attention:
Since 1.4.0, Eigen matrices are forced to Row Major to increase the efficiency of the algorithms in PCL This means that the behavior of getMatrixXfMap changed, and is now correctly mapping 1-1 with a PointCloud structure, that is: number of points in a cloud = rows in a matrix, number of point dimensions = columns in a matrix
Parameters:
[in]dimthe number of dimensions to consider for each point
[in]stridethe number of values in each point (will be the number of values that separate two of the columns)
[in]offsetthe number of dimensions to skip from the beginning of each point (stride = offset + dim + x, where x is the number of dimensions to skip from the end of each point)
Note:
for getting only XYZ coordinates out of PointXYZ use dim=3, stride=4 and offset=0 due to the alignment.
Attention:
PointT types are most of the time aligned, so the offsets are not continuous!

Definition at line 389 of file point_cloud.h.

Eigen::Map<Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> > pcl::PointCloud< PointWithRange >::getMatrixXfMap ( ) [inline, inherited]

Return an Eigen MatrixXf (assumes float values) mapped to the PointCloud.

Note:
This method is for advanced users only! Use with care!
Attention:
PointT types are most of the time aligned, so the offsets are not continuous! See getMatrixXfMap for more information.

Definition at line 404 of file point_cloud.h.

const Eigen::Map<const Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> > pcl::PointCloud< PointWithRange >::getMatrixXfMap ( ) const [inline, inherited]

Return an Eigen MatrixXf (assumes float values) mapped to the PointCloud.

Note:
This method is for advanced users only! Use with care!
Attention:
PointT types are most of the time aligned, so the offsets are not continuous! See getMatrixXfMap for more information.

Definition at line 415 of file point_cloud.h.

float pcl::RangeImage::getMaxAngleSize ( const Eigen::Affine3f &  viewer_pose,
const Eigen::Vector3f &  center,
float  radius 
) [inline, static]

Get the size of a certain area when seen from the given pose.

Parameters:
viewer_posean affine matrix defining the pose of the viewer
centerthe center of the area
radiusthe radius of the area
Returns:
the size of the area as viewed according to viewer_pose

Definition at line 767 of file range_image.hpp.

PCL_EXPORTS void pcl::RangeImage::getMinMaxRanges ( float &  min_range,
float &  max_range 
) const

Find the minimum and maximum range in the image.

virtual RangeImage* pcl::RangeImage::getNew ( ) const [inline, virtual]

Return a newly created Range image.

Can be reimplmented in derived classes like RangeImagePlanar to return an image of the same type.

Reimplemented in pcl::RangeImagePlanar.

Definition at line 674 of file range_image.h.

bool pcl::RangeImage::getNormal ( int  x,
int  y,
int  radius,
Eigen::Vector3f &  normal,
int  step_size = 1 
) const [inline]

Calculate the normal of an image point using the neighbors with a maximum pixel distance of radius.

step_size determines how many pixels are used. 1 means all, 2 only every second, etc.. Returns false if it was unable to calculate a normal.

Definition at line 879 of file range_image.hpp.

float pcl::RangeImage::getNormalBasedAcutenessValue ( int  x,
int  y,
int  radius 
) const [inline]

Calculate a score [0,1] that tells how acute the impact angle is (1.0f - getImpactAngle/90deg) This uses getImpactAngleBasedOnLocalNormal Will return -INFINITY if no normal could be calculated.

Definition at line 905 of file range_image.hpp.

PCL_EXPORTS bool pcl::RangeImage::getNormalBasedUprightTransformation ( const Eigen::Vector3f &  point,
float  max_dist,
Eigen::Affine3f &  transformation 
) const

Get a local coordinate frame at the given point based on the normal.

bool pcl::RangeImage::getNormalForClosestNeighbors ( int  x,
int  y,
int  radius,
const PointWithRange point,
int  no_of_nearest_neighbors,
Eigen::Vector3f &  normal,
int  step_size = 1 
) const [inline]

Same as above, but only the no_of_nearest_neighbors points closest to the given point are considered.

Definition at line 917 of file range_image.hpp.

bool pcl::RangeImage::getNormalForClosestNeighbors ( int  x,
int  y,
int  radius,
const Eigen::Vector3f &  point,
int  no_of_nearest_neighbors,
Eigen::Vector3f &  normal,
Eigen::Vector3f *  point_on_plane = NULL,
int  step_size = 1 
) const [inline]

Same as above.

Definition at line 1060 of file range_image.hpp.

bool pcl::RangeImage::getNormalForClosestNeighbors ( int  x,
int  y,
Eigen::Vector3f &  normal,
int  radius = 2 
) const [inline]

Same as above, using default values.

Definition at line 925 of file range_image.hpp.

PCL_EXPORTS float pcl::RangeImage::getOverlap ( const RangeImage other_range_image,
const Eigen::Affine3f &  relative_transformation,
int  search_radius,
float  max_distance,
int  pixel_step = 1 
) const

Calculates the overlap of two range images given the relative transformation (from the given image to *this)

const PointWithRange & pcl::RangeImage::getPoint ( int  image_x,
int  image_y 
) const [inline]

Return the 3D point with range at the given image position.

Parameters:
image_xthe x coordinate
image_ythe y coordinate
Returns:
the point at the specified location (returns unobserved_point if outside of the image bounds)

Definition at line 460 of file range_image.hpp.

PointWithRange & pcl::RangeImage::getPoint ( int  image_x,
int  image_y 
) [inline]

Non-const-version of getPoint.

Definition at line 483 of file range_image.hpp.

const PointWithRange & pcl::RangeImage::getPoint ( float  image_x,
float  image_y 
) const [inline]

Return the 3d point with range at the given image position.

Definition at line 498 of file range_image.hpp.

PointWithRange & pcl::RangeImage::getPoint ( float  image_x,
float  image_y 
) [inline]

Non-const-version of the above.

Definition at line 507 of file range_image.hpp.

void pcl::RangeImage::getPoint ( int  image_x,
int  image_y,
Eigen::Vector3f &  point 
) const [inline]

Same as above.

Definition at line 516 of file range_image.hpp.

void pcl::RangeImage::getPoint ( int  index,
Eigen::Vector3f &  point 
) const [inline]

Same as above.

Definition at line 524 of file range_image.hpp.

const PointWithRange & pcl::RangeImage::getPoint ( int  index) const [inline]

Return the 3d point with range at the given index (whereas index=y*width+x)

Definition at line 491 of file range_image.hpp.

const PointWithRange & pcl::RangeImage::getPointConsideringWrapAround ( int  image_x,
int  image_y 
) const [inline]

Return the 3d point with range at the given image point.

Additionally, if the given point is not an observed point if there might be a wrap around, e.g., we left the ride side of thed image and reentered on the left side (which might be the case in a 360deg 3D scan when we look at the local neighborhood of a point)

Definition at line 439 of file range_image.hpp.

const PointWithRange & pcl::RangeImage::getPointNoCheck ( int  image_x,
int  image_y 
) const [inline]

Return the 3D point with range at the given image position.

This methd performs no error checking to make sure the specified image position is inside of the image!

Parameters:
image_xthe x coordinate
image_ythe y coordinate
Returns:
the point at the specified location (program may fail if the location is outside of the image bounds)

Definition at line 469 of file range_image.hpp.

PointWithRange & pcl::RangeImage::getPointNoCheck ( int  image_x,
int  image_y 
) [inline]

Non-const-version of getPointNoCheck.

Definition at line 476 of file range_image.hpp.

float pcl::RangeImage::getRangeDifference ( const Eigen::Vector3f &  point) const [inline]

Returns the difference in range between the given point and the range of the point in the image at the position the given point would be.

(Return value is point_in_image.range-given_point.range)

Definition at line 366 of file range_image.hpp.

PCL_EXPORTS void pcl::RangeImage::getRangeImageWithSmoothedSurface ( int  radius,
RangeImage smoothed_range_image 
) const

Project all points on the local plane approximation, thereby smoothing the surface of the scan.

Get all the range values in one float array of size width*height.

Returns:
a pointer to a new float array containing the range values
Note:
This method allocates a new float array; the caller is responsible for freeing this memory.
void pcl::RangeImage::getRotationToViewerCoordinateFrame ( const Eigen::Vector3f &  point,
Eigen::Affine3f &  transformation 
) const [inline]

Same as above, but only returning the rotation.

Definition at line 1159 of file range_image.hpp.

const Eigen::Vector3f pcl::RangeImage::getSensorPos ( ) const [inline]

Get the sensor position.

Definition at line 655 of file range_image.hpp.

float pcl::RangeImage::getSquaredDistanceOfNthNeighbor ( int  x,
int  y,
int  radius,
int  n,
int  step_size 
) const [inline]

Definition at line 1031 of file range_image.hpp.

virtual void pcl::RangeImage::getSubImage ( int  sub_image_image_offset_x,
int  sub_image_image_offset_y,
int  sub_image_width,
int  sub_image_height,
int  combine_pixels,
RangeImage sub_image 
) const [virtual]

Get a sub part of the complete image as a new range image.

Parameters:
sub_image_image_offset_x- The x coordinate of the top left pixel of the sub image. This is always according to absolute 0,0 meaning -180°,-90° and it is already in the system of the new image, so the actual pixel used in the original image is combine_pixels*(image_offset_x-image_offset_x_)
sub_image_image_offset_y- Same as image_offset_x for the y coordinate
sub_image_width- width of the new image
sub_image_height- height of the new image
combine_pixels- shrinking factor, meaning the new angular resolution is combine_pixels times the old one
sub_image- the output image

Reimplemented in pcl::RangeImagePlanar.

void pcl::RangeImage::getSurfaceAngleChange ( int  x,
int  y,
int  radius,
float &  angle_change_x,
float &  angle_change_y 
) const [inline]

Calculates, how much the surface changes at a point.

Returns an angle [0.0f, PI] for x and y direction. A return value of -INFINITY means that a point was unobserved.

Definition at line 662 of file range_image.hpp.

PCL_EXPORTS void pcl::RangeImage::getSurfaceAngleChangeImages ( int  radius,
float *&  angle_change_image_x,
float *&  angle_change_image_y 
) const

Uses the above function for every point in the image.

PCL_EXPORTS float pcl::RangeImage::getSurfaceChange ( int  x,
int  y,
int  radius 
) const

Calculates, how much the surface changes at a point.

Pi meaning a flat suface and 0.0f would be a needle point Calculates, how much the surface changes at a point. 1 meaning a 90deg angle and 0 a flat suface

Uses the above function for every point in the image.

bool pcl::RangeImage::getSurfaceInformation ( int  x,
int  y,
int  radius,
const Eigen::Vector3f &  point,
int  no_of_closest_neighbors,
int  step_size,
float &  max_closest_neighbor_distance_squared,
Eigen::Vector3f &  normal,
Eigen::Vector3f &  mean,
Eigen::Vector3f &  eigen_values,
Eigen::Vector3f *  normal_all_neighbors = NULL,
Eigen::Vector3f *  mean_all_neighbors = NULL,
Eigen::Vector3f *  eigen_values_all_neighbors = NULL 
) const [inline]

Same as above but extracts some more data and can also return the extracted information for all neighbors in radius if normal_all_neighbors is not NULL.

Definition at line 945 of file range_image.hpp.

const Eigen::Affine3f& pcl::RangeImage::getTransformationToRangeImageSystem ( ) const [inline]

Getter for the transformation from the world system into the range image system (the sensor coordinate frame)

Definition at line 230 of file range_image.h.

Eigen::Affine3f pcl::RangeImage::getTransformationToViewerCoordinateFrame ( const Eigen::Vector3f &  point) const [inline]

Get the local coordinate frame with 0,0,0 in point, upright and Z as the viewing direction.

Definition at line 1142 of file range_image.hpp.

void pcl::RangeImage::getTransformationToViewerCoordinateFrame ( const Eigen::Vector3f &  point,
Eigen::Affine3f &  transformation 
) const [inline]

Same as above, using a reference for the retrurn value.

Definition at line 1151 of file range_image.hpp.

const Eigen::Affine3f& pcl::RangeImage::getTransformationToWorldSystem ( ) const [inline]

Getter for the transformation from the range image system (the sensor coordinate frame) into the world system.

Definition at line 240 of file range_image.h.

bool pcl::RangeImage::getViewingDirection ( int  x,
int  y,
Eigen::Vector3f &  viewing_direction 
) const [inline]

Get the viewing direction for the given point.

Definition at line 1125 of file range_image.hpp.

void pcl::RangeImage::getViewingDirection ( const Eigen::Vector3f &  point,
Eigen::Vector3f &  viewing_direction 
) const [inline]

Get the viewing direction for the given point.

Definition at line 1135 of file range_image.hpp.

iterator pcl::PointCloud< PointWithRange >::insert ( iterator  position,
const PointWithRange pt 
) [inline, inherited]

Insert a new point in the cloud, given an iterator.

Note:
This breaks the organized structure of the cloud by setting the height to 1!
Parameters:
[in]positionwhere to insert the point
[in]ptthe point to insert
Returns:
returns the new position iterator

Definition at line 487 of file point_cloud.h.

void pcl::PointCloud< PointWithRange >::insert ( iterator  position,
size_t  n,
const PointWithRange pt 
) [inline, inherited]

Insert a new point in the cloud N times, given an iterator.

Note:
This breaks the organized structure of the cloud by setting the height to 1!
Parameters:
[in]positionwhere to insert the point
[in]nthe number of times to insert the point
[in]ptthe point to insert

Definition at line 502 of file point_cloud.h.

void pcl::PointCloud< PointWithRange >::insert ( iterator  position,
InputIterator  first,
InputIterator  last 
) [inline, inherited]

Insert a new range of points in the cloud, at a certain position.

Note:
This breaks the organized structure of the cloud by setting the height to 1!
Parameters:
[in]positionwhere to insert the data
[in]firstwhere to start inserting the points from
[in]lastwhere to stop inserting the points from

Definition at line 516 of file point_cloud.h.

Integrates the given far range measurements into the range image.

bool pcl::RangeImage::isInImage ( int  x,
int  y 
) const [inline]

Check if a point is inside of the image.

Definition at line 401 of file range_image.hpp.

static bool pcl::RangeImage::isLargerPlane ( const ExtractedPlane p1,
const ExtractedPlane p2 
) [inline, static]

Comparator to enable us to sort a vector of Planes regarding their size using std::sort(begin(), end(), RangeImage::isLargerPlane);.

Definition at line 654 of file range_image.h.

bool pcl::RangeImage::isMaxRange ( int  x,
int  y 
) const [inline]

Check if a point is a max range (range=INFINITY) - please check isInImage or isObserved first!

Definition at line 431 of file range_image.hpp.

bool pcl::RangeImage::isObserved ( int  x,
int  y 
) const [inline]

Check if a point is inside of the image and has either a finite range or a max reading (range=INFINITY)

Definition at line 422 of file range_image.hpp.

bool pcl::PointCloud< PointWithRange >::isOrganized ( ) const [inline, inherited]

Return whether a dataset is organized (e.g., arranged in a structured grid).

Note:
The height value must be different than 1 for a dataset to be organized.

Definition at line 343 of file point_cloud.h.

bool pcl::RangeImage::isValid ( int  x,
int  y 
) const [inline]

Check if a point is inside of the image and has a finite range.

Definition at line 408 of file range_image.hpp.

bool pcl::RangeImage::isValid ( int  index) const [inline]

Check if a point has a finite range.

Definition at line 415 of file range_image.hpp.

Get a boost shared pointer of a copy of this.

Reimplemented in pcl::RangeImagePlanar.

Definition at line 126 of file range_image.h.

Ptr pcl::PointCloud< PointWithRange >::makeShared ( ) const [inline, inherited]

Copy the cloud to the heap and return a smart pointer Note that deep copy is performed, so avoid using this function on non-empty clouds.

The changes of the returned cloud are not mirrored back to this one.

Returns:
shared pointer to the copy of the cloud

Definition at line 581 of file point_cloud.h.

const PointWithRange & pcl::PointCloud< PointWithRange >::operator() ( size_t  column,
size_t  row 
) const [inline, inherited]

Obtain the point given by the (column, row) coordinates.

Only works on organized datasets (those that have height != 1).

Parameters:
[in]columnthe column coordinate
[in]rowthe row coordinate

Definition at line 322 of file point_cloud.h.

PointWithRange & pcl::PointCloud< PointWithRange >::operator() ( size_t  column,
size_t  row 
) [inline, inherited]

Obtain the point given by the (column, row) coordinates.

Only works on organized datasets (those that have height != 1).

Parameters:
[in]columnthe column coordinate
[in]rowthe row coordinate

Definition at line 333 of file point_cloud.h.

const PointCloud pcl::PointCloud< PointWithRange >::operator+ ( const PointCloud< PointWithRange > &  rhs) [inline, inherited]

Add a point cloud to another cloud.

Parameters:
[in]rhsthe cloud to add to the current cloud
Returns:
the new cloud as a concatenation of the current cloud and the new given cloud

Definition at line 281 of file point_cloud.h.

PointCloud& pcl::PointCloud< PointWithRange >::operator+= ( const PointCloud< PointWithRange > &  rhs) [inline, inherited]

Add a point cloud to the current cloud.

Parameters:
[in]rhsthe cloud to add to the current cloud
Returns:
the new cloud as a concatenation of the current cloud and the new given cloud

Definition at line 255 of file point_cloud.h.

const PointWithRange & pcl::PointCloud< PointWithRange >::operator[] ( size_t  n) const [inline, inherited]

Definition at line 459 of file point_cloud.h.

PointWithRange & pcl::PointCloud< PointWithRange >::operator[] ( size_t  n) [inline, inherited]

Definition at line 460 of file point_cloud.h.

void pcl::PointCloud< PointWithRange >::push_back ( const PointWithRange pt) [inline, inherited]

Insert a new point in the cloud, at the end of the container.

Note:
This breaks the organized structure of the cloud by setting the height to 1!
Parameters:
[in]ptthe point to insert

Definition at line 473 of file point_cloud.h.

void pcl::RangeImage::real2DToInt2D ( float  x,
float  y,
int &  xInt,
int &  yInt 
) const [inline]

Transforms an image point in float values to an image point in int values.

Definition at line 394 of file range_image.hpp.

Recalculate all 3D point positions according to their pixel position and range.

void pcl::PointCloud< PointWithRange >::reserve ( size_t  n) [inline, inherited]

Definition at line 454 of file point_cloud.h.

Reset all values to an empty range image.

void pcl::PointCloud< PointWithRange >::resize ( size_t  n) [inline, inherited]

Definition at line 455 of file point_cloud.h.

void pcl::RangeImage::setAngularResolution ( float  angular_resolution) [inline]

Set the angular resolution of the range image.

Parameters:
angular_resolutionthe new angular resolution (in radians per pixel)

Definition at line 1167 of file range_image.hpp.

void pcl::RangeImage::setImageOffsets ( int  offset_x,
int  offset_y 
) [inline]

Setter for image offsets.

Definition at line 518 of file range_image.h.

void pcl::RangeImage::setTransformationToRangeImageSystem ( const Eigen::Affine3f &  to_range_image_system) [inline]

Setter for the transformation from the range image system (the sensor coordinate frame) into the world system.

Definition at line 1174 of file range_image.hpp.

Sets all -INFINITY values to INFINITY.

size_t pcl::PointCloud< PointWithRange >::size ( ) const [inline, inherited]

Definition at line 453 of file point_cloud.h.

void pcl::PointCloud< PointWithRange >::swap ( PointCloud< PointWithRange > &  rhs) [inline, inherited]

Swap a point cloud with another cloud.

Parameters:
[in,out]rhspoint cloud to swap this with

Definition at line 556 of file point_cloud.h.


Member Data Documentation

bool pcl::RangeImage::debug [static]

Just for...

well... debugging purposes. :-)

Definition at line 685 of file range_image.h.

The point cloud header.

It contains information about the acquisition time.

Definition at line 421 of file point_cloud.h.

uint32_t pcl::PointCloud< PointWithRange >::height [inherited]

The point cloud height (if organized as an image-structure).

Definition at line 429 of file point_cloud.h.

bool pcl::PointCloud< PointWithRange >::is_dense [inherited]

True if no points are invalid (e.g., have NaN or Inf values).

Definition at line 432 of file point_cloud.h.

The maximum number of openmp threads that can be used in this class.

Definition at line 80 of file range_image.h.

std::vector<PointWithRange , Eigen::aligned_allocator<PointWithRange > > pcl::PointCloud< PointWithRange >::points [inherited]

The point data.

Definition at line 424 of file point_cloud.h.

Eigen::Quaternionf pcl::PointCloud< PointWithRange >::sensor_orientation_ [inherited]

Sensor acquisition pose (rotation).

Definition at line 437 of file point_cloud.h.

Eigen::Vector4f pcl::PointCloud< PointWithRange >::sensor_origin_ [inherited]

Sensor acquisition pose (origin/translation).

Definition at line 435 of file point_cloud.h.

uint32_t pcl::PointCloud< PointWithRange >::width [inherited]

The point cloud width (if organized as an image-structure).

Definition at line 427 of file point_cloud.h.


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