libvisiontransfer  4.1.5
reconstruct3d.h
1 /*******************************************************************************
2  * Copyright (c) 2017 Nerian Vision Technologies
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *******************************************************************************/
14 
15 #ifndef VISIONTRANSFER_RECONSTRUCT3D_H
16 #define VISIONTRANSFER_RECONSTRUCT3D_H
17 
18 #include <limits>
19 #include "visiontransfer/common.h"
20 #include "visiontransfer/imagepair.h"
21 
28 class VT_EXPORT Reconstruct3D {
29 public:
33  Reconstruct3D();
34 
35  ~Reconstruct3D();
36 
65  float* createPointMap(const unsigned short* dispMap, int width, int height,
66  int rowStride, const float* q, unsigned short minDisparity = 1);
67 
80  float* createPointMap(const ImagePair& imagePair, unsigned short minDisparity = 1);
81 
105  void writePlyFile(const char* file, const unsigned short* dispMap,
106  const unsigned char* image, int width, int height,
107  int dispRowStride, int imageRowStride, const float* q,
108  double maxZ = std::numeric_limits<double>::max());
109 
123  void writePlyFile(const char* file, const ImagePair& imagePair,
124  double maxZ = std::numeric_limits<double>::max());
125 
126 private:
127  // We follow the pimpl idiom
128  class Pimpl;
129  Pimpl* pimpl;
130 
131  // This class cannot be copied
132  Reconstruct3D(const Reconstruct3D& other);
133  Reconstruct3D& operator=(const Reconstruct3D&);
134 };
135 
136 #endif
Transforms a disparity map into a set of 3D points.
Definition: reconstruct3d.h:28
A set of two images, which are usually the left camera image and the disparity map.
Definition: imagepair.h:30
Nerian Vision Technologies