3

I am trying to view textures in Point Cloud Library (PCL). I have a texture data file (.obj) and corresponding wavefront meterial file (.mtl) along with 5 images.

When I load this data in Meshlab, the texture is mapped but when I load it in pcl using following code;

pcl::TextureMesh mesh7;
pcl::io::loadOBJFile("textured_mesh.obj", mesh7);
pcl::visualization::PCLVisualizer viewer_pre7("PCL Viewer_pre7");
viewer_pre7.addTextureMesh(mesh7, "texture", 0);
viewer_pre7.spin();

I get following error in vtkOutputWindow. Although I can see the mesh structure but the texture is not mapped.

ERROR: In ..\vtkOpenGLProperty.cxx, line 607 vtkOpenGLProperty (000002420C804BA0): Hardware does not support the number of textures defined.

Mesh without texture in PCL

Mesh without texture in PCL

Same file when loaded in Meshgrid

Same file when loaded in Meshgrid

Where shall I look for solving this error? Is PCL good enough for loading and viewing textures (.obj, .mtl)?

Saleh
  • 647
  • 1
  • 6
  • 20

0 Answers0