Point Cloud Library (PCL) 1.12.0
|
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>
Public Types | |
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> |
![]() | |
using | PointType |
using | VectorType |
using | CloudVectorType |
using | Ptr |
using | ConstPtr |
using | value_type |
using | reference |
using | const_reference |
using | difference_type |
using | size_type |
using | iterator |
using | const_iterator |
using | reverse_iterator |
using | const_reverse_iterator |
Public Member Functions | |
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. | |
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=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 *´ness_value_image_x, float *´ness_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. | |
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. | |
virtual PCL_EXPORTS RangeImage * | getNew () const |
Return a newly created Range image. | |
virtual PCL_EXPORTS void | copyTo (RangeImage &other) const |
Copy other to *this. | |
![]() | |
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. | |
Static Public Member Functions | |
static float | getMaxAngleSize (const Eigen::Affine3f &viewer_pose, const Eigen::Vector3f ¢er, 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 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) |
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... well... debugging purposes. | |
Static Protected Member Functions | |
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. | |
Protected Attributes | |
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_ |
Angular resolution of the range image in x direction in radians per pixel. | |
float | angular_resolution_y_ |
Angular resolution of the range image in y direction in radians per pixel. | |
float | angular_resolution_x_reciprocal_ |
1.0/angular_resolution_x_ - provided for better performance of multiplication compared to division | |
float | angular_resolution_y_reciprocal_ |
1.0/angular_resolution_y_ - provided for better performance of multiplication compared to division | |
int | image_offset_x_ |
int | image_offset_y_ |
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. | |
Static Protected Attributes | |
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 |
Additional Inherited Members | |
![]() | |
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). | |
RangeImage is derived from pcl/PointCloud and provides functionalities with focus on situations where a 3D scene was captured from a specific view point.
Definition at line 54 of file range_image.h.
Definition at line 58 of file range_image.h.
using pcl::RangeImage::ConstPtr = shared_ptr<const RangeImage> |
Definition at line 61 of file range_image.h.
using pcl::RangeImage::Ptr = shared_ptr<RangeImage> |
Definition at line 60 of file range_image.h.
using pcl::RangeImage::VectorOfEigenVector3f = std::vector<Eigen::Vector3f, Eigen::aligned_allocator<Eigen::Vector3f> > |
Definition at line 59 of file range_image.h.
Enumerator | |
---|---|
CAMERA_FRAME | |
LASER_FRAME |
Definition at line 63 of file range_image.h.
PCL_EXPORTS pcl::RangeImage::RangeImage | ( | ) |
Constructor.
Referenced by getNew().
|
virtualdefault |
Destructor.
Query the asin lookup table.
Definition at line 53 of file range_image.hpp.
References asin_lookup_table, lookup_table_size, and pcl_lrintf.
Referenced by getImagePoint(), and pcl::RangeImageSpherical::getImagePoint().
Query the std::atan2 lookup table.
Definition at line 63 of file range_image.hpp.
References atan_lookup_table, lookup_table_size, M_PI, and pcl_lrintf.
Referenced by getImagePoint(), and pcl::RangeImageSpherical::getImagePoint().
|
inline |
Calculate the 3D point according to the given image point and the range value at the closest pixel.
Definition at line 577 of file range_image.hpp.
References calculate3DPoint(), and getPoint().
|
inlinevirtual |
Calculate the 3D point according to the given image point and range.
Reimplemented in pcl::RangeImagePlanar, pcl::RangeImageSpherical, pcl::RangeImageSpherical, and pcl::RangeImagePlanar.
Definition at line 564 of file range_image.hpp.
References getAnglesFromImagePoint(), and to_world_system_.
|
inline |
Calculate the 3D point according to the given image point and range.
Definition at line 585 of file range_image.hpp.
References calculate3DPoint(), and pcl::_PointWithRange::range.
Referenced by calculate3DPoint(), calculate3DPoint(), and calculate3DPoint().
|
inline |
Calculate the 3D point according to the given image point and the range value at the closest pixel.
Definition at line 594 of file range_image.hpp.
References calculate3DPoint(), and getPoint().
PCL_EXPORTS void pcl::RangeImage::change3dPointsToLocalCoordinateFrame | ( | ) |
This function sets the sensor pose to 0 and transforms all point positions to this local coordinate frame.
|
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 394 of file range_image.hpp.
References getImagePoint(), getPoint(), isInImage(), and unobserved_point.
|
virtual |
Copy other to *this.
Necessary for use in virtual functions that need to copy derived RangeImage classes (like RangeImagePlanar)
Reimplemented in pcl::RangeImagePlanar.
Query the cos lookup table.
Definition at line 89 of file range_image.hpp.
References cos_lookup_table, lookup_table_size, M_PI, and pcl_lrintf.
Referenced by getImagePointFromAngles().
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)
[in] | angular_resolution | the angle (in radians) between each sample in the depth image |
[in] | sensor_pose | an affine matrix defining the pose of the sensor (defaults to Eigen::Affine3f::Identity () ) |
[in] | coordinate_frame | the coordinate frame (defaults to CAMERA_FRAME) |
[in] | angle_width | an angle (in radians) defining the horizontal bounds of the sensor (defaults to 2*pi (360deg)) |
[in] | angle_height | an angle (in radians) defining the vertical bounds of the sensor (defaults to pi (180deg)) |
void pcl::RangeImage::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)
angular_resolution_x | the angular difference (in radians) between the individual pixels in the image in the x-direction | |
angular_resolution_y | the angular difference (in radians) between the individual pixels in the image in the y-direction | |
[in] | sensor_pose | an affine matrix defining the pose of the sensor (defaults to Eigen::Affine3f::Identity () ) |
[in] | coordinate_frame | the coordinate frame (defaults to CAMERA_FRAME) |
[in] | angle_width | an angle (in radians) defining the horizontal bounds of the sensor (defaults to 2*pi (360deg)) |
[in] | angle_height | an angle (in radians) defining the vertical bounds of the sensor (defaults to pi (180deg)) |
void pcl::RangeImage::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 (), | ||
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.
point_cloud | the input point cloud |
angular_resolution | the angular difference (in radians) between the individual pixels in the image |
max_angle_width | an angle (in radians) defining the horizontal bounds of the sensor |
max_angle_height | an angle (in radians) defining the vertical bounds of the sensor |
sensor_pose | an affine matrix defining the pose of the sensor (defaults to Eigen::Affine3f::Identity () ) |
coordinate_frame | the 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_range | the minimum visible range (defaults to 0) |
border_size | the border size (defaults to 0) |
Definition at line 97 of file range_image.hpp.
References createFromPointCloud().
Referenced by createFromPointCloud(), createFromPointCloudWithKnownSize(), and createFromPointCloudWithViewpoints().
void pcl::RangeImage::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 (), | ||
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.
point_cloud | the input point cloud |
angular_resolution_x | the angular difference (in radians) between the individual pixels in the image in the x-direction |
angular_resolution_y | the angular difference (in radians) between the individual pixels in the image in the y-direction |
max_angle_width | an angle (in radians) defining the horizontal bounds of the sensor |
max_angle_height | an angle (in radians) defining the vertical bounds of the sensor |
sensor_pose | an affine matrix defining the pose of the sensor (defaults to Eigen::Affine3f::Identity () ) |
coordinate_frame | the 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_range | the minimum visible range (defaults to 0) |
border_size | the border size (defaults to 0) |
Definition at line 108 of file range_image.hpp.
References angular_resolution_x_reciprocal_, angular_resolution_y_reciprocal_, cropImage(), pcl::deg2rad(), doZBuffer(), getCoordinateFrameTransformation(), pcl::PointCloud< PointWithRange >::height, image_offset_x_, image_offset_y_, pcl::PointCloud< PointWithRange >::is_dense, pcl_lrint, pcl::PointCloud< PointWithRange >::points, recalculate3DPointPositions(), setAngularResolution(), pcl::PointCloud< PointWithRange >::size(), to_range_image_system_, to_world_system_, unobserved_point, and pcl::PointCloud< PointWithRange >::width.
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.
point_cloud | the input point cloud |
angular_resolution | the angle (in radians) between each sample in the depth image |
point_cloud_center | the center of bounding sphere |
point_cloud_radius | the radius of the bounding sphere |
sensor_pose | an affine matrix defining the pose of the sensor (defaults to Eigen::Affine3f::Identity () ) |
coordinate_frame | the 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_range | the minimum visible range (defaults to 0) |
border_size | the border size (defaults to 0) |
Definition at line 145 of file range_image.hpp.
References createFromPointCloudWithKnownSize().
Referenced by createFromPointCloudWithKnownSize().
void pcl::RangeImage::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 (), | ||
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.
point_cloud | the input point cloud |
angular_resolution_x | the angular difference (in radians) between the individual pixels in the image in the x-direction |
angular_resolution_y | the angular difference (in radians) between the individual pixels in the image in the y-direction |
point_cloud_center | the center of bounding sphere |
point_cloud_radius | the radius of the bounding sphere |
sensor_pose | an affine matrix defining the pose of the sensor (defaults to Eigen::Affine3f::Identity () ) |
coordinate_frame | the 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_range | the minimum visible range (defaults to 0) |
border_size | the border size (defaults to 0) |
Definition at line 156 of file range_image.hpp.
References angular_resolution_x_reciprocal_, angular_resolution_y_reciprocal_, createFromPointCloud(), cropImage(), pcl::deg2rad(), doZBuffer(), getCoordinateFrameTransformation(), getImagePoint(), getMaxAngleSize(), pcl::PointCloud< PointWithRange >::height, image_offset_x_, image_offset_y_, pcl::PointCloud< PointWithRange >::is_dense, pcl_lrint, pcl::PointCloud< PointWithRange >::points, recalculate3DPointPositions(), setAngularResolution(), to_range_image_system_, to_world_system_, unobserved_point, and pcl::PointCloud< PointWithRange >::width.
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)).
point_cloud | the input point cloud |
angular_resolution | the angle (in radians) between each sample in the depth image |
max_angle_width | an angle (in radians) defining the horizontal bounds of the sensor |
max_angle_height | an angle (in radians) defining the vertical bounds of the sensor |
coordinate_frame | the 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_range | the minimum visible range (defaults to 0) |
border_size | the border size (defaults to 0) |
Definition at line 206 of file range_image.hpp.
References createFromPointCloudWithViewpoints().
Referenced by createFromPointCloudWithViewpoints().
void pcl::RangeImage::createFromPointCloudWithViewpoints | ( | const PointCloudTypeWithViewpoints & | point_cloud, |
float | angular_resolution_x, | ||
float | angular_resolution_y, | ||
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)).
point_cloud | the input point cloud |
angular_resolution_x | the angular difference (in radians) between the individual pixels in the image in the x-direction |
angular_resolution_y | the angular difference (in radians) between the individual pixels in the image in the y-direction |
max_angle_width | an angle (in radians) defining the horizontal bounds of the sensor |
max_angle_height | an angle (in radians) defining the vertical bounds of the sensor |
coordinate_frame | the 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_range | the minimum visible range (defaults to 0) |
border_size | the border size (defaults to 0) |
Definition at line 219 of file range_image.hpp.
References createFromPointCloud(), and getAverageViewPoint().
Create lookup tables for trigonometric functions.
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.
border_size | allows increase from the minimal size by the specified number of pixels (defaults to 0) |
top | if positive, this value overrides the position of the top edge (defaults to -1) |
right | if positive, this value overrides the position of the right edge (defaults to -1) |
bottom | if positive, this value overrides the position of the bottom edge (defaults to -1) |
left | if positive, this value overrides the position of the left edge (defaults to -1) |
Referenced by createFromPointCloud(), and createFromPointCloudWithKnownSize().
void pcl::RangeImage::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.
point_cloud | the input point cloud |
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_range | the minimum visible range |
top | returns the minimum y pixel position in the image where a point was added |
right | returns the maximum x pixel position in the image where a point was added |
bottom | returns the maximum y pixel position in the image where a point was added |
left | returns the minimum x pixel position in the image where a point was added |
Definition at line 233 of file range_image.hpp.
References ERASE_ARRAY, getImagePoint(), pcl::PointCloud< PointWithRange >::height, pcl::isFinite(), isInImage(), pcl_lrint, pcl::PointCloud< PointWithRange >::points, real2DToInt2D(), pcl::PointCloud< PointWithRange >::size(), and pcl::PointCloud< PointWithRange >::width.
Referenced by createFromPointCloud(), pcl::RangeImagePlanar::createFromPointCloudWithFixedSize(), and createFromPointCloudWithKnownSize().
|
static |
Check if the provided data includes far ranges and add them to far_ranges.
point_cloud_data | a PCLPointCloud2 message containing the input cloud |
far_ranges | the resulting cloud containing those points with far ranges |
|
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 802 of file range_image.hpp.
References getPoint(), getPointNoCheck(), isValid(), pcl::_PointWithRange::range, and unobserved_point.
|
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 652 of file range_image.hpp.
References getImpactAngle(), and M_PI.
Referenced by getAcutenessValue().
Same as above.
Definition at line 667 of file range_image.hpp.
References getAcutenessValue(), getPoint(), and isInImage().
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.
|
inline |
Get the angles corresponding to the given image point.
Definition at line 602 of file range_image.hpp.
References angular_resolution_x_, angular_resolution_y_, image_offset_x_, image_offset_y_, and M_PI.
Referenced by calculate3DPoint().
|
inline |
Getter for the angular resolution of the range image in x direction in radians per pixel.
Provided for downwards compatibility
Definition at line 352 of file range_image.h.
References angular_resolution_x_.
|
inline |
Getter for the angular resolution of the range image in x and y direction (in radians).
Definition at line 1214 of file range_image.hpp.
References angular_resolution_x_, and angular_resolution_y_.
|
inline |
Getter for the angular resolution of the range image in x direction in radians per pixel.
Definition at line 356 of file range_image.h.
References angular_resolution_x_.
Referenced by pcl::operator<<().
|
inline |
Getter for the angular resolution of the range image in y direction in radians per pixel.
Definition at line 360 of file range_image.h.
References angular_resolution_y_.
Referenced by pcl::operator<<().
|
inline |
Doing the above for some steps in the given direction and averaging.
Definition at line 857 of file range_image.hpp.
References getEuclideanDistanceSquared().
|
static |
Get the average viewpoint of a point cloud where each point carries viewpoint information as vp_x, vp_y, vp_z.
point_cloud | the input point cloud |
Definition at line 1126 of file range_image.hpp.
Referenced by createFromPointCloudWithViewpoints().
|
virtual |
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 |
Get the transformation that transforms the given coordinate frame into CAMERA_FRAME.
coordinate_frame | the input coordinate frame |
transformation | the resulting transformation that warps coordinate_frame into CAMERA_FRAME |
Referenced by createFromPointCloud(), pcl::RangeImagePlanar::createFromPointCloudWithFixedSize(), and createFromPointCloudWithKnownSize().
Calculates the curvature in a point using pca.
Definition at line 1101 of file range_image.hpp.
References getPoint(), isInImage(), and pcl::_PointWithRange::range.
|
inlinestatic |
Get Eigen::Vector3f from PointWithRange.
point | the input point |
Definition at line 795 of file range_image.hpp.
Referenced by getImpactAngleBasedOnLocalNormal().
Get the squared euclidean distance between the two image points.
Returns -INFINITY if one of the points was not observed
Definition at line 842 of file range_image.hpp.
References getPoint(), isObserved(), pcl::_PointWithRange::range, and pcl::squaredEuclideanDistance().
Referenced by getAverageEuclideanDistance().
|
virtual |
Get a range image with half the resolution.
Reimplemented in pcl::RangeImagePlanar.
|
inline |
Getter for image_offset_x_.
Definition at line 630 of file range_image.h.
References image_offset_x_.
|
inline |
Getter for image_offset_y_.
Definition at line 633 of file range_image.h.
References image_offset_y_.
|
inlinevirtual |
Get imagePoint from 3D point in world coordinates.
Reimplemented in pcl::RangeImagePlanar, pcl::RangeImageSpherical, pcl::RangeImageSpherical, and pcl::RangeImagePlanar.
Definition at line 355 of file range_image.hpp.
References asinLookUp(), atan2LookUp(), getImagePointFromAngles(), and to_range_image_system_.
Referenced by checkPoint(), createFromPointCloudWithKnownSize(), doZBuffer(), getImagePoint(), getImagePoint(), getImagePoint(), getImagePoint(), getImagePoint(), getImagePoint(), getRangeDifference(), and integrateFarRanges().
|
inline |
Same as above.
Definition at line 385 of file range_image.hpp.
References getImagePoint(), and real2DToInt2D().
|
inline |
Same as above.
Definition at line 369 of file range_image.hpp.
References getImagePoint(), and real2DToInt2D().
|
inline |
Same as above.
Definition at line 346 of file range_image.hpp.
References getImagePoint(), and real2DToInt2D().
|
inline |
Get the image point corresponding to the given angles.
Definition at line 427 of file range_image.hpp.
References angular_resolution_x_reciprocal_, angular_resolution_y_reciprocal_, cosLookUp(), image_offset_x_, image_offset_y_, and M_PI.
Referenced by getImagePoint().
|
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 620 of file range_image.hpp.
References M_PI, pcl::_PointWithRange::range, and pcl::squaredEuclideanDistance().
Referenced by getAcutenessValue(), and getImpactAngle().
Same as above.
Definition at line 611 of file range_image.hpp.
References getImpactAngle(), getPoint(), and isInImage().
Extract a local normal (with a heuristic not to include background points) and calculate the impact angle based on this.
Definition at line 884 of file range_image.hpp.
References pcl::deg2rad(), getEigenVector3f(), getNormalForClosestNeighbors(), getPoint(), getSensorPos(), and isValid().
Referenced by getNormalBasedAcutenessValue().
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.
|
inlinestatic |
Get the size of a certain area when seen from the given pose.
viewer_pose | an affine matrix defining the pose of the viewer |
center | the center of the area |
radius | the radius of the area |
Definition at line 788 of file range_image.hpp.
Referenced by createFromPointCloudWithKnownSize().
Find the minimum and maximum range in the image.
|
inlinevirtual |
Return a newly created Range image.
Can be reimplemented in derived classes like RangeImagePlanar to return an image of the same type.
Reimplemented in pcl::RangeImageSpherical, and pcl::RangeImagePlanar.
Definition at line 749 of file range_image.h.
References RangeImage().
|
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 899 of file range_image.hpp.
References getPoint(), getSensorPos(), isInImage(), and pcl::_PointWithRange::range.
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 925 of file range_image.hpp.
References getImpactAngleBasedOnLocalNormal(), and M_PI.
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.
|
inline |
Same as above, using default values.
Definition at line 945 of file range_image.hpp.
References getNormalForClosestNeighbors(), getPoint(), and isValid().
|
inline |
Same as above, but only the no_of_nearest_neighbors points closest to the given point are considered.
Definition at line 937 of file range_image.hpp.
References getNormalForClosestNeighbors().
Referenced by getImpactAngleBasedOnLocalNormal(), getNormalForClosestNeighbors(), and getNormalForClosestNeighbors().
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)
|
inline |
Non-const-version of the above.
Definition at line 526 of file range_image.hpp.
References getPoint(), and real2DToInt2D().
|
inline |
Return the 3d point with range at the given image position.
Definition at line 517 of file range_image.hpp.
References getPoint(), and real2DToInt2D().
|
inline |
Non-const-version of getPoint.
Definition at line 502 of file range_image.hpp.
References pcl::PointCloud< PointWithRange >::points, and pcl::PointCloud< PointWithRange >::width.
|
inline |
Return the 3D point with range at the given image position.
image_x | the x coordinate |
image_y | the y coordinate |
Definition at line 479 of file range_image.hpp.
References isInImage(), pcl::PointCloud< PointWithRange >::points, unobserved_point, and pcl::PointCloud< PointWithRange >::width.
Referenced by calculate3DPoint(), calculate3DPoint(), checkPoint(), get1dPointAverage(), getAcutenessValue(), getCurvature(), getEigenVector3f(), getEigenVector3f(), getEuclideanDistanceSquared(), pcl::RangeImagePlanar::getImagePoint(), pcl::RangeImagePlanar::getImagePoint(), getImpactAngle(), getImpactAngleBasedOnLocalNormal(), getNormal(), getNormalForClosestNeighbors(), getPoint(), getPoint(), getPoint(), getPoint(), getRangeDifference(), getSquaredDistanceOfNthNeighbor(), getSurfaceAngleChange(), getSurfaceInformation(), getViewingDirection(), integrateFarRanges(), and isValid().
|
inline |
Return the 3d point with range at the given index (whereas index=y*width+x)
Definition at line 510 of file range_image.hpp.
References pcl::PointCloud< PointWithRange >::points.
|
inline |
Non-const-version of getPointNoCheck.
Definition at line 495 of file range_image.hpp.
References pcl::PointCloud< PointWithRange >::points, and pcl::PointCloud< PointWithRange >::width.
|
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!
image_x | the x coordinate |
image_y | the y coordinate |
Definition at line 488 of file range_image.hpp.
References pcl::PointCloud< PointWithRange >::points, and pcl::PointCloud< PointWithRange >::width.
Referenced by get1dPointAverage(), and getSquaredDistanceOfNthNeighbor().
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 408 of file range_image.hpp.
References getImagePoint(), getPoint(), and isInImage().
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.
PCL_EXPORTS float * pcl::RangeImage::getRangesArray | ( | ) | const |
Get all the range values in one float array of size width*height.
|
inline |
Same as above, but only returning the rotation.
Definition at line 1180 of file range_image.hpp.
References getSensorPos(), and pcl::getTransformationFromTwoUnitVectors().
|
inline |
Get the sensor position.
Definition at line 676 of file range_image.hpp.
References to_world_system_.
Referenced by getImpactAngleBasedOnLocalNormal(), getNormal(), getRotationToViewerCoordinateFrame(), getSurfaceInformation(), getTransformationToViewerCoordinateFrame(), getViewingDirection(), and getViewingDirection().
|
inline |
Definition at line 1052 of file range_image.hpp.
References getPoint(), getPointNoCheck(), isValid(), pcl::_PointWithRange::range, and pcl::squaredEuclideanDistance().
|
virtual |
Get a sub part of the complete image as a new range image.
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.
|
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 683 of file range_image.hpp.
References getPoint(), getTransformationToViewerCoordinateFrame(), isMaxRange(), isObserved(), and isValid().
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.
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.
|
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 965 of file range_image.hpp.
References getPoint(), getSensorPos(), isValid(), and pcl::squaredEuclideanDistance().
Referenced by getNormalForClosestNeighbors().
|
inline |
Getter for the transformation from the world system into the range image system (the sensor coordinate frame)
Definition at line 337 of file range_image.h.
References to_range_image_system_.
|
inline |
Get the local coordinate frame with 0,0,0 in point, upright and Z as the viewing direction.
Definition at line 1163 of file range_image.hpp.
References getTransformationToViewerCoordinateFrame().
Referenced by getSurfaceAngleChange(), and getTransformationToViewerCoordinateFrame().
|
inline |
Same as above, using a reference for the retrurn value.
Definition at line 1172 of file range_image.hpp.
References getSensorPos(), and pcl::getTransformationFromTwoUnitVectorsAndOrigin().
|
inline |
Getter for the transformation from the range image system (the sensor coordinate frame) into the world system.
Definition at line 347 of file range_image.h.
References to_world_system_.
|
inline |
Get the viewing direction for the given point.
Definition at line 1156 of file range_image.hpp.
References getSensorPos().
|
inline |
Get the viewing direction for the given point.
Definition at line 1146 of file range_image.hpp.
References getPoint(), getSensorPos(), and isValid().
void pcl::RangeImage::integrateFarRanges | ( | const PointCloudType & | far_ranges | ) |
Integrates the given far range measurements into the range image.
Definition at line 1222 of file range_image.hpp.
References getImagePoint(), getPoint(), isInImage(), and pcl_lrint.
Check if a point is inside of the image.
Definition at line 443 of file range_image.hpp.
Referenced by checkPoint(), doZBuffer(), getAcutenessValue(), getCurvature(), pcl::RangeImagePlanar::getImagePoint(), getImpactAngle(), getNormal(), getPoint(), getRangeDifference(), integrateFarRanges(), and isValid().
Check if a point is a max range (range=INFINITY) - please check isInImage or isObserved first!
Definition at line 471 of file range_image.hpp.
Referenced by getSurfaceAngleChange().
Check if a point is inside of the image and has either a finite range or a max reading (range=INFINITY)
Definition at line 464 of file range_image.hpp.
Referenced by getEuclideanDistanceSquared(), and getSurfaceAngleChange().
Check if a point has a finite range.
Definition at line 457 of file range_image.hpp.
Check if a point is inside of the image and has a finite range.
Definition at line 450 of file range_image.hpp.
References getPoint(), and isInImage().
Referenced by get1dPointAverage(), getImpactAngleBasedOnLocalNormal(), getNormalForClosestNeighbors(), getSquaredDistanceOfNthNeighbor(), getSurfaceAngleChange(), getSurfaceInformation(), and getViewingDirection().
|
inline |
Get a boost shared pointer of a copy of this.
Definition at line 124 of file range_image.h.
Transforms an image point in float values to an image point in int values.
Definition at line 435 of file range_image.hpp.
Referenced by doZBuffer(), getImagePoint(), getImagePoint(), getImagePoint(), getPoint(), and getPoint().
PCL_EXPORTS void pcl::RangeImage::recalculate3DPointPositions | ( | ) |
Recalculate all 3D point positions according to their pixel position and range.
Referenced by createFromPointCloud(), pcl::RangeImagePlanar::createFromPointCloudWithFixedSize(), and createFromPointCloudWithKnownSize().
PCL_EXPORTS void pcl::RangeImage::reset | ( | ) |
Reset all values to an empty range image.
Set the angular resolution of the range image.
angular_resolution | the new angular resolution in x and y direction (in radians per pixel) |
Definition at line 1188 of file range_image.hpp.
References angular_resolution_x_, angular_resolution_x_reciprocal_, angular_resolution_y_, and angular_resolution_y_reciprocal_.
Referenced by createFromPointCloud(), and createFromPointCloudWithKnownSize().
|
inline |
Set the angular resolution of the range image.
angular_resolution_x | the new angular resolution in x direction (in radians per pixel) |
angular_resolution_y | the new angular resolution in y direction (in radians per pixel) |
Definition at line 1196 of file range_image.hpp.
References angular_resolution_x_, angular_resolution_x_reciprocal_, angular_resolution_y_, and angular_resolution_y_reciprocal_.
Setter for image offsets.
Definition at line 637 of file range_image.h.
References image_offset_x_, and image_offset_y_.
|
inline |
Setter for the transformation from the range image system (the sensor coordinate frame) into the world system.
Definition at line 1206 of file range_image.hpp.
References to_range_image_system_, and to_world_system_.
PCL_EXPORTS void pcl::RangeImage::setUnseenToMaxRange | ( | ) |
Sets all -INFINITY values to INFINITY.
|
protected |
Angular resolution of the range image in x direction in radians per pixel.
Definition at line 770 of file range_image.h.
Referenced by getAnglesFromImagePoint(), pcl::RangeImageSpherical::getAnglesFromImagePoint(), getAngularResolution(), getAngularResolution(), getAngularResolutionX(), setAngularResolution(), and setAngularResolution().
|
protected |
1.0/angular_resolution_x_ - provided for better performance of multiplication compared to division
Definition at line 772 of file range_image.h.
Referenced by createFromPointCloud(), createFromPointCloudWithKnownSize(), getImagePointFromAngles(), pcl::RangeImageSpherical::getImagePointFromAngles(), setAngularResolution(), and setAngularResolution().
|
protected |
Angular resolution of the range image in y direction in radians per pixel.
Definition at line 771 of file range_image.h.
Referenced by getAnglesFromImagePoint(), pcl::RangeImageSpherical::getAnglesFromImagePoint(), getAngularResolution(), getAngularResolutionY(), setAngularResolution(), and setAngularResolution().
|
protected |
1.0/angular_resolution_y_ - provided for better performance of multiplication compared to division
Definition at line 774 of file range_image.h.
Referenced by createFromPointCloud(), createFromPointCloudWithKnownSize(), getImagePointFromAngles(), pcl::RangeImageSpherical::getImagePointFromAngles(), setAngularResolution(), and setAngularResolution().
|
staticprotected |
Definition at line 786 of file range_image.h.
Referenced by asinLookUp().
|
staticprotected |
Definition at line 787 of file range_image.h.
Referenced by atan2LookUp().
|
staticprotected |
Definition at line 788 of file range_image.h.
Referenced by cosLookUp().
|
static |
|
protected |
Definition at line 776 of file range_image.h.
Referenced by pcl::RangeImagePlanar::calculate3DPoint(), createFromPointCloud(), createFromPointCloudWithKnownSize(), getAnglesFromImagePoint(), pcl::RangeImageSpherical::getAnglesFromImagePoint(), getImageOffsetX(), pcl::RangeImagePlanar::getImagePoint(), getImagePointFromAngles(), pcl::RangeImageSpherical::getImagePointFromAngles(), and setImageOffsets().
|
protected |
Position of the top left corner of the range image compared to an image of full size (360x180 degrees)
Definition at line 776 of file range_image.h.
Referenced by pcl::RangeImagePlanar::calculate3DPoint(), createFromPointCloud(), createFromPointCloudWithKnownSize(), getAnglesFromImagePoint(), pcl::RangeImageSpherical::getAnglesFromImagePoint(), getImageOffsetY(), pcl::RangeImagePlanar::getImagePoint(), getImagePointFromAngles(), pcl::RangeImageSpherical::getImagePointFromAngles(), and setImageOffsets().
Definition at line 785 of file range_image.h.
Referenced by asinLookUp(), atan2LookUp(), and cosLookUp().
|
static |
The maximum number of openmp threads that can be used in this class.
Definition at line 78 of file range_image.h.
|
protected |
Inverse of to_world_system_.
Definition at line 768 of file range_image.h.
Referenced by createFromPointCloud(), pcl::RangeImagePlanar::createFromPointCloudWithFixedSize(), createFromPointCloudWithKnownSize(), getImagePoint(), pcl::RangeImageSpherical::getImagePoint(), pcl::RangeImagePlanar::getImagePoint(), getTransformationToRangeImageSystem(), and setTransformationToRangeImageSystem().
|
protected |
Inverse of to_range_image_system_.
Definition at line 769 of file range_image.h.
Referenced by calculate3DPoint(), pcl::RangeImageSpherical::calculate3DPoint(), pcl::RangeImagePlanar::calculate3DPoint(), createFromPointCloud(), pcl::RangeImagePlanar::createFromPointCloudWithFixedSize(), createFromPointCloudWithKnownSize(), getSensorPos(), getTransformationToWorldSystem(), and setTransformationToRangeImageSystem().
|
protected |
This point is used to be able to return a reference to a non-existing point.
Definition at line 778 of file range_image.h.
Referenced by checkPoint(), createFromPointCloud(), pcl::RangeImagePlanar::createFromPointCloudWithFixedSize(), createFromPointCloudWithKnownSize(), get1dPointAverage(), and getPoint().