Loading...
Searching...
No Matches
pcl::RangeImagePlanar Class Reference

RangeImagePlanar is derived from the original range image and differs from it because it's not a spherical projection, but using a projection plane (as normal cameras do), therefore being better applicable for range sensors that already provide a range image by themselves (stereo cameras, ToF-cameras), so that a conversion to point cloud and then to a spherical range image becomes unnecessary. More...

`#include <pcl/range_image/range_image_planar.h>`

Inheritance diagram for pcl::RangeImagePlanar:

## Public Types

using | BaseClass = RangeImage
using | Ptr = shared_ptr< RangeImagePlanar >
using | ConstPtr = shared_ptr< const RangeImagePlanar >
Public Types inherited from pcl::RangeImage
enum | CoordinateFrame { CAMERA_FRAME = 0 , LASER_FRAME = 1 }
using | BaseClass = pcl::PointCloud< PointWithRange >
using | VectorOfEigenVector3f = std::vector< Eigen::Vector3f, Eigen::aligned_allocator< Eigen::Vector3f > >
using | Ptr = shared_ptr< RangeImage >
using | ConstPtr = shared_ptr< const RangeImage >
Public Types inherited from pcl::PointCloud< PointWithRange >
using | PointType = PointWithRange
using | VectorType = std::vector< PointWithRange, Eigen::aligned_allocator< PointWithRange > >
using | CloudVectorType = std::vector< PointCloud< PointWithRange >, Eigen::aligned_allocator< PointCloud< PointWithRange > > >
using | Ptr = shared_ptr< PointCloud< PointWithRange > >
using | ConstPtr = shared_ptr< const PointCloud< PointWithRange > >
using | value_type = PointWithRange
using | reference = PointWithRange &
using | const_reference = const PointWithRange &
using | difference_type = typename VectorType::difference_type
using | size_type = typename VectorType::size_type
using | iterator = typename VectorType::iterator
using | const_iterator = typename VectorType::const_iterator
using | reverse_iterator = typename VectorType::reverse_iterator
using | const_reverse_iterator = typename VectorType::const_reverse_iterator

## Public Member Functions

PCL_EXPORTS | RangeImagePlanar ()
| Constructor.
PCL_EXPORTS | ~RangeImagePlanar () override
| Destructor.
RangeImage * | getNew () const override
| Return a newly created RangeImagePlanar.
PCL_EXPORTS void | copyTo (RangeImage &other) const override
| Copy *this to other.
Ptr | makeShared ()
| Get a boost shared pointer of a copy of this.
PCL_EXPORTS void | setDisparityImage (const float *disparity_image, int di_width, int di_height, float focal_length, float base_line, float desired_angular_resolution=-1)
| Create the image from an existing disparity image.
PCL_EXPORTS void | setDepthImage (const float *depth_image, int di_width, int di_height, float di_center_x, float di_center_y, float di_focal_length_x, float di_focal_length_y, float desired_angular_resolution=-1)
| Create the image from an existing depth image.
PCL_EXPORTS void | setDepthImage (const unsigned short *depth_image, int di_width, int di_height, float di_center_x, float di_center_y, float di_focal_length_x, float di_focal_length_y, float desired_angular_resolution=-1)
| Create the image from an existing depth image.
template<typename PointCloudType >
void | createFromPointCloudWithFixedSize (const PointCloudType &point_cloud, int di_width, int di_height, float di_center_x, float di_center_y, float di_focal_length_x, float di_focal_length_y, const Eigen::Affine3f &sensor_pose, CoordinateFrame coordinate_frame=CAMERA_FRAME, float noise_level=0.0f, float min_range=0.0f)
| Create the image from an existing point cloud.
void | calculate3DPoint (float image_x, float image_y, float range, Eigen::Vector3f &point) const override
| Calculate the 3D point according to the given image point and range.
void | getImagePoint (const Eigen::Vector3f &point, float &image_x, float &image_y, float &range) const override
| Calculate the image point and range from the given 3D point.
PCL_EXPORTS 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 override
| Get a sub part of the complete image as a new range image.
PCL_EXPORTS void | getHalfImage (RangeImage &half_image) const override
| Get a range image with half the resolution.
float | getFocalLengthX () const
| Getter for the focal length in X.
float | getFocalLengthY () const
| Getter for the focal length in Y.
float | getCenterX () const
| Getter for the principal point in X.
float | getCenterY () const
| Getter for the principal point in Y.
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.
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.
Public Member Functions inherited from pcl::RangeImage
PCL_EXPORTS | RangeImage ()
| Constructor.
virtual PCL_EXPORTS | ~RangeImage ()=default
| 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=pcl::deg2rad(0.5f), float max_angle_width=pcl::deg2rad(360.0f), float max_angle_height=pcl::deg2rad(180.0f), 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

