15 #ifndef VISIONTRANSFER_RECONSTRUCT3D_H 16 #define VISIONTRANSFER_RECONSTRUCT3D_H 20 #include "visiontransfer/common.h" 21 #include "visiontransfer/imageset.h" 59 #ifndef DOXYGEN_SHOULD_SKIP_THIS 84 DEPRECATED(
"Use createPointMap(const ImageSet&, ...) instead.")
85 float* createPointMap(const
unsigned short* dispMap,
int width,
int height,
86 int rowStride, const
float* q,
unsigned short minDisparity = 0,
87 int subpixelFactor = 16,
unsigned short maxDisparity = 0xFFF);
111 float* createPointMap(
const ImageSet& imageSet,
unsigned short minDisparity = 0,
112 unsigned short maxDisparity = 0xFFF);
137 float* createZMap(
const ImageSet& imageSet,
unsigned short minDisparity = 0,
138 unsigned short maxDisparity = 0xFFF);
162 void projectSinglePoint(
int imageX,
int imageY,
unsigned short disparity,
const float* q,
163 float& pointX,
float& pointY,
float& pointZ,
int subpixelFactor = 16);
165 #ifndef DOXYGEN_SHOULD_SKIP_THIS 195 DEPRECATED(
"Use writePlyFile(const char*, const ImageSet&, ...) instead.")
196 void writePlyFile(const
char* file, const
unsigned short* dispMap,
197 const
unsigned char* image,
int width,
int height,
ImageSet::ImageFormat format,
198 int dispRowStride,
int imageRowStride, const
float* q,
199 double maxZ = (
std::numeric_limits<
double>::max)(),
200 bool binary = false,
int subpixelFactor = 16,
unsigned short maxDisparity = 0xFFF);
216 void writePlyFile(
const char* file,
const ImageSet& imageSet,
217 double maxZ = (std::numeric_limits<double>::max)(),
220 unsigned short maxDisparity = 0xFFF);
222 #ifdef PCL_MAJOR_VERSION 238 inline pcl::PointCloud<pcl::PointXYZ>::Ptr createXYZCloud(
const ImageSet& imageSet,
239 const char* frameId,
unsigned short minDisparity = 0);
246 inline pcl::PointCloud<pcl::PointXYZI>::Ptr createXYZICloud(
const ImageSet& imageSet,
247 const char* frameId,
unsigned short minDisparity = 0);
254 inline pcl::PointCloud<pcl::PointXYZRGB>::Ptr createXYZRGBCloud(
const ImageSet& imageSet,
255 const char* frameId,
unsigned short minDisparity = 0);
258 #ifdef OPEN3D_VERSION 276 inline std::shared_ptr<open3d::geometry::PointCloud> createOpen3DCloud(
const ImageSet& imageSet,
277 ColorSource colSource = COLOR_AUTO,
unsigned short minDisparity = 0,
unsigned short maxDisparity = 0xFFF);
292 inline std::shared_ptr<open3d::geometry::RGBDImage> createOpen3DImageRGBD(
const ImageSet& imageSet,
293 ColorSource colSource = COLOR_AUTO,
unsigned short minDisparity = 0);
305 #ifdef PCL_MAJOR_VERSION 307 template <
typename T>
308 typename pcl::PointCloud<T>::Ptr initPointCloud(
const ImageSet& imageSet,
const char* frameId);
318 return ImageSet::IMAGE_LEFT;
321 return ImageSet::IMAGE_LEFT;
322 case COLOR_THIRD_COLOR:
326 return ImageSet::IMAGE_UNDEFINED;
333 #include "visiontransfer/reconstruct3d-pcl.h" 334 #include "visiontransfer/reconstruct3d-open3d.h"
Transforms a disparity map into a set of 3D points.
Copy color data from left camera.
Automatically choose the best color channel.
ColorSource
Source channel selection for color information.
ImageType
Supported image types.
bool hasImageType(ImageType what) const
Returns whether a left camera image is included in the enabled data.
Copy color data from 3rd color camera.
A set of one to three images, but usually two (the left camera image and the disparity map)...
3rd color camera for devices where this is supported