MVE - Multi-View Environment mve-devel
|
Geometric tools, loading and processing functions. More...
Classes | |
struct | ObjModelPart |
struct | SavePLYOptions |
Options struct for saving PLY files. More... | |
Enumerations | |
enum | PLYFaceProperty { PLY_F_VERTEX_INDICES , PLY_F_IGNORE_UINT32 , PLY_F_IGNORE_UINT8 , PLY_F_IGNORE_FLOAT } |
PLY face element properties. More... | |
enum | PLYFormat { PLY_ASCII , PLY_BINARY_LE , PLY_BINARY_BE , PLY_UNKNOWN } |
PLY data encoding formats. More... | |
enum | PLYVertexProperty { PLY_V_FLOAT_X , PLY_V_FLOAT_Y , PLY_V_FLOAT_Z , PLY_V_DOUBLE_X , PLY_V_DOUBLE_Y , PLY_V_DOUBLE_Z , PLY_V_FLOAT_NX , PLY_V_FLOAT_NY , PLY_V_FLOAT_NZ , PLY_V_UINT8_R , PLY_V_UINT8_G , PLY_V_UINT8_B , PLY_V_FLOAT_R , PLY_V_FLOAT_G , PLY_V_FLOAT_B , PLY_V_FLOAT_U , PLY_V_FLOAT_V , PLY_V_FLOAT_CONF , PLY_V_FLOAT_VALUE , PLY_V_IGNORE_FLOAT , PLY_V_IGNORE_DOUBLE , PLY_V_IGNORE_UINT32 , PLY_V_IGNORE_UINT8 } |
PLY vertex element properties. More... | |
Functions | |
void | depthmap_mesh_confidences (TriangleMesh::Ptr mesh, int iterations=3) |
Algorithm to assign per-vertex confidence values to vertices of a triangulated depth map. | |
void | depthmap_mesh_peeling (TriangleMesh::Ptr mesh, int iterations=1) |
Algorithm that peels away triangles at the mesh bounary of a triangulated depth map. | |
TriangleMesh::Ptr | depthmap_triangulate (FloatImage::ConstPtr dm, ByteImage::ConstPtr ci, CameraInfo const &cam, float dd_factor=DD_FACTOR_DEFAULT, mve::Image< unsigned int > *vertex_ids=nullptr) |
A helper function that triangulates the given depth map with optional color image (which generates additional per-vertex colors) and transforms the mesh into the global coordinate system. | |
TriangleMesh::Ptr | depthmap_triangulate (FloatImage::ConstPtr dm, ByteImage::ConstPtr ci, math::Matrix3f const &invproj, float dd_factor=DD_FACTOR_DEFAULT, mve::Image< unsigned int > *vertex_ids=nullptr) |
A helper function that triangulates the given depth map with optional color image (which generates additional per-vertex colors) in local image coordinates. | |
TriangleMesh::Ptr | depthmap_triangulate (FloatImage::ConstPtr dm, math::Matrix3f const &invproj, float dd_factor=DD_FACTOR_DEFAULT, mve::Image< unsigned int > *vids=nullptr) |
Algorithm to triangulate depth maps. | |
bool | dm_is_depth_disc (math::Vec3f const &v1, math::Vec3f const &v2, math::Vec3f const &v3) |
bool | dm_is_depthdisc (float *widths, float *depths, float dd_factor, int i1, int i2) |
void | dm_make_triangle (TriangleMesh *mesh, mve::Image< unsigned int > &vidx, FloatImage const *dm, math::Matrix3f const &invproj, std::size_t i, int *tverts) |
TriangleMesh::Ptr | load_mesh (std::string const &filename) |
Auto-detects filetype from extension and delegates to readers. | |
void | load_mtl_file (std::string const &filename, std::map< std::string, std::string > *result) |
TriangleMesh::Ptr | load_npts_mesh (std::string const &filename, bool format_binary=false) |
Simple importer for Kazhdan's .npts ASCII and binary files. | |
mve::TriangleMesh::Ptr | load_obj_mesh (std::string const &filename) |
Loads a triangle mesh from an OBJ model file. | |
void | load_obj_mesh (std::string const &filename, std::vector< ObjModelPart > *obj_model_parts) |
Loads all groups from an OBJ model file. | |
TriangleMesh::Ptr | load_off_mesh (std::string const &filename) |
Loads a triangle mesh from an OFF model file. | |
FloatImage::Ptr | load_ply_depthmap (std::string const &filename) |
Loads a depth map from a PLY file. | |
TriangleMesh::Ptr | load_ply_mesh (std::string const &filename) |
Loads a triangle mesh from a PLY model file. | |
TriangleMesh::Ptr | load_smf_mesh (std::string const &filename) |
Loads a triangle mesh from a SMF file format. | |
void | load_xf_file (std::string const &filename, float *ctw) |
Load XF file, typically with camera to world transformation. | |
template<typename T > | |
TriangleMesh::Ptr | marching_cubes (T &accessor) |
This function polygonizes a SDF that is partitioned into cubes. | |
template<typename T > | |
TriangleMesh::Ptr | marching_tetrahedra (T &accessor) |
This function polygonizes a SDF that is partitioned into tetrahedrons. | |
void | mesh_components (TriangleMesh::Ptr mesh, std::size_t vertex_threshold) |
Discards isolated components with a vertex count below a threshold. | |
std::size_t | mesh_delete_unreferenced (TriangleMesh::Ptr mesh) |
Cleans unreferenced vertices from the mesh. | |
void | mesh_find_aabb (TriangleMesh::ConstPtr mesh, math::Vec3f &aabb_min, math::Vec3f &aabb_max) |
Calculates the mesh axis-aligned bounding box (AABB). | |
void | mesh_invert_faces (TriangleMesh::Ptr mesh) |
Inverts the orientation of all faces in the mesh. | |
void | mesh_merge (TriangleMesh::ConstPtr mesh1, TriangleMesh::Ptr mesh2) |
Merges the first given mesh with the second one, modifying the second one. | |
void | mesh_scale_and_center (TriangleMesh::Ptr mesh, bool scale=true, bool center=true) |
Scales the mesh such that it fits into a cube with length 1 and centers the mesh in the coordinate origin. | |
void | mesh_transform (TriangleMesh::Ptr mesh, math::Matrix3f const &rot) |
Transforms the vertices and normals of the mesh using the specified rotation matrix. | |
void | mesh_transform (TriangleMesh::Ptr mesh, math::Matrix4f const &trans) |
Transforms the vertices of the mesh using the specified transformation matrix and rotates the normals of the mesh using the roation matrix of the transformation. | |
math::Vec3f | pixel_3dpos (int64_t x, int64_t y, float depth, math::Matrix3f const &invproj) |
Function that calculates the pixel 3D position in camera coordinates for pixel (x,y) and 'depth' for a depth map with inverse K matrix 'invproj'. | |
float | pixel_footprint (int64_t x, int64_t y, float depth, math::Matrix3f const &invproj) |
Function that calculates the pixel footprint (pixel width) in 3D coordinates for pixel (x,y) and 'depth' for a depth map with inverse K matrix 'invproj'. | |
void | ply_color_convert (float const *src, unsigned char *dest, int num=3) |
template<typename T > | |
T | ply_read_value (std::istream &input, PLYFormat format) |
Reads a value from the input stream given the PLY format. | |
template<> | |
char | ply_read_value< char > (std::istream &input, PLYFormat format) |
template double | ply_read_value< double > (std::istream &input, PLYFormat format) |
template float | ply_read_value< float > (std::istream &input, PLYFormat format) |
template int | ply_read_value< int > (std::istream &input, PLYFormat format) |
template<> | |
unsigned char | ply_read_value< unsigned char > (std::istream &input, PLYFormat format) |
template unsigned int | ply_read_value< unsigned int > (std::istream &input, PLYFormat format) |
void | rangegrid_triangulate (Image< unsigned int > const &grid, TriangleMesh::Ptr mesh) |
Algorithm to triangulate range grids. | |
void | save_mesh (TriangleMesh::ConstPtr mesh, std::string const &filename) |
Auto-detects filetype from extension and delegates to writers. | |
void | save_npts_mesh (TriangleMesh::ConstPtr mesh, std::string const &filename, bool format_binary=false) |
Simple exporter for Kazhdan's .npts ASCII and binary files. | |
void | save_obj_mesh (TriangleMesh::ConstPtr mesh, std::string const &filename) |
Saves a triangle mesh to an OBJ model file. | |
void | save_off_mesh (TriangleMesh::ConstPtr mesh, std::string const &filename) |
Saves a triangle mesh to an OFF model file. | |
void | save_pbrt_mesh (TriangleMesh::ConstPtr mesh, std::string const &filename) |
Saves a PBRT compatible mesh from a triangle mesh. | |
void | save_ply_mesh (TriangleMesh::ConstPtr mesh, std::string const &filename, SavePLYOptions const &options=SavePLYOptions()) |
Stores a PLY file from a triangle mesh. | |
void | save_ply_view (std::string const &filename, CameraInfo const &camera, FloatImage::ConstPtr depth_map, FloatImage::ConstPtr confidence_map=FloatImage::ConstPtr(nullptr), ByteImage::ConstPtr color_image=ByteImage::ConstPtr(nullptr)) |
Stores a scanalize-compatible PLY file from a depth map. | |
void | save_ply_view (View::Ptr view, std::string const &filename) |
Stores a scanalize-compatible PLY file from a view. | |
void | save_ply_view (View::Ptr view, std::string const &filename, std::string const &depthmap, std::string const &confidence, std::string const &color_image) |
Stores a scanalyze-compatible PLY file from a view by specifying the names of the embeddings for depthmap, confidence map and color image. | |
void | save_smf_mesh (mve::TriangleMesh::ConstPtr mesh, std::string const &filename) |
Saves a triangle mesh to a file in SMF file format. | |
void | save_xf_file (std::string const &filename, CameraInfo const &camera) |
Stores a scanalyze compatible XF file with camera transformation from camera to world coordinates. | |
void | save_xf_file (std::string const &filename, float const *ctw) |
Stores a scanalyze compatible XF file with a given camera to world matrix (16 float entries). | |
Variables | |
const float | DD_FACTOR_DEFAULT = 5.0f |
int | mc_edge_order [12][2] |
The ordering in which edges of the cube are defined. | |
int | mc_edge_table [256] |
Defines the 12-bit edge mask, each bit corresponding to one of 12 edges, that contain the surface for all 256 cube configurations. | |
int | mc_tri_table [256][16] |
Defines the triangle setup for the 256 cube configurations. | |
int | mt_edge_order [6][2] |
Ordering in which edges in the tetrahedron are defined. | |
int | mt_edge_table [16] |
Defines the 6-bit edge mask (for all 6 edges in a tet) for all 16 tetrahedron configurations. | |
int | mt_freudenthal [6][4] |
Freudenthal cube partitioning, that subdivides the cube into 6 tetrahera for continuous reconstruction. | |
int | mt_tri_table [16][7] |
Defines the triangle setup for the 16 tetrahedron configurations. | |
Geometric tools, loading and processing functions.
PLY face element properties.
Enumerator | |
---|---|
PLY_F_VERTEX_INDICES | |
PLY_F_IGNORE_UINT32 | |
PLY_F_IGNORE_UINT8 | |
PLY_F_IGNORE_FLOAT |
Definition at line 147 of file mesh_io_ply.h.
enum mve::geom::PLYFormat |
PLY data encoding formats.
Enumerator | |
---|---|
PLY_ASCII | |
PLY_BINARY_LE | |
PLY_BINARY_BE | |
PLY_UNKNOWN |
Definition at line 156 of file mesh_io_ply.h.
PLY vertex element properties.
Definition at line 119 of file mesh_io_ply.h.
void mve::geom::depthmap_mesh_confidences | ( | TriangleMesh::Ptr | mesh, |
int | iterations = 3 |
||
) |
Algorithm to assign per-vertex confidence values to vertices of a triangulated depth map.
Confidences are low near boundaries and small regions.
Definition at line 497 of file depthmap.cc.
void mve::geom::depthmap_mesh_peeling | ( | TriangleMesh::Ptr | mesh, |
int | iterations = 1 |
||
) |
Algorithm that peels away triangles at the mesh bounary of a triangulated depth map.
The algorithm also works on other mesh data but is particularly useful for MVS depthmap where the edges of the real object are extended beyond their correct position.
Definition at line 550 of file depthmap.cc.
TriangleMesh::Ptr mve::geom::depthmap_triangulate | ( | FloatImage::ConstPtr | dm, |
ByteImage::ConstPtr | ci, | ||
CameraInfo const & | cam, | ||
float | dd_factor = DD_FACTOR_DEFAULT , |
||
mve::Image< unsigned int > * | vertex_ids = nullptr |
||
) |
A helper function that triangulates the given depth map with optional color image (which generates additional per-vertex colors) and transforms the mesh into the global coordinate system.
If vertex_ids != nullptr, pixel-vertex_ID mapping is provided.
Definition at line 377 of file depthmap.cc.
TriangleMesh::Ptr mve::geom::depthmap_triangulate | ( | FloatImage::ConstPtr | dm, |
ByteImage::ConstPtr | ci, | ||
math::Matrix3f const & | invproj, | ||
float | dd_factor = DD_FACTOR_DEFAULT , |
||
mve::Image< unsigned int > * | vertex_ids = nullptr |
||
) |
A helper function that triangulates the given depth map with optional color image (which generates additional per-vertex colors) in local image coordinates.
If vertex_ids != nullptr, pixel-vertex_ID mapping is provided.
Definition at line 322 of file depthmap.cc.
TriangleMesh::Ptr mve::geom::depthmap_triangulate | ( | FloatImage::ConstPtr | dm, |
math::Matrix3f const & | invproj, | ||
float | dd_factor = DD_FACTOR_DEFAULT , |
||
mve::Image< unsigned int > * | vids = nullptr |
||
) |
Algorithm to triangulate depth maps.
A factor may be specified that guides depth discontinuity detection. A depth discontinuity between pixels is assumed if depth difference is larger than pixel footprint times 'dd_factor'. If 'dd_factor' is zero, no depth discontinuity detection is performed. The depthmap is triangulated in the local camera coordinate system.
If 'vids' is not null, image content is replaced with vertex indices for each pixel that generated the vertex. Index MATH_MAX_UINT corresponds to a pixel that did not generate a vertex.
Definition at line 210 of file depthmap.cc.
bool mve::geom::dm_is_depth_disc | ( | math::Vec3f const & | v1, |
math::Vec3f const & | v2, | ||
math::Vec3f const & | v3 | ||
) |
Definition at line 404 of file depthmap.cc.
bool mve::geom::dm_is_depthdisc | ( | float * | widths, |
float * | depths, | ||
float | dd_factor, | ||
int | i1, | ||
int | i2 | ||
) |
Definition at line 188 of file depthmap.cc.
void mve::geom::dm_make_triangle | ( | TriangleMesh * | mesh, |
mve::Image< unsigned int > & | vidx, | ||
FloatImage const * | dm, | ||
math::Matrix3f const & | invproj, | ||
std::size_t | i, | ||
int * | tverts | ||
) |
Definition at line 161 of file depthmap.cc.
TriangleMesh::Ptr mve::geom::load_mesh | ( | std::string const & | filename | ) |
Auto-detects filetype from extension and delegates to readers.
Definition at line 26 of file mesh_io.cc.
void mve::geom::load_mtl_file | ( | std::string const & | filename, |
std::map< std::string, std::string > * | result | ||
) |
Definition at line 54 of file mesh_io_obj.cc.
TriangleMesh::Ptr mve::geom::load_npts_mesh | ( | std::string const & | filename, |
bool | format_binary | ||
) |
Simple importer for Kazhdan's .npts ASCII and binary files.
Definition at line 25 of file mesh_io_npts.cc.
mve::TriangleMesh::Ptr mve::geom::load_obj_mesh | ( | std::string const & | filename | ) |
Loads a triangle mesh from an OBJ model file.
Definition at line 118 of file mesh_io_obj.cc.
void mve::geom::load_obj_mesh | ( | std::string const & | filename, |
std::vector< ObjModelPart > * | obj_model_parts | ||
) |
Loads all groups from an OBJ model file.
Definition at line 130 of file mesh_io_obj.cc.
TriangleMesh::Ptr mve::geom::load_off_mesh | ( | std::string const & | filename | ) |
Loads a triangle mesh from an OFF model file.
Definition at line 25 of file mesh_io_off.cc.
FloatImage::Ptr mve::geom::load_ply_depthmap | ( | std::string const & | filename | ) |
Loads a depth map from a PLY file.
Warning: Aspect ratio may get lost, depending on the range points.
Definition at line 1083 of file mesh_io_ply.cc.
TriangleMesh::Ptr mve::geom::load_ply_mesh | ( | std::string const & | filename | ) |
Loads a triangle mesh from a PLY model file.
Definition at line 124 of file mesh_io_ply.cc.
TriangleMesh::Ptr mve::geom::load_smf_mesh | ( | std::string const & | filename | ) |
Loads a triangle mesh from a SMF file format.
Definition at line 23 of file mesh_io_smf.cc.
void mve::geom::load_xf_file | ( | std::string const & | filename, |
float * | ctw | ||
) |
Load XF file, typically with camera to world transformation.
This function simply reads the 16 float values into the specified array.
Definition at line 662 of file mesh_io_ply.cc.
TriangleMesh::Ptr mve::geom::marching_cubes | ( | T & | accessor | ) |
This function polygonizes a SDF that is partitioned into cubes.
It requires an accessor that acts as iterator and provides information about the SDF. This interface decouples the algorithm from the underlying representation.
The accessor must support the following operations:
The first call to next() must initialize the accessor. next() must return false if there is no next element, true otherwise.
The ordering of the voxels and the edges of a cube are given in the following. The ordering of the edges is not important for using the algorithm, but the voxels need to be provided in the right order.
4------5 +-- 4--+ +------+ /| /| 7| 5| /| /| y
7-+-—6 | +-+ 6–+ | +-+-—+ | | | | | | | | | | | 8 | 9 | | 0-—+-1 | +–0-+-+ | +-—+-+ +---— x |/ |/ |3 |1 11/ 10/ / 3---—2 +–2—+ +---—+ z Vertex Order Edge Order 1 Edge Order 2
Definition at line 89 of file marching_cubes.h.
TriangleMesh::Ptr mve::geom::marching_tetrahedra | ( | T & | accessor | ) |
This function polygonizes a SDF that is partitioned into tetrahedrons.
It requires an accessor that acts as iterator and provides information about the SDF. This interface decouples the algorithm from the underlying representation.
The accessor must support the following operations:
The first call to next() must initialize the accessor. next() must return false if there is no next element, true otherwise. The accessor is supposed to iterate over valid tets only.
Definition at line 79 of file marching_tets.h.
void mve::geom::mesh_components | ( | TriangleMesh::Ptr | mesh, |
std::size_t | vertex_threshold | ||
) |
Discards isolated components with a vertex count below a threshold.
Passing 0 does nothing. Passing 1 or 2 deletes isolated vertices. Passing 3 deletes isolated faces, and so on.
Definition at line 128 of file mesh_tools.cc.
std::size_t mve::geom::mesh_delete_unreferenced | ( | TriangleMesh::Ptr | mesh | ) |
Cleans unreferenced vertices from the mesh.
Returns the number of deleted vertices.
Definition at line 266 of file mesh_tools.cc.
void mve::geom::mesh_find_aabb | ( | TriangleMesh::ConstPtr | mesh, |
math::Vec3f & | aabb_min, | ||
math::Vec3f & | aabb_max | ||
) |
Calculates the mesh axis-aligned bounding box (AABB).
This is done by iterating over all vertices.
Definition at line 241 of file mesh_tools.cc.
void mve::geom::mesh_invert_faces | ( | TriangleMesh::Ptr | mesh | ) |
Inverts the orientation of all faces in the mesh.
Definition at line 226 of file mesh_tools.cc.
void mve::geom::mesh_merge | ( | TriangleMesh::ConstPtr | mesh1, |
TriangleMesh::Ptr | mesh2 | ||
) |
Merges the first given mesh with the second one, modifying the second one.
All vertex and face attributes are copied, faces itself are copied and indices are offsetted accordingly. Note that this method will FAIL if, for example, one mesh with a certain property is merged with a mesh without that property (e.g. vertex color).
Definition at line 84 of file mesh_tools.cc.
void mve::geom::mesh_scale_and_center | ( | TriangleMesh::Ptr | mesh, |
bool | scale, | ||
bool | center | ||
) |
Scales the mesh such that it fits into a cube with length 1 and centers the mesh in the coordinate origin.
Definition at line 179 of file mesh_tools.cc.
void mve::geom::mesh_transform | ( | TriangleMesh::Ptr | mesh, |
math::Matrix3f const & | rot | ||
) |
Transforms the vertices and normals of the mesh using the specified rotation matrix.
Transformation is IN-PLACE.
Definition at line 46 of file mesh_tools.cc.
void mve::geom::mesh_transform | ( | TriangleMesh::Ptr | mesh, |
math::Matrix4f const & | trans | ||
) |
Transforms the vertices of the mesh using the specified transformation matrix and rotates the normals of the mesh using the roation matrix of the transformation.
Transformation is IN-PLACE.
Definition at line 64 of file mesh_tools.cc.
math::Vec3f mve::geom::pixel_3dpos | ( | int64_t | x, |
int64_t | y, | ||
float | depth, | ||
math::Matrix3f const & | invproj | ||
) |
Function that calculates the pixel 3D position in camera coordinates for pixel (x,y) and 'depth' for a depth map with inverse K matrix 'invproj'.
Definition at line 150 of file depthmap.cc.
float mve::geom::pixel_footprint | ( | int64_t | x, |
int64_t | y, | ||
float | depth, | ||
math::Matrix3f const & | invproj | ||
) |
Function that calculates the pixel footprint (pixel width) in 3D coordinates for pixel (x,y) and 'depth' for a depth map with inverse K matrix 'invproj'.
Definition at line 139 of file depthmap.cc.
void mve::geom::ply_color_convert | ( | float const * | src, |
unsigned char * | dest, | ||
int | num = 3 |
||
) |
Definition at line 109 of file mesh_io_ply.cc.
T mve::geom::ply_read_value | ( | std::istream & | input, |
PLYFormat | format | ||
) |
Reads a value from the input stream given the PLY format.
Definition at line 28 of file mesh_io_ply.cc.
char mve::geom::ply_read_value< char > | ( | std::istream & | input, |
PLYFormat | format | ||
) |
template double mve::geom::ply_read_value< double > | ( | std::istream & | input, |
PLYFormat | format | ||
) |
template float mve::geom::ply_read_value< float > | ( | std::istream & | input, |
PLYFormat | format | ||
) |
template int mve::geom::ply_read_value< int > | ( | std::istream & | input, |
PLYFormat | format | ||
) |
unsigned char mve::geom::ply_read_value< unsigned char > | ( | std::istream & | input, |
PLYFormat | format | ||
) |
Definition at line 55 of file mesh_io_ply.cc.
template unsigned int mve::geom::ply_read_value< unsigned int > | ( | std::istream & | input, |
PLYFormat | format | ||
) |
void mve::geom::rangegrid_triangulate | ( | Image< unsigned int > const & | grid, |
TriangleMesh::Ptr | mesh | ||
) |
Algorithm to triangulate range grids.
Vertex positions are given in 'mesh' and a grid that contains vertex indices is specified. Four indices are taken at a time and triangulated with discontinuity detection. New triangles are added to the mesh.
Definition at line 420 of file depthmap.cc.
void mve::geom::save_mesh | ( | TriangleMesh::ConstPtr | mesh, |
std::string const & | filename | ||
) |
Auto-detects filetype from extension and delegates to writers.
Definition at line 47 of file mesh_io.cc.
void mve::geom::save_npts_mesh | ( | TriangleMesh::ConstPtr | mesh, |
std::string const & | filename, | ||
bool | format_binary | ||
) |
Simple exporter for Kazhdan's .npts ASCII and binary files.
Definition at line 66 of file mesh_io_npts.cc.
void mve::geom::save_obj_mesh | ( | TriangleMesh::ConstPtr | mesh, |
std::string const & | filename | ||
) |
Saves a triangle mesh to an OBJ model file.
Definition at line 321 of file mesh_io_obj.cc.
void mve::geom::save_off_mesh | ( | TriangleMesh::ConstPtr | mesh, |
std::string const & | filename | ||
) |
Saves a triangle mesh to an OFF model file.
Definition at line 159 of file mesh_io_off.cc.
void mve::geom::save_pbrt_mesh | ( | TriangleMesh::ConstPtr | mesh, |
std::string const & | filename | ||
) |
Saves a PBRT compatible mesh from a triangle mesh.
Definition at line 23 of file mesh_io_pbrt.cc.
void mve::geom::save_ply_mesh | ( | TriangleMesh::ConstPtr | mesh, |
std::string const & | filename, | ||
SavePLYOptions const & | options = SavePLYOptions() |
||
) |
Stores a PLY file from a triangle mesh.
Colors are written if 'write_colors' is true and colors are given. Vertex normals are written if 'write_normals' is true and normals are given.
Definition at line 687 of file mesh_io_ply.cc.
void mve::geom::save_ply_view | ( | std::string const & | filename, |
CameraInfo const & | camera, | ||
FloatImage::ConstPtr | depth_map, | ||
FloatImage::ConstPtr | confidence_map = FloatImage::ConstPtr(nullptr) , |
||
ByteImage::ConstPtr | color_image = ByteImage::ConstPtr(nullptr) |
||
) |
Stores a scanalize-compatible PLY file from a depth map.
If the confidence map is given, confidence values are stored and only those depth values with non-zero confidence values are stored. The function optionally takes a color image to store color values.
TODO: Replace camera with focal length? Only flen needed!
Definition at line 884 of file mesh_io_ply.cc.
void mve::geom::save_ply_view | ( | View::Ptr | view, |
std::string const & | filename | ||
) |
Stores a scanalize-compatible PLY file from a view.
It selects embeddings "depthmap", "confidence" and "undistorted".
Definition at line 1031 of file mesh_io_ply.cc.
void mve::geom::save_ply_view | ( | View::Ptr | view, |
std::string const & | filename, | ||
std::string const & | depthmap, | ||
std::string const & | confidence, | ||
std::string const & | color_image | ||
) |
Stores a scanalyze-compatible PLY file from a view by specifying the names of the embeddings for depthmap, confidence map and color image.
Names for 'confidence' and 'color_image' may be empty.
Definition at line 1039 of file mesh_io_ply.cc.
void mve::geom::save_smf_mesh | ( | mve::TriangleMesh::ConstPtr | mesh, |
std::string const & | filename | ||
) |
Saves a triangle mesh to a file in SMF file format.
Definition at line 77 of file mesh_io_smf.cc.
void mve::geom::save_xf_file | ( | std::string const & | filename, |
CameraInfo const & | camera | ||
) |
Stores a scanalyze compatible XF file with camera transformation from camera to world coordinates.
Definition at line 1056 of file mesh_io_ply.cc.
void mve::geom::save_xf_file | ( | std::string const & | filename, |
float const * | ctw | ||
) |
Stores a scanalyze compatible XF file with a given camera to world matrix (16 float entries).
Definition at line 1066 of file mesh_io_ply.cc.
const float mve::geom::DD_FACTOR_DEFAULT = 5.0f |
Definition at line 74 of file depthmap.h.
int mve::geom::mc_edge_order |
The ordering in which edges of the cube are defined.
The first edge is between cube vertices 0 and 1, and so on.
Definition at line 329 of file marching.cc.
int mve::geom::mc_edge_table |
Defines the 12-bit edge mask, each bit corresponding to one of 12 edges, that contain the surface for all 256 cube configurations.
Definition at line 33 of file marching.cc.
int mve::geom::mc_tri_table |
Defines the triangle setup for the 256 cube configurations.
For each cube configuration, three subsequent vertices form a triangle. The vertices are indexed by cube edge ID.
Definition at line 69 of file marching.cc.
int mve::geom::mt_edge_order |
Ordering in which edges in the tetrahedron are defined.
First edge between tet vertices 0 and 1, and so on. See marching.cc.
Definition at line 370 of file marching.cc.
int mve::geom::mt_edge_table |
Defines the 6-bit edge mask (for all 6 edges in a tet) for all 16 tetrahedron configurations.
See marching.cc.
Definition at line 344 of file marching.cc.
int mve::geom::mt_freudenthal |
Freudenthal cube partitioning, that subdivides the cube into 6 tetrahera for continuous reconstruction.
This can be used as template when designing accessors for regular volumes. See also: illustrations/cube_subdivisions.png
Definition at line 338 of file marching.cc.
int mve::geom::mt_tri_table |
Defines the triangle setup for the 16 tetrahedron configurations.
Three subsequent vertices form a triangle, max 2 triangles per tet. The vertices are indexed by tet edge ID. See marching.cc.
Definition at line 350 of file marching.cc.