15 #ifndef VISIONTRANSFER_RECONSTRUCT3D_H 16 #define VISIONTRANSFER_RECONSTRUCT3D_H 20 #include "visiontransfer/common.h" 21 #include "visiontransfer/imageset.h" 44 #ifndef DOXYGEN_SHOULD_SKIP_THIS 69 DEPRECATED(
"Use createPointMap(const ImageSet&, ...) instead.")
70 float* createPointMap(
const unsigned short* dispMap,
int width,
int height,
71 int rowStride,
const float* q,
unsigned short minDisparity = 1,
72 int subpixelFactor = 16,
unsigned short maxDisparity = 0xFFF);
94 float* createPointMap(
const ImageSet& imageSet,
unsigned short minDisparity = 1);
119 float* createZMap(
const ImageSet& imageSet,
unsigned short minDisparity = 1,
120 unsigned short maxDisparity = 0xFFF);
144 void projectSinglePoint(
int imageX,
int imageY,
unsigned short disparity,
const float* q,
145 float& pointX,
float& pointY,
float& pointZ,
int subpixelFactor = 16);
147 #ifndef DOXYGEN_SHOULD_SKIP_THIS 177 DEPRECATED(
"Use writePlyFile(const char*, const ImageSet&, ...) instead.")
178 void writePlyFile(
const char* file,
const unsigned short* dispMap,
180 int dispRowStride,
int imageRowStride,
const float* q,
181 double maxZ = std::numeric_limits<double>::max(),
182 bool binary =
false,
int subpixelFactor = 16,
unsigned short maxDisparity = 0xFFF);
195 void writePlyFile(
const char* file,
const ImageSet& imageSet,
196 double maxZ = std::numeric_limits<double>::max(),
bool binary =
false);
198 #ifdef PCL_MAJOR_VERSION 214 inline pcl::PointCloud<pcl::PointXYZ>::Ptr createXYZCloud(
const ImageSet& imageSet,
215 const char* frameId,
unsigned short minDisparity = 0);
222 inline pcl::PointCloud<pcl::PointXYZI>::Ptr createXYZICloud(
const ImageSet& imageSet,
223 const char* frameId,
unsigned short minDisparity = 0);
230 inline pcl::PointCloud<pcl::PointXYZRGB>::Ptr createXYZRGBCloud(
const ImageSet& imageSet,
231 const char* frameId,
unsigned short minDisparity = 0);
234 #ifdef OPEN3D_VERSION 251 inline std::shared_ptr<open3d::geometry::PointCloud> createOpen3DCloud(
const ImageSet& imageSet,
252 bool withColor,
unsigned short minDisparity = 0);
267 inline std::shared_ptr<open3d::geometry::RGBDImage> createOpen3DImageRGBD(
const ImageSet& imageSet,
268 unsigned short minDisparity = 0);
280 #ifdef PCL_MAJOR_VERSION 282 template <
typename T>
283 typename pcl::PointCloud<T>::Ptr initPointCloud(
const ImageSet& imageSet,
const char* frameId);
289 #include "visiontransfer/reconstruct3d-pcl.h" 290 #include "visiontransfer/reconstruct3d-open3d.h"
Transforms a disparity map into a set of 3D points.
ImageFormat
Image formats that can be transferred.
A set of one to three images, but usually two (the left camera image and the disparity map)...