createFromPointCloud (const PointCloudType &point_cloud, float angular_resolution_x=pcl::deg2rad(0.5f), float angular_resolution_y=pcl::deg2rad(0.5f), float max_angle_width=pcl::deg2rad(360.0f), float max_angle_height=pcl::deg2rad(180.0f), 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 PointCloudType >
void | createFromPointCloudWithKnownSize (const PointCloudType &point_cloud, float angular_resolution_x, float angular_resolution_y, 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)).
template<typename PointCloudTypeWithViewpoints >
void | createFromPointCloudWithViewpoints (const PointCloudTypeWithViewpoints &point_cloud, float angular_resolution_x, float angular_resolution_y, 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)
void | createEmpty (float angular_resolution_x, float angular_resolution_y, 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)
template<typename PointCloudType >
void | doZBuffer (const PointCloudType &point_cloud, float noise_level, float min_range, int &top, int &right, int &bottom, int &left)
| Integrate the given point cloud into the current range image using a z-buffer.
template<typename PointCloudType >
void | integrateFarRanges (const PointCloudType &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 x direction in radians per pixel.
float | getAngularResolutionX () const
| Getter for the angular resolution of the range image in x direction in radians per pixel.
float | getAngularResolutionY () const
| Getter for the angular resolution of the range image in y direction in radians per pixel.
void | getAngularResolution (float &angular_resolution_x, float &angular_resolution_y) const
| Getter for the angular resolution of the range image in x and y direction (in radians).
void | setAngularResolution (float angular_resolution)
| Set the angular resolution of the range image.
void | setAngularResolution (float angular_resolution_x, float angular_resolution_y)
| Set the angular resolution of the range image.
const PointWithRange & | getPoint (int image_x, int image_y) const
| Return the 3D point with range at the given image position.
PointWithRange & | getPoint (int image_x, int image_y)
| Non-const-version of getPoint.
const PointWithRange & | getPoint (float image_x, float image_y) const
| Return the 3d point with range at the given image position.
PointWithRange & | getPoint (float image_x, float image_y)
| Non-const-version of the above.
const PointWithRange & | getPointNoCheck (int image_x, int image_y) const
| Return the 3D point with range at the given image position.
PointWithRange & | getPointNoCheck (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 PointWithRange & | getPoint (int index) const
| Return the 3d point with range at the given index (whereas index=y*width+x)
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.
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.
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=nullptr, 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=nullptr, Eigen::Vector3f *mean_all_neighbors=nullptr, Eigen::Vector3f *eigen_values_all_neighbors=nullptr) 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.
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.
virtual 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 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.
Public Member Functions inherited from pcl::PointCloud< PointWithRange >
| PointCloud ()=default
| Default constructor.
| PointCloud (const PointCloud< PointWithRange > &pc, const Indices &indices)
| Copy constructor from point cloud subset.
| PointCloud (std::uint32_t width_, std::uint32_t height_, const PointWithRange &value_=PointWithRange())
| Allocate constructor from point cloud subset.
PointCloud & | operator+= (const PointCloud &rhs)
| Add a point cloud to the current cloud.
PointCloud | operator+ (const PointCloud &rhs)
| Add a point cloud to another cloud.
const PointWithRange & | at (int column, int row) const
| Obtain the point given by the (column, row) coordinates.
PointWithRange & | at (int column, int row)
| Obtain the point given by the (column, row) coordinates.
const PointWithRange & | at (std::size_t n) const
PointWithRange & | at (std::size_t n)
const PointWithRange & | operator() (std::size_t column, std::size_t row) const
| Obtain the point given by the (column, row) coordinates.
PointWithRange & | operator() (std::size_t column, std::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 ()
const Eigen::Map< const Eigen::MatrixXf, Eigen::Aligned, Eigen::OuterStride<> > | getMatrixXfMap () const
iterator | begin () noexcept
const_iterator | begin () const noexcept
iterator | end () noexcept
const_iterator | end () const noexcept
const_iterator | cbegin () const noexcept
const_iterator | cend () const noexcept
reverse_iterator | rbegin () noexcept
const_reverse_iterator | rbegin () const noexcept
reverse_iterator | rend () noexcept
const_reverse_iterator | rend () const noexcept
const_reverse_iterator | crbegin () const noexcept
const_reverse_iterator | crend () const noexcept
std::size_t | size () const
index_t | max_size () const noexcept
void | reserve (std::size_t n)
bool | empty () const
PointWithRange * | data () noexcept
const PointWithRange * | data () const noexcept
void | resize (std::size_t count)
| Resizes the container to contain `count` elements.
void | resize (uindex_t new_width, uindex_t new_height)
| Resizes the container to contain `new_width * new_height` elements.
void | resize (index_t count, const PointWithRange &value)
| Resizes the container to contain count elements.
void | resize (index_t new_width, index_t new_height, const PointWithRange &value)
| Resizes the container to contain count elements.
const PointWithRange & | operator[] (std::size_t n) const
PointWithRange & | operator[] (std::size_t n)
const PointWithRange & | front () const
PointWithRange & | front ()
const PointWithRange & | back () const
PointWithRange & | back ()
void | assign (index_t count, const PointWithRange &value)
| Replaces the points with `count` copies of `value`
void | assign (index_t new_width, index_t new_height, const PointWithRange &value)
| Replaces the points with `new_width * new_height` copies of `value`
void | assign (InputIterator first, InputIterator last)
| Replaces the points with copies of those in the range `[first, last)`
void | assign (InputIterator first, InputIterator last, index_t new_width)
| Replaces the points with copies of those in the range `[first, last)`
void | assign (std::initializer_list< PointWithRange > ilist)
| Replaces the points with the elements from the initializer list `ilist`
void | assign (std::initializer_list< PointWithRange > ilist, index_t new_width)
| Replaces the points with the elements from the initializer list `ilist`
void | push_back (const PointWithRange &pt)
| Insert a new point in the cloud, at the end of the container.
void | transient_push_back (const PointWithRange &pt)
| Insert a new point in the cloud, at the end of the container.
reference | emplace_back (Args &&...args)
| Emplace a new point in the cloud, at the end of the container.
reference | transient_emplace_back (Args &&...args)
| Emplace 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, std::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 | transient_insert (iterator position, const PointWithRange &pt)
| Insert a new point in the cloud, given an iterator.
void | transient_insert (iterator position, std::size_t n, const PointWithRange &pt)
| Insert a new point in the cloud N times, given an iterator.
void | transient_insert (iterator position, InputIterator first, InputIterator last)
| Insert a new range of points in the cloud, at a certain position.
iterator | emplace (iterator position, Args &&...args)
| Emplace a new point in the cloud, given an iterator.
iterator | transient_emplace (iterator position, Args &&...args)
| Emplace a new point in the cloud, given an iterator.
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.
iterator | transient_erase (iterator position)
| Erase a point in the cloud.
iterator | transient_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.

## Protected Attributes

float | focal_length_x_ {0.0f}
float | focal_length_y_ {0.0f}
| The focal length of the image in pixels.
float | focal_length_x_reciprocal_ {0.0f}
float | focal_length_y_reciprocal_ {0.0f}
| 1/focal_length -> for internal use
float | center_x_ {0.0f}
float | center_y_ {0.0f}
| The principle point of the image.
Protected Attributes inherited from pcl::RangeImage
Eigen::Affine3f | to_range_image_system_
| Inverse of to_world_system_.
Eigen::Affine3f | to_world_system_
| Inverse of to_range_image_system_.
float | angular_resolution_x_ {0.0f}
| Angular resolution of the range image in x direction in radians per pixel.
float | angular_resolution_y_ {0.0f}
| Angular resolution of the range image in y direction in radians per pixel.
float | angular_resolution_x_reciprocal_ {0.0f}
| 1.0/angular_resolution_x_ - provided for better performance of multiplication compared to division
float | angular_resolution_y_reciprocal_ {0.0f}
| 1.0/angular_resolution_y_ - provided for better performance of multiplication compared to division
int | image_offset_x_ {0}
int | image_offset_y_ {0}
| Position of the top left corner of the range image compared to an image of full size (360x180 degrees)
PointWithRange | unobserved_point
| This point is used to be able to return a reference to a non-existing point.

## Additional Inherited Members

Static Public Member Functions inherited from pcl::RangeImage
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 pcl::PCLPointCloud2 &point_cloud_data, PointCloud< PointWithViewpoint > &far_ranges)
| Check if the provided data includes far ranges and add them to far_ranges.
Static Public Member Functions inherited from pcl::PointCloud< PointWithRange >
static bool | concatenate (pcl::PointCloud< PointWithRange > &cloud1, const pcl::PointCloud< PointWithRange > &cloud2)
static bool | concatenate (const pcl::PointCloud< PointWithRange > &cloud1, const pcl::PointCloud< PointWithRange > &cloud2, pcl::PointCloud< PointWithRange > &cloud_out)
Public Attributes inherited from pcl::PointCloud< PointWithRange >
pcl::PCLHeader | header
| The point cloud header.
std::vector< PointWithRange, Eigen::aligned_allocator< PointWithRange > > | points
| The point data.
std::uint32_t | width
| The point cloud width (if organized as an image-structure).
std::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 in any of their floating point fields).
Eigen::Vector4f | sensor_origin_
| Sensor acquisition pose (origin/translation).
Eigen::Quaternionf | sensor_orientation_
| Sensor acquisition pose (rotation).
Static Public Attributes inherited from pcl::RangeImage
static int | max_no_of_threads
| The maximum number of openmp threads that can be used in this class.
static bool | debug
| Just for... well... debugging purposes.
Static Protected Member Functions inherited from pcl::RangeImage
static void | createLookupTables ()
| Create lookup tables for trigonometric functions.
static float | asinLookUp (float value)
| Query the asin lookup table.
static float | atan2LookUp (float y, float x)
| Query the std::atan2 lookup table.
static float | cosLookUp (float value)
| Query the cos lookup table.
Static Protected Attributes inherited from pcl::RangeImage
static const int | lookup_table_size
static std::vector< float > | asin_lookup_table
static std::vector< float > | atan_lookup_table
static std::vector< float > | cos_lookup_table

