MVE - Multi-View Environment mve-devel
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
depthmap.cc File Reference
#include <algorithm>
#include <vector>
#include <list>
#include <set>
#include "math/defines.h"
#include "math/matrix.h"
#include "mve/mesh_info.h"
#include "mve/depthmap.h"
#include "mve/mesh_tools.h"
Include dependency graph for depthmap.cc:

Go to the source code of this file.

Namespaces

namespace  mve
 Multi-View Environment library.
 
namespace  mve::geom
 Geometric tools, loading and processing functions.
 
namespace  mve::image
 Image tools, loading and processing functions.
 

Macros

#define ADDTRI(a, c, b)   faces.push_back(vid[a]); faces.push_back(vid[b]); faces.push_back(vid[c])
 
#define DEPTHDISC(a, b, c)   dm_is_depth_disc(VERT(a), VERT(b), VERT(c))
 
#define DM_DD_ARGS   widths, depths, dd_factor
 
#define DM_MAKE_TRI_ARGS   mesh.get(), vidx, dm.get(), invproj, i
 
#define VERT(id)   verts[vid[id]]
 

Functions

FloatImage::Ptr mve::image::depthmap_cleanup (FloatImage::ConstPtr dm, int64_t thres)
 Algorithm to clean small confident islands in the depth maps.
 
void mve::image::depthmap_cleanup_grow (FloatImage::ConstPtr dm, FloatImage::Ptr ret, std::vector< bool > &visited, int64_t x, int64_t y, std::size_t thres)
 
void mve::image::depthmap_confidence_clean (FloatImage::Ptr dm, FloatImage::ConstPtr cm)
 Removes the backplane according to the confidence map IN-PLACE.
 
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.
 
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.
 
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.
 
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.
 
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.
 
bool mve::geom::dm_is_depth_disc (math::Vec3f const &v1, math::Vec3f const &v2, math::Vec3f const &v3)
 
bool mve::geom::dm_is_depthdisc (float *widths, float *depths, float dd_factor, int i1, int i2)
 
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)
 
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'.
 
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'.
 
void mve::geom::rangegrid_triangulate (Image< unsigned int > const &grid, TriangleMesh::Ptr mesh)
 Algorithm to triangulate range grids.
 

Macro Definition Documentation

◆ ADDTRI

#define ADDTRI (   a,
  c,
 
)    faces.push_back(vid[a]); faces.push_back(vid[b]); faces.push_back(vid[c])

◆ DEPTHDISC

#define DEPTHDISC (   a,
  b,
 
)    dm_is_depth_disc(VERT(a), VERT(b), VERT(c))

◆ DM_DD_ARGS

#define DM_DD_ARGS   widths, depths, dd_factor

◆ DM_MAKE_TRI_ARGS

#define DM_MAKE_TRI_ARGS   mesh.get(), vidx, dm.get(), invproj, i

◆ VERT

#define VERT (   id)    verts[vid[id]]