Loading and displaying 3D wavefront (.obj) images

Check the mesh object, if the tcoords and texture are defined. The tcoords should be the U/V coordinates for each vertice and texture should contain the texture image (Model.jpg).

cv::viz::Mesh x;
x = cv::viz::Mesh::load("airboat.obj", cv::viz::Mesh::LOAD_OBJ);
cout<<"We got "<<x.tcords.cols<<" texture UV coordinates"<<endl;
if(x.texture.empty())cout<<"No texture loaded"<<endl;
else imshow("Texture",x.texture);

If they seem OK then the texture is correctly loaded. Otherwise texture is not handled by OpenCV for OBJ objects.

(anyway, as I already said, OpenCV is a computer vision library, not a 3D object viewer - even if it has some extra functions).

Dear Kbarni,
I apologize for the late answer, but I have been busy on other tasks.
The result I got is negative:

ERROR: In /build/vtk/src/VTK-8.2.0/IO/Geometry/vtkOBJReader.cxx, line 341
vtkOBJReader (0x55fac5d6bcc0): Error reading ‘v’ at line 3

We got 0 texture UV coordinates
No texture loaded
terminate called after throwing an instance of ‘cv::Exception’
what(): OpenCV(4.5.1) /build/opencv/src/opencv-4.5.1/modules/core/src/rand.cpp:394: error: (-215:Assertion failed) !_mat.empty() in function ‘fill’

Please note that my purpose is not only the visualization, but mainly the processing of the 3D image

May be you should use pointcloud library
I manage to load mtl and obj file using vtk examples
my source file is here

Many thanks Laurent. I will try.