## Detailed Description

RangeImagePlanar is derived from the original range image and differs from it because it's not a spherical projection, but using a projection plane (as normal cameras do), therefore being better applicable for range sensors that already provide a range image by themselves (stereo cameras, ToF-cameras), so that a conversion to point cloud and then to a spherical range image becomes unnecessary.

Author
  Bastian Steder

Definition at line 51 of file range_image_planar.h.

## Member Typedef Documentation

## BaseClass

using pcl::RangeImagePlanar::BaseClass = RangeImage

Definition at line 55 of file range_image_planar.h.

## ConstPtr

using pcl::RangeImagePlanar::ConstPtr = shared_ptr<const RangeImagePlanar>

Definition at line 57 of file range_image_planar.h.

## Ptr

using pcl::RangeImagePlanar::Ptr = shared_ptr<RangeImagePlanar>

Definition at line 56 of file range_image_planar.h.

## Constructor & Destructor Documentation

## RangeImagePlanar()

PCL_EXPORTS pcl::RangeImagePlanar::RangeImagePlanar | ( |  | ) |

Constructor.

Referenced by getNew().

## ~RangeImagePlanar()

PCL_EXPORTS pcl::RangeImagePlanar::~RangeImagePlanar | ( |  | ) |

override

Destructor.

## Member Function Documentation

