OpenCV  4.2.0
Open Source Computer Vision
Public Types | Static Public Member Functions | Public Attributes | List of all members
cv::viz::Mesh Class Reference

This class wraps mesh attributes, and it can load a mesh from a ply file. : More...

#include <opencv2/viz/types.hpp>

Public Types

enum  {
  LOAD_AUTO = 0,
  LOAD_PLY = 1,
  LOAD_OBJ = 2
}
 

Static Public Member Functions

static Mesh load (const String &file, int type=LOAD_PLY)
 Loads a mesh from a ply or a obj file. More...
 

Public Attributes

Mat cloud
 point coordinates of type CV_32FC3 or CV_64FC3 with only 1 row More...
 
Mat colors
 point color of type CV_8UC3 or CV_8UC4 with only 1 row More...
 
Mat normals
 point normals of type CV_32FC3, CV_32FC4, CV_64FC3 or CV_64FC4 with only 1 row More...
 
Mat polygons
 CV_32SC1 with only 1 row. More...
 
Mat tcoords
 CV_32FC2 or CV_64FC2 with only 1 row. More...
 
Mat texture
 

Detailed Description

This class wraps mesh attributes, and it can load a mesh from a ply file. :

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
LOAD_AUTO 
LOAD_PLY 
LOAD_OBJ 

Member Function Documentation

◆ load()

static Mesh cv::viz::Mesh::load ( const String file,
int  type = LOAD_PLY 
)
static

Loads a mesh from a ply or a obj file.

Parameters
fileFile name
typeFile type (for now only PLY and OBJ are supported)

File type** can be one of the following:

  • LOAD_PLY
  • LOAD_OBJ

Member Data Documentation

◆ cloud

Mat cv::viz::Mesh::cloud

point coordinates of type CV_32FC3 or CV_64FC3 with only 1 row

◆ colors

Mat cv::viz::Mesh::colors

point color of type CV_8UC3 or CV_8UC4 with only 1 row

◆ normals

Mat cv::viz::Mesh::normals

point normals of type CV_32FC3, CV_32FC4, CV_64FC3 or CV_64FC4 with only 1 row

◆ polygons

Mat cv::viz::Mesh::polygons

CV_32SC1 with only 1 row.

Raw integer list of the form: (n,id1,id2,...,idn, n,id1,id2,...,idn, ...) where n is the number of points in the polygon, and id is a zero-offset index into an associated cloud.

◆ tcoords

Mat cv::viz::Mesh::tcoords

CV_32FC2 or CV_64FC2 with only 1 row.

◆ texture

Mat cv::viz::Mesh::texture

The documentation for this class was generated from the following file: