36 #include <pcl/pcl_macros.h> 37 #include <pcl/common/eigen.h> 46 float angle_x, angle_y;
49 float cosY = cosf (angle_y);
50 point = Eigen::Vector3f (range * sinf (angle_x) * cosY, range * sinf (angle_y), range * cosf (angle_x)*cosY);
59 range = transformedPoint.norm ();
60 float angle_x =
atan2LookUp (transformedPoint[0], transformedPoint[2]),
61 angle_y =
asinLookUp (transformedPoint[1]/range);
float angular_resolution_x_
Angular resolution of the range image in x direction in radians per pixel.
This file defines compatibility wrappers for low level I/O functions.
int image_offset_y_
Position of the top left corner of the range image compared to an image of full size (360x180 degrees...
void getAnglesFromImagePoint(float image_x, float image_y, float &angle_x, float &angle_y) const
Get the angles corresponding to the given image point.
static float atan2LookUp(float y, float x)
Query the atan2 lookup table.
void getImagePointFromAngles(float angle_x, float angle_y, float &image_x, float &image_y) const
Get the image point corresponding to the given ranges.
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.
float angular_resolution_y_reciprocal_
1.0/angular_resolution_y_ - provided for better performance of multiplication compared to division ...
float angular_resolution_x_reciprocal_
1.0/angular_resolution_x_ - provided for better performance of multiplication compared to division ...
Eigen::Affine3f to_range_image_system_
Inverse of to_world_system_.
Eigen::Affine3f to_world_system_
Inverse of to_range_image_system_.
virtual void getImagePoint(const Eigen::Vector3f &point, float &image_x, float &image_y, float &range) const
Calculate the image point and range from the given 3D point.
static float asinLookUp(float value)
Query the asin lookup table.
float angular_resolution_y_
Angular resolution of the range image in y direction in radians per pixel.