## calculate3DPoint() [1/5]

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 445 of file range_image.hpp.

## calculate3DPoint() [2/5]

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 from pcl::RangeImage.

Definition at line 442 of file range_image.hpp.

References pcl_lrintf.

## calculate3DPoint() [3/5]

void pcl::RangeImagePlanar::calculate3DPoint | ( | float | image_x,
|  | float | image_y,
|  | float | range,
|  | Eigen::Vector3f & | point
| ) |  | const

inline override virtual

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

Parameters

  image_x | the x image position
  image_y | the y image position
  range | the range
  point | the resulting 3D point

Note
  Implementation according to planar range images (compared to spherical as in the original)

Reimplemented from pcl::RangeImage.

Definition at line 92 of file range_image_planar.hpp.

References center_x_, center_y_, focal_length_x_reciprocal_, focal_length_y_reciprocal_, pcl::RangeImage::image_offset_x_, pcl::RangeImage::image_offset_y_, and pcl::RangeImage::to_world_system_.

## calculate3DPoint() [4/5]

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 435 of file range_image.hpp.

References pcl::RangeImage::angular_resolution_x_reciprocal_, pcl::RangeImage::angular_resolution_y_reciprocal_, pcl::RangeImage::cosLookUp(), pcl::RangeImage::image_offset_x_, pcl::RangeImage::image_offset_y_, and M_PI.

