40 #include <pcl/range_image/range_image.h>
56 using Ptr = shared_ptr<RangeImagePlanar>;
57 using ConstPtr = shared_ptr<const RangeImagePlanar>;
91 float focal_length,
float base_line,
float desired_angular_resolution=-1);
106 setDepthImage (
const float* depth_image,
int di_width,
int di_height,
float di_center_x,
float di_center_y,
107 float di_focal_length_x,
float di_focal_length_y,
float desired_angular_resolution=-1);
122 setDepthImage (
const unsigned short* depth_image,
int di_width,
int di_height,
float di_center_x,
float di_center_y,
123 float di_focal_length_x,
float di_focal_length_y,
float desired_angular_resolution=-1);
138 template <
typename Po
intCloudType>
void
140 int di_width,
int di_height,
float di_center_x,
float di_center_y,
141 float di_focal_length_x,
float di_focal_length_y,
142 const Eigen::Affine3f& sensor_pose,
144 float min_range=0.0f);
158 calculate3DPoint (
float image_x,
float image_y,
float range, Eigen::Vector3f& point)
const override;
168 getImagePoint (
const Eigen::Vector3f& point,
float& image_x,
float& image_y,
float& range)
const override;
184 getSubImage (
int sub_image_image_offset_x,
int sub_image_image_offset_y,
int sub_image_width,
185 int sub_image_height,
int combine_pixels,
RangeImage& sub_image)
const override;
216 #include <pcl/range_image/impl/range_image_planar.hpp>
RangeImage is derived from pcl/PointCloud and provides functionalities with focus on situations where...
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.
shared_ptr< RangeImage > Ptr
virtual void getImagePoint(const Eigen::Vector3f &point, float &image_x, float &image_y, float &range) const
Get imagePoint from 3D point in world coordinates.
shared_ptr< const RangeImage > ConstPtr
PCL_EXPORTS RangeImage()
Constructor.
RangeImagePlanar is derived from the original range image and differs from it because it's not a sphe...
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.
PCL_EXPORTS void getHalfImage(RangeImage &half_image) const override
Get a range image with half the resolution.
Ptr makeShared()
Get a boost shared pointer of a copy of this.
float getCenterX() const
Getter for the principal point in 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.
RangeImage * getNew() const override
Return a newly created RangeImagePlanar.
float focal_length_x_reciprocal_
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.
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 getFocalLengthY() const
Getter for the focal length in Y.
float center_y_
The principle point of the image.
float focal_length_y_reciprocal_
1/focal_length -> for internal use
PCL_EXPORTS void copyTo(RangeImage &other) const override
Copy *this to other.
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.
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 getCenterY() const
Getter for the principal point in Y.
float getFocalLengthX() const
Getter for the focal length in X.
float focal_length_y_
The focal length of the image in pixels.
PCL_EXPORTS RangeImagePlanar()
Constructor.
shared_ptr< RangeImagePlanar > Ptr
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 ~RangeImagePlanar() override
Destructor.