40 #ifndef PCL_SURFACE_TEXTURE_MAPPING_H_
41 #define PCL_SURFACE_TEXTURE_MAPPING_H_
43 #include <pcl/surface/reconstruction.h>
44 #include <pcl/common/transforms.h>
45 #include <pcl/TextureMesh.h>
50 namespace texture_mapping
63 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
75 typedef std::vector<Camera, Eigen::aligned_allocator<Camera> >
CameraVector;
83 template<
typename Po
intInT>
88 typedef boost::shared_ptr< PointInT >
Ptr;
89 typedef boost::shared_ptr< const PointInT >
ConstPtr;
188 double sizeX = cam.
width;
189 double sizeY = cam.
height;
190 double cx = (sizeX) / 2.0;
191 double cy = (sizeY) / 2.0;
197 UV_coordinates[0] =
static_cast<float> ((focal_x * (pt.x / pt.z) + cx) / sizeX);
198 UV_coordinates[1] = 1.0f -
static_cast<float> (((focal_y * (pt.y / pt.z) + cy) / sizeY));
201 if (UV_coordinates[0] >= 0.0 && UV_coordinates[0] <= 1.0 && UV_coordinates[1] >= 0.0 && UV_coordinates[1]
207 UV_coordinates[0] = -1.0;
208 UV_coordinates[1] = -1.0;
229 PointCloudPtr &filtered_cloud,
const double octree_voxel_size,
230 std::vector<int> &visible_indices, std::vector<int> &occluded_indices);
262 const double octree_voxel_size,
PointCloud &visible_pts);
277 const double octree_voxel_size,
278 const bool show_nb_occlusions =
true,
279 const int max_occlusions = 4);
294 double octree_voxel_size,
295 bool show_nb_occlusions =
true,
296 int max_occlusions = 4);
326 std::vector<Eigen::Vector2f>
327 mapTexture2Face (
const Eigen::Vector3f &p1,
const Eigen::Vector3f &p2,
const Eigen::Vector3f &p3);
390 return (
"TextureMapping");
394 EIGEN_MAKE_ALIGNED_OPERATOR_NEW