## calculate3DPoint() [5/5]

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 438 of file range_image.hpp.

## copyTo()

PCL_EXPORTS void pcl::RangeImagePlanar::copyTo | ( | RangeImage & | other | ) | const

override virtual

Copy *this to other.

Derived version - also copying additional RangeImagePlanar members

Reimplemented from pcl::RangeImage.

## createFromPointCloudWithFixedSize()

template<typename PointCloudType >

void pcl::RangeImagePlanar::createFromPointCloudWithFixedSize | ( | const PointCloudType & | point_cloud,
|  | int | di_width,
|  | int | di_height,
|  | float | di_center_x,
|  | float | di_center_y,
|  | float | di_focal_length_x,
|  | float | di_focal_length_y,
|  | const Eigen::Affine3f & | sensor_pose,
|  | CoordinateFrame | coordinate_frame = `CAMERA_FRAME`,
|  | float | noise_level = `0.0f`,
|  | float | min_range = `0.0f`
| ) |  |

Create the image from an existing point cloud.

Parameters

  point_cloud | the source point cloud
  di_width | the disparity image width
  di_height | the disparity image height
  di_center_x | the x-coordinate of the camera's center of projection
  di_center_y | the y-coordinate of the camera's center of projection
  di_focal_length_x | the camera's focal length in the horizontal direction
  di_focal_length_y | the camera's focal length in the vertical direction
  sensor_pose | the pose of the virtual depth camera
  coordinate_frame | the used coordinate frame of the point cloud
  noise_level | what is the typical noise of the sensor - is used for averaging in the z-buffer
  min_range | minimum range to consifder points

Definition at line 50 of file range_image_planar.hpp.

References center_x_, center_y_, pcl::RangeImage::doZBuffer(), focal_length_x_, focal_length_x_reciprocal_, focal_length_y_, focal_length_y_reciprocal_, pcl::RangeImage::getCoordinateFrameTransformation(), pcl::PointCloud< PointWithRange >::height, pcl::PointCloud< PointWithRange >::is_dense, pcl::PointCloud< PointWithRange >::points, pcl::RangeImage::recalculate3DPointPositions(), pcl::PointCloud< PointWithRange >::size(), pcl::RangeImage::to_range_image_system_, pcl::RangeImage::to_world_system_, pcl::RangeImage::unobserved_point, and pcl::PointCloud< PointWithRange >::width.

