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
77 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
89 typedef std::vector<Camera, Eigen::aligned_allocator<Camera> >
CameraVector;
97 template<
typename Po
intInT>
102 typedef boost::shared_ptr< PointInT >
Ptr;
103 typedef boost::shared_ptr< const PointInT >
ConstPtr;
202 double sizeX = cam.
width;
203 double sizeY = cam.
height;
214 double focal_x, focal_y;
225 UV_coordinates[0] =
static_cast<float> ((focal_x * (pt.x / pt.z) + cx) / sizeX);
226 UV_coordinates[1] = 1.0f -
static_cast<float> (((focal_y * (pt.y / pt.z) + cy) / sizeY));
229 if (UV_coordinates[0] >= 0.0 && UV_coordinates[0] <= 1.0 && UV_coordinates[1] >= 0.0 && UV_coordinates[1]
235 UV_coordinates[0] = -1.0;
236 UV_coordinates[1] = -1.0;
257 PointCloudPtr &filtered_cloud,
const double octree_voxel_size,
258 std::vector<int> &visible_indices, std::vector<int> &occluded_indices);
290 const double octree_voxel_size,
PointCloud &visible_pts);
305 const double octree_voxel_size,
306 const bool show_nb_occlusions =
true,
307 const int max_occlusions = 4);
322 double octree_voxel_size,
323 bool show_nb_occlusions =
true,
324 int max_occlusions = 4);
354 std::vector<Eigen::Vector2f>
355 mapTexture2Face (
const Eigen::Vector3f &p1,
const Eigen::Vector3f &p2,
const Eigen::Vector3f &p3);
418 return (
"TextureMapping");
422 EIGEN_MAKE_ALIGNED_OPERATOR_NEW