41 #include <pcl/common/eigen.h>
42 #include <pcl/range_image/range_image_planar.h>
49 template <
typename Po
intCloudType>
void
51 int di_width,
int di_height,
52 float di_center_x,
float di_center_y,
53 float di_focal_length_x,
float di_focal_length_y,
54 const Eigen::Affine3f& sensor_pose,
81 doZBuffer (point_cloud, noise_level, min_range, top, right, bottom, left);
97 point[2] = range / (std::sqrt (delta_x*delta_x + delta_y*delta_y + 1));
98 point[0] = delta_x*point[2];
99 point[1] = delta_y*point[2];
108 if (transformedPoint[2]<=0)
110 image_x = image_y = range = -1.0f;
113 range = transformedPoint.norm ();
bool is_dense
True if no points are invalid (e.g., have NaN or Inf values in any of their floating point fields).
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).
std::vector< PointWithRange, Eigen::aligned_allocator< PointWithRange > > points
The point data.
PCL_EXPORTS void recalculate3DPointPositions()
Recalculate all 3D point positions according to their pixel position and range.
int image_offset_y_
Position of the top left corner of the range image compared to an image of full size (360x180 degrees...
Eigen::Affine3f to_world_system_
Inverse of to_range_image_system_.
PointWithRange unobserved_point
This point is used to be able to return a reference to a non-existing point.
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.
Eigen::Affine3f to_range_image_system_
Inverse of to_world_system_.
static PCL_EXPORTS void getCoordinateFrameTransformation(RangeImage::CoordinateFrame coordinate_frame, Eigen::Affine3f &transformation)
Get the transformation that transforms the given coordinate frame into CAMERA_FRAME.
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.
float focal_length_x_reciprocal_
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.
float center_y_
The principle point of the image.
float focal_length_y_reciprocal_
1/focal_length -> for internal use
virtual void getImagePoint(const Eigen::Vector3f &point, float &image_x, float &image_y, float &range) const
Get imagePoint from 3D point in world coordinates.
float focal_length_y_
The focal length of the image in pixels.
Defines all the PCL and non-PCL macros used.