## getCenterX()

float pcl::RangeImagePlanar::getCenterX | ( |  | ) | const

inline

Getter for the principal point in X.

Definition at line 201 of file range_image_planar.h.

References center_x_.

## getCenterY()

float pcl::RangeImagePlanar::getCenterY | ( |  | ) | const

inline

Getter for the principal point in Y.

Definition at line 205 of file range_image_planar.h.

References center_y_.

## getFocalLengthX()

float pcl::RangeImagePlanar::getFocalLengthX | ( |  | ) | const

inline

Getter for the focal length in X.

Definition at line 193 of file range_image_planar.h.

References focal_length_x_.

## getFocalLengthY()

float pcl::RangeImagePlanar::getFocalLengthY | ( |  | ) | const

inline

Getter for the focal length in Y.

Definition at line 197 of file range_image_planar.h.

References focal_length_y_.

## getHalfImage()

PCL_EXPORTS void pcl::RangeImagePlanar::getHalfImage | ( | RangeImage & | half_image | ) | const

override virtual

Get a range image with half the resolution.

Reimplemented from pcl::RangeImage.

## getImagePoint() [1/8]

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

inline

Same as above.

Definition at line 461 of file range_image.hpp.

## getImagePoint() [2/8]

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 from pcl::RangeImage.

Definition at line 453 of file range_image.hpp.

## getImagePoint() [3/8]

void pcl::RangeImagePlanar::getImagePoint | ( | const Eigen::Vector3f & | point,
|  | float & | image_x,
|  | float & | image_y,
|  | float & | range
| ) |  | const

inline override virtual

Calculate the image point and range from the given 3D point.

Parameters

  point | the resulting 3D point
  image_x | the resulting x image position
  image_y | the resulting y image position
  range | the resulting range

Note
  Implementation according to planar range images (compared to spherical as in the original)

Reimplemented from pcl::RangeImage.

Definition at line 105 of file range_image_planar.hpp.

References center_x_, center_y_, focal_length_x_, focal_length_y_, pcl::RangeImage::image_offset_x_, pcl::RangeImage::image_offset_y_, and pcl::RangeImage::to_range_image_system_.

## getImagePoint() [4/8]

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

inline

Same as above.

Definition at line 465 of file range_image.hpp.

References pcl::RangeImage::getPoint().

## getImagePoint() [5/8]

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

inline

Same as above.

Definition at line 457 of file range_image.hpp.

References pcl::RangeImage::getPoint(), and pcl::RangeImage::isInImage().

## getImagePoint() [6/8]

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

inline

Same as above.

Definition at line 473 of file range_image.hpp.

## getImagePoint() [7/8]

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 469 of file range_image.hpp.

## getImagePoint() [8/8]

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

inline

Same as above.

Definition at line 477 of file range_image.hpp.

## getNew()

RangeImage * pcl::RangeImagePlanar::getNew | ( |  | ) | const

inline override virtual

Return a newly created RangeImagePlanar.

Reimplementation to return an image of the same type.

Reimplemented from pcl::RangeImage.

Definition at line 68 of file range_image_planar.h.

References RangeImagePlanar().

## getSubImage()

PCL_EXPORTS void pcl::RangeImagePlanar::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

override 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 from pcl::RangeImage.

## makeShared()

Ptr pcl::RangeImagePlanar::makeShared | ( |  | ) |

inline

Get a boost shared pointer of a copy of this.

Definition at line 77 of file range_image_planar.h.

## setDepthImage() [1/2]

PCL_EXPORTS void pcl::RangeImagePlanar::setDepthImage | ( | const float * | depth_image,
|  | int | di_width,
|  | int | di_height,
|  | float | di_center_x,
|  | float | di_center_y,
|  | float | di_focal_length_x,
|  | float | di_focal_length_y,
|  | float | desired_angular_resolution = `-1`
| ) |  |

Create the image from an existing depth image.

