38 #include <pcl/common/eigen.h>
39 #include <pcl/range_image/range_image_spherical.h>
50 float angle_x, angle_y;
53 float cosY = std::cos (angle_y);
54 point = Eigen::Vector3f (range * sinf (angle_x) * cosY, range * sinf (angle_y), range * std::cos (angle_x)*cosY);
63 range = transformedPoint.norm ();
64 float angle_x =
atan2LookUp (transformedPoint[0], transformedPoint[2]),
65 angle_y =
asinLookUp (transformedPoint[1]/range);
int image_offset_y_
Position of the top left corner of the range image compared to an image of full size (360x180 degrees...
static float atan2LookUp(float y, float x)
Query the std::atan2 lookup table.
Eigen::Affine3f to_world_system_
Inverse of to_range_image_system_.
static float asinLookUp(float value)
Query the asin lookup table.
float angular_resolution_y_reciprocal_
1.0/angular_resolution_y_ - provided for better performance of multiplication compared to division
float angular_resolution_y_
Angular resolution of the range image in y direction in radians per pixel.
float angular_resolution_x_
Angular resolution of the range image in x direction in radians per pixel.
Eigen::Affine3f to_range_image_system_
Inverse of to_world_system_.
float angular_resolution_x_reciprocal_
1.0/angular_resolution_x_ - provided for better performance of multiplication compared to division
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.
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 getAnglesFromImagePoint(float image_x, float image_y, float &angle_x, float &angle_y) const
Get the angles corresponding to the given image point.
void getImagePointFromAngles(float angle_x, float angle_y, float &image_x, float &image_y) const
Get the image point corresponding to the given ranges.
Defines all the PCL and non-PCL macros used.