35 #ifndef SRC_LIBLVR2_RECONSTRUCTION_MODELTOIMAGE_HPP_ 36 #define SRC_LIBLVR2_RECONSTRUCTION_MODELTOIMAGE_HPP_ 39 #include <opencv2/core.hpp> 79 maxRange(
std::numeric_limits<float>::lowest()),
80 minRange(
std::numeric_limits<float>::max()) {}
87 vector<vector<vector<PanoramaPoint> > >
pixels;
91 maxRange(
std::numeric_limits<float>::lowest()),
92 minRange(
std::numeric_limits<float>::max()) {}
138 int width,
int height,
139 float minZ,
float maxZ,
140 int minHorizontenAngle,
int maxHorizontalAngle,
141 int mainVerticalAngle,
int maxVerticalAngle,
142 bool imageOptimization =
true,
struct lvr2::ModelToImage::DI DepthImage
Image with single depth information.
void getCVMatrix(cv::Mat &image)
float m_maxZ
Maximal z value that will be projected.
void computeDepthListMatrix(DepthListMatrix &mat)
Computes a DepthListMatrix, i.e., an image matrix where each entry holds a vector of all points that ...
ProjectionType
The ProjectionType enum.
Image with list of projected points at each pixel.
virtual ~ModelToImage()
Destructor.
The ModelToImage class provides methods to re-project 3D laser scans to image planes.
struct lvr2::ModelToImage::PLI DepthListMatrix
Image with list of projected points at each pixel.
struct lvr2::ModelToImage::PanoPoint PanoramaPoint
Projection * m_projection
Pointer to projection.
CoordinateSystem m_coordinateSystem
Set this to true if you are using a left-handed coordinate system.
std::shared_ptr< PointBuffer > PointBufferPtr
ModelToImage(PointBufferPtr buffer, ProjectionType projection, int width, int height, float minZ, float maxZ, int minHorizontenAngle, int maxHorizontalAngle, int mainVerticalAngle, int maxVerticalAngle, bool imageOptimization=true, CoordinateSystem system=NATIVE)
Constructor.
int m_maxHAngle
Max horizontal opening angle.
vector< vector< float > > pixels
float m_minZ
Minimal z value that will be projected.
int m_height
Image height.
int m_maxVAngle
Max horizontal opening angle.
void computeDepthImage(DepthImage &img, ProjectionPolicy policy=LAST)
Computes a depth image from the given scan using the specified policy.
int m_minHAngle
Min horizontal opening angle.
void writePGM(string filename, float cutoff)
Writes the scan panaroma to an pgm file.
Pixelcoordinates with depth value.
vector< vector< vector< PanoramaPoint > > > pixels
bool m_optimize
Image optimization flag.
PointBufferPtr m_points
Pointer to the initial point cloud.
int m_minVAngle
Min horizontal opening angle.
Image with single depth information.
PointBufferPtr pointBuffer()
Retruns the point buffer.