Parameters

  depth_image | the input depth image data as float values
  di_width | the disparity image width
  di_height | the disparity image height
  di_center_x | the x-coordinate of the camera's center of projection
  di_center_y | the y-coordinate of the camera's center of projection
  di_focal_length_x | the camera's focal length in the horizontal direction
  di_focal_length_y | the camera's focal length in the vertical direction
  desired_angular_resolution | If this is set, the system will skip as many pixels as necessary to get as close to this angular resolution as possible while not going over this value (the density will not be lower than this value). The value is in radians per pixel.

## setDepthImage() [2/2]

PCL_EXPORTS void pcl::RangeImagePlanar::setDepthImage | ( | const unsigned short * | depth_image,
|  | int | di_width,
|  | int | di_height,
|  | float | di_center_x,
|  | float | di_center_y,
|  | float | di_focal_length_x,
|  | float | di_focal_length_y,
|  | float | desired_angular_resolution = `-1`
| ) |  |

Create the image from an existing depth image.

Parameters

  depth_image | the input disparity image data as short values describing millimeters
  di_width | the disparity image width
  di_height | the disparity image height
  di_center_x | the x-coordinate of the camera's center of projection
  di_center_y | the y-coordinate of the camera's center of projection
  di_focal_length_x | the camera's focal length in the horizontal direction
  di_focal_length_y | the camera's focal length in the vertical direction
  desired_angular_resolution | If this is set, the system will skip as many pixels as necessary to get as close to this angular resolution as possible while not going over this value (the density will not be lower than this value). The value is in radians per pixel.

## setDisparityImage()

PCL_EXPORTS void pcl::RangeImagePlanar::setDisparityImage | ( | const float * | disparity_image,
|  | int | di_width,
|  | int | di_height,
|  | float | focal_length,
|  | float | base_line,
|  | float | desired_angular_resolution = `-1`
| ) |  |

Create the image from an existing disparity image.

Parameters

  disparity_image | the input disparity image data
  di_width | the disparity image width
  di_height | the disparity image height
  focal_length | the focal length of the primary camera that generated the disparity image
  base_line | the baseline of the stereo pair that generated the disparity image
  desired_angular_resolution | If this is set, the system will skip as many pixels as necessary to get as close to this angular resolution as possible while not going over this value (the density will not be lower than this value). The value is in radians per pixel.

## Member Data Documentation

## center_x_

float pcl::RangeImagePlanar::center_x_ {0.0f}

protected

Definition at line 211 of file range_image_planar.h.

Referenced by calculate3DPoint(), createFromPointCloudWithFixedSize(), getCenterX(), and getImagePoint().

## center_y_

float pcl::RangeImagePlanar::center_y_ {0.0f}

protected

The principle point of the image.

Definition at line 211 of file range_image_planar.h.

Referenced by calculate3DPoint(), createFromPointCloudWithFixedSize(), getCenterY(), and getImagePoint().

## focal_length_x_

float pcl::RangeImagePlanar::focal_length_x_ {0.0f}

protected

Definition at line 209 of file range_image_planar.h.

Referenced by createFromPointCloudWithFixedSize(), getFocalLengthX(), and getImagePoint().

## focal_length_x_reciprocal_

float pcl::RangeImagePlanar::focal_length_x_reciprocal_ {0.0f}

protected

Definition at line 210 of file range_image_planar.h.

Referenced by calculate3DPoint(), and createFromPointCloudWithFixedSize().

## focal_length_y_

float pcl::RangeImagePlanar::focal_length_y_ {0.0f}

protected

The focal length of the image in pixels.

Definition at line 209 of file range_image_planar.h.

Referenced by createFromPointCloudWithFixedSize(), getFocalLengthY(), and getImagePoint().

## focal_length_y_reciprocal_

float pcl::RangeImagePlanar::focal_length_y_reciprocal_ {0.0f}

protected

1/focal_length -> for internal use

Definition at line 210 of file range_image_planar.h.

Referenced by calculate3DPoint(), and createFromPointCloudWithFixedSize().

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

- pcl/range_image/range_image_planar.h
- pcl/range_image/impl/range_image_planar.hpp