CPPxDIC
C++ Digital Image Correlation library for fingertip 3D reconstruction
Loading...
Searching...
No Matches
surface_stitching.cpp File Reference
#include "dic_structures.h"
#include "surface_stitching.h"
#include "logging.h"
#include <vector>
#include <algorithm>
#include <cmath>
#include <limits>
#include <iostream>
#include <map>
#include <set>
#include <unordered_map>
#include <Eigen/Dense>

Go to the source code of this file.

Namespaces

namespace  cppxdic
 DataSerializer - Abstract base class for format-agnostic DIC data I/O.
 

Functions

DIC3Dcombined cppxdic::stitchPairsSimple (const std::vector< DIC3DpairResults > &all_pairs)
 Simple append-based stitching for multiple stereo pairs.
 
std::vector< int > cppxdic::computeMeshBoundary (const std::vector< int > &faces, const std::vector< Eigen::Vector3d > &vertices)
 Compute boundary edges of a triangular mesh Matches MATLAB: patchBoundary(F, V)
 
std::vector< double > cppxdic::computeEdgeLengths (const std::vector< int > &faces, const std::vector< Eigen::Vector3d > &vertices)
 Compute edge lengths for all triangles Matches MATLAB: patchEdgeLengths(F, V)
 
static std::vector< Eigen::Vector3d > cppxdic::computeVertexNormals (const std::vector< int > &faces, const std::vector< Eigen::Vector3d > &vertices)
 
static double cppxdic::rayTriangleHit (const Eigen::Vector3d &O, const Eigen::Vector3d &D, const Eigen::Vector3d &A, const Eigen::Vector3d &B, const Eigen::Vector3d &C, double eps)
 
void cppxdic::setStitchRayAccel (bool enabled)
 Enable/disable the AABB-hierarchy prefilter used by the overlap-removal ray casts.
 
bool cppxdic::stitchRayAccel ()
 Current state of the ray-cast prefilter (see setStitchRayAccel).
 
static std::vector< Eigen::Vector3d > cppxdic::raySetTriangleIntersect (const std::vector< Eigen::Vector3d > &origins, const std::vector< Eigen::Vector3d > &dirs, const std::vector< int > &faces, const std::vector< Eigen::Vector3d > &vertices, double eps=1e-6)
 
static std::vector< double > cppxdic::computeRaySurfaceDistance (const std::vector< Eigen::Vector3d > &V1, const std::vector< Eigen::Vector3d > &N1, const std::vector< int > &F2, const std::vector< Eigen::Vector3d > &V2)
 
static double cppxdic::meanFiniteEdgeLength (const std::vector< int > &faces, const std::vector< Eigen::Vector3d > &vertices)
 
static std::vector< int > cppxdic::applyFaceMask (const std::vector< int > &F, const std::vector< bool > &CT)
 
static bool cppxdic::removeFacesContainingVertex (const std::vector< int > &F, std::vector< bool > &CT, int v_remove)
 
std::pair< std::vector< bool >, std::vector< bool > > cppxdic::removeOverlapSurfaces (const std::vector< int > &faces1, const std::vector< int > &faces2, const std::vector< Eigen::Vector3d > &vertices1, const std::vector< Eigen::Vector3d > &vertices2, double min_gap, bool pair_forced=false)
 Remove overlapping regions from two surfaces Matches MATLAB: removeOverlapSurface_temp_2018_10_30(F1, F2, V1, V2, [], [], minGap, pairforced)
 
std::vector< std::vector< int > > cppxdic::groupBoundaryEdges (const std::vector< int > &boundary_edges)
 Group boundary edges into connected components.
 
std::vector< int > cppxdic::edgeListToCurve (const std::vector< int > &edges)
 Convert an unordered list of edges into an ordered curve of vertex indices.
 
std::vector< bool > cppxdic::findAllBoundaryFaces (const std::vector< int > &faces, const std::vector< int > &boundary_edges)
 Remove faces where all 3 edges are on the boundary (degenerate boundary triangles).
 
std::vector< int > cppxdic::zipBoundaryCurves (const std::vector< int > &curve1, const std::vector< int > &curve2, const std::vector< Eigen::Vector3d > &V_combined)
 Zip two boundary curves together by creating a triangle strip.
 
static std::vector< int > cppxdic::filterFaces (const std::vector< int > &faces, const std::vector< bool > &keep)
 
template<typename T >
static std::vector< T > cppxdic::filterByMask (const std::vector< T > &data, const std::vector< bool > &keep)
 
DIC3Dcombined cppxdic::stitchPairsGeometric (const std::vector< DIC3DpairResults > &all_pairs, const std::vector< int > &pair_order, bool pair_forced=false)
 Geometric stitching with overlap removal and boundary zipping Matches MATLAB's DIC3DsurfaceStitch.m with geometric stitching enabled.
 

Variables

static bool cppxdic::g_stitch_ray_bvh = false
 

Variable Documentation

◆ count

int count = 0

Definition at line 382 of file surface_stitching.cpp.

◆ f_c

std::vector<Eigen::Vector3d> f_c

Definition at line 386 of file surface_stitching.cpp.

◆ f_hi

std::vector<Eigen::Vector3d> f_hi

Definition at line 386 of file surface_stitching.cpp.

◆ f_lo

std::vector<Eigen::Vector3d> f_lo

Definition at line 386 of file surface_stitching.cpp.

◆ first

int first = 0

Definition at line 382 of file surface_stitching.cpp.

◆ hi

Eigen::Vector3d hi

Definition at line 380 of file surface_stitching.cpp.

◆ left

int left = -1

Definition at line 381 of file surface_stitching.cpp.

◆ lo

Eigen::Vector3d lo

Definition at line 380 of file surface_stitching.cpp.

◆ nodes

std::vector<Node> nodes

Definition at line 384 of file surface_stitching.cpp.

◆ order

std::vector<int> order

Definition at line 385 of file surface_stitching.cpp.

◆ right

int right = -1

Definition at line 381 of file surface_stitching.cpp.