MVE - Multi-View Environment mve-devel
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions
fssr Namespace Reference

Classes

class  IsoOctree
 This class computes the implicit function by querying function values at the octree primal vertices of the leaf nodes, called voxels. More...
 
class  IsoSurface
 The surfacing algorithm requires the octree hierarchy and the vector of voxels. More...
 
class  MinAreaTriangulation
 Computes the minimum area triangulation of a polygon. More...
 
class  Octree
 A regular octree data structure (each node has zero or eight child nodes). More...
 
struct  Sample
 Representation of a point sample. More...
 
class  SampleIO
 Reads samples from a PLY file. More...
 
struct  VoxelData
 Stores per voxel data. More...
 
struct  VoxelIndex
 The voxel index is a unique 64 bit ID for each voxel in the octree. More...
 

Typedefs

typedef std::vector< SampleSampleList
 Representation of a list of samples.
 

Enumerations

enum  InterpolationType { INTERPOLATION_LINEAR , INTERPOLATION_SCALING , INTERPOLATION_LSDERIV , INTERPOLATION_CUBIC }
 

Functions

std::size_t clean_caps (mve::TriangleMesh::Ptr mesh)
 Cleans caps from the mesh by removing vertices with only three adjacent triangles.
 
std::size_t clean_mc_mesh (mve::TriangleMesh::Ptr mesh, float needle_ratio_thres=0.4f)
 Removes degenerated triangles from the mesh typical for Marching Cubes.
 
std::size_t clean_needles (mve::TriangleMesh::Ptr mesh, float needle_ratio_thres)
 Cleans needles from the mesh by collapsing short edges of degenerated triangles.
 
bool edge_collapse (mve::TriangleMesh::Ptr mesh, mve::MeshInfo &mesh_info, std::size_t v1, std::size_t v2, math::Vec3f const &new_vert, std::vector< std::size_t > const &afaces, float acos_threshold=0.95f)
 
void evaluate (math::Vec3f const &pos, Sample const &sample, double *value, double *weight, math::Vector< double, 3 > *value_deriv, math::Vector< double, 3 > *weight_deriv)
 Rotates the given point in the LCS of the sample, evaluates the basis and weight functions and their derivatives, and rotates the derivatives back to the global coordinate system.
 
double find_root_cubic (double a0, double a1, double a2, double a3)
 Finds the root of a cubic function f(x) = a0 + a1 * x + a2 * x^2 + a3 * x^3.
 
double find_root_linear (double a0, double a1)
 Finds the root of a linear function f(x) = a0 + a1(x).
 
double find_root_square (double a0, double a1, double a2)
 Finds the root of a quadratic function f(x) = a0 + a1 * x + a2 * x^2.
 
template<typename T >
fssr_basis (T const &scale, math::Vector< T, 3 > const &pos, math::Vector< T, 3 > *deriv=nullptr)
 Evaluates the FSSR basis function and directional derivatives (optional).
 
template<typename T >
fssr_weight (T const &scale, math::Vector< T, 3 > const &pos, math::Vector< T, 3 > *deriv=nullptr)
 Evaluates the FSSR weight function and directional derivatives (optional).
 
template<typename T >
gaussian (T const &sigma, math::Vector< T, 3 > const &x)
 The Gaussian function in 3D.
 
template<typename T >
gaussian_normalized (T const &sigma, math::Vector< T, 3 > const &x)
 The normalized Gaussian function in 3D.
 
double interpolate_root (double v0, double v1, double d0, double d1, InterpolationType type=INTERPOLATION_CUBIC)
 Interpolates the root of an unknown function f(x) given value and derivative constraints: f(0) = v0, f(1) = v1, f'(0) = d0, f'(1) = d1.
 
VoxelData interpolate_voxel (VoxelData const &d1, float w1, VoxelData const &d2, float w2)
 Interpolates between two VoxelData objects for Marching Cubes.
 
void rotation_from_normal (math::Vec2f const &normal, math::Matrix2f *rot)
 Generates a rotation matrix that transforms in the FSSR LCS.
 
void rotation_from_normal (math::Vec3f const &normal, math::Matrix3f *rot)
 Generates a rotation matrix that transforms in the FSSR LCS.
 
bool sample_scale_compare (Sample const *s1, Sample const *s2)
 Comparator that orders samples according to scale.
 
math::Vec3f transform_position (math::Vec3f const &pos, Sample const &sample)
 Transforms 'pos' according to the samples position and normal.
 

Typedef Documentation

◆ SampleList

typedef std::vector<Sample> fssr::SampleList

Representation of a list of samples.

Definition at line 31 of file sample.h.

Enumeration Type Documentation

◆ InterpolationType

Enumerator
INTERPOLATION_LINEAR 
INTERPOLATION_SCALING 
INTERPOLATION_LSDERIV 
INTERPOLATION_CUBIC 

Definition at line 17 of file hermite.h.

Function Documentation

◆ clean_caps()

std::size_t fssr::clean_caps ( mve::TriangleMesh::Ptr  mesh)

Cleans caps from the mesh by removing vertices with only three adjacent triangles.

The number of successful edge collapses is returned.

Definition at line 205 of file mesh_clean.cc.

◆ clean_mc_mesh()

std::size_t fssr::clean_mc_mesh ( mve::TriangleMesh::Ptr  mesh,
float  needle_ratio_thres = 0.4f 
)

Removes degenerated triangles from the mesh typical for Marching Cubes.

The routine first cleans needles, then caps, then remaining needles.

Definition at line 245 of file mesh_clean.cc.

◆ clean_needles()

std::size_t fssr::clean_needles ( mve::TriangleMesh::Ptr  mesh,
float  needle_ratio_thres 
)

Cleans needles from the mesh by collapsing short edges of degenerated triangles.

The number of successful edge collapses is returned.

Definition at line 151 of file mesh_clean.cc.

◆ edge_collapse()

bool fssr::edge_collapse ( mve::TriangleMesh::Ptr  mesh,
mve::MeshInfo mesh_info,
std::size_t  v1,
std::size_t  v2,
math::Vec3f const &  new_vert,
std::vector< std::size_t > const &  afaces,
float  acos_threshold = 0.95f 
)

Definition at line 19 of file mesh_clean.cc.

◆ evaluate()

void fssr::evaluate ( math::Vec3f const &  pos,
Sample const &  sample,
double *  value,
double *  weight,
math::Vector< double, 3 > *  value_deriv,
math::Vector< double, 3 > *  weight_deriv 
)

Rotates the given point in the LCS of the sample, evaluates the basis and weight functions and their derivatives, and rotates the derivatives back to the global coordinate system.

Definition at line 21 of file basis_function.cc.

◆ find_root_cubic()

double fssr::find_root_cubic ( double  a0,
double  a1,
double  a2,
double  a3 
)

Finds the root of a cubic function f(x) = a0 + a1 * x + a2 * x^2 + a3 * x^3.

The code assumes a single root in [0, 1]. If [0, 1] contains more than one root, linear interpolation is used. In the case with two distinct roots (one single, one double root), the double root is ignored.

Definition at line 55 of file hermite.cc.

◆ find_root_linear()

double fssr::find_root_linear ( double  a0,
double  a1 
)

Finds the root of a linear function f(x) = a0 + a1(x).

The method produces unstable results if a1 ~ 0.

Definition at line 22 of file hermite.cc.

◆ find_root_square()

double fssr::find_root_square ( double  a0,
double  a1,
double  a2 
)

Finds the root of a quadratic function f(x) = a0 + a1 * x + a2 * x^2.

The code assumes a root in [0, 1] and the root closer to 0.5 is returned.

Definition at line 28 of file hermite.cc.

◆ fssr_basis()

template<typename T >
T fssr::fssr_basis ( T const &  scale,
math::Vector< T, 3 > const &  pos,
math::Vector< T, 3 > *  deriv = nullptr 
)
inline

Evaluates the FSSR basis function and directional derivatives (optional).

The basis function is a Gaussian derivative in the direction of the normal and a regular Gaussian orthogonal to the normal. Here, the normal direction is defined to be the positive x-axis, thus 'pos' must be translated and rotated into the sample's LCS. The function takes positive values in front and negative values behind the sample.

Definition at line 111 of file basis_function.h.

◆ fssr_weight()

template<typename T >
T fssr::fssr_weight ( T const &  scale,
math::Vector< T, 3 > const &  pos,
math::Vector< T, 3 > *  deriv = nullptr 
)

Evaluates the FSSR weight function and directional derivatives (optional).

The weight function is composed of polynomials up to the forth degree. The function is one in the center, and falls of to zero at 3 * scale. Similar to fssr_basis(), it expects 'pos' to be in the sample's LCS.

Definition at line 135 of file basis_function.h.

◆ gaussian()

template<typename T >
T fssr::gaussian ( T const &  sigma,
math::Vector< T, 3 > const &  x 
)
inline

The Gaussian function in 3D.

Definition at line 95 of file basis_function.h.

◆ gaussian_normalized()

template<typename T >
T fssr::gaussian_normalized ( T const &  sigma,
math::Vector< T, 3 > const &  x 
)
inline

The normalized Gaussian function in 3D.

Definition at line 102 of file basis_function.h.

◆ interpolate_root()

double fssr::interpolate_root ( double  v0,
double  v1,
double  d0,
double  d1,
InterpolationType  type = INTERPOLATION_CUBIC 
)

Interpolates the root of an unknown function f(x) given value and derivative constraints: f(0) = v0, f(1) = v1, f'(0) = d0, f'(1) = d1.

First, a polynomial function is fit to the constraints, then the root in the interval [0, 1] is determined.

Definition at line 145 of file hermite.cc.

◆ interpolate_voxel()

VoxelData fssr::interpolate_voxel ( VoxelData const &  d1,
float  w1,
VoxelData const &  d2,
float  w2 
)

Interpolates between two VoxelData objects for Marching Cubes.

The specified weights 'w1' and 'w2' are used for interpolation of value, scale and color. For the confidence, however, the minimum value is used.

Definition at line 74 of file voxel.cc.

◆ rotation_from_normal() [1/2]

void fssr::rotation_from_normal ( math::Vec2f const &  normal,
math::Matrix2f rot 
)

Generates a rotation matrix that transforms in the FSSR LCS.

Definition at line 82 of file basis_function.cc.

◆ rotation_from_normal() [2/2]

void fssr::rotation_from_normal ( math::Vec3f const &  normal,
math::Matrix3f rot 
)

Generates a rotation matrix that transforms in the FSSR LCS.

Definition at line 50 of file basis_function.cc.

◆ sample_scale_compare()

bool fssr::sample_scale_compare ( Sample const *  s1,
Sample const *  s2 
)
inline

Comparator that orders samples according to scale.

Definition at line 44 of file sample.h.

◆ transform_position()

math::Vec3f fssr::transform_position ( math::Vec3f const &  pos,
Sample const &  sample 
)
inline

Transforms 'pos' according to the samples position and normal.

Definition at line 252 of file basis_function.h.