CPPxDIC
C++ Digital Image Correlation library for fingertip 3D reconstruction
Loading...
Searching...
No Matches
surface_stitching.h
Go to the documentation of this file.
1
5#ifndef SURFACE_STITCHING_H
6#define SURFACE_STITCHING_H
7
8#include "dic_structures.h"
9#include <vector>
10#include <Eigen/Dense>
11
12namespace cppxdic {
13
23DIC3Dcombined stitchPairsSimple(const std::vector<DIC3DpairResults>& all_pairs);
24
33DIC3Dcombined stitchPairsGeometric(const std::vector<DIC3DpairResults>& all_pairs,
34 const std::vector<int>& pair_order,
35 bool pair_forced = false);
36
47void setStitchRayAccel(bool enabled);
48
50bool stitchRayAccel();
51
52// ============================================================================
53// Helper functions for geometric stitching
54// ============================================================================
55
64std::vector<int> computeMeshBoundary(const std::vector<int>& faces,
65 const std::vector<Eigen::Vector3d>& vertices);
66
71std::vector<double> computeEdgeLengths(const std::vector<int>& faces,
72 const std::vector<Eigen::Vector3d>& vertices);
73
85std::pair<std::vector<bool>, std::vector<bool>> removeOverlapSurfaces(
86 const std::vector<int>& faces1,
87 const std::vector<int>& faces2,
88 const std::vector<Eigen::Vector3d>& vertices1,
89 const std::vector<Eigen::Vector3d>& vertices2,
90 double min_gap,
91 bool pair_forced = false);
92
100std::vector<std::vector<int>> groupBoundaryEdges(const std::vector<int>& boundary_edges);
101
109std::vector<int> edgeListToCurve(const std::vector<int>& edges);
110
121std::vector<int> zipBoundaryCurves(const std::vector<int>& curve1,
122 const std::vector<int>& curve2,
123 const std::vector<Eigen::Vector3d>& V_combined);
124
133std::vector<bool> findAllBoundaryFaces(const std::vector<int>& faces,
134 const std::vector<int>& boundary_edges);
135
136} // namespace cppxdic
137
138#endif // SURFACE_STITCHING_H
DataSerializer - Abstract base class for format-agnostic DIC data I/O.
DIC3Dcombined stitchPairsSimple(const std::vector< DIC3DpairResults > &all_pairs)
Simple append-based stitching for multiple stereo pairs.
std::vector< std::vector< int > > groupBoundaryEdges(const std::vector< int > &boundary_edges)
Group boundary edges into connected components.
void setStitchRayAccel(bool enabled)
Enable/disable the AABB-hierarchy prefilter used by the overlap-removal ray casts.
std::vector< int > edgeListToCurve(const std::vector< int > &edges)
Convert an unordered list of edges into an ordered curve of vertex indices.
bool stitchRayAccel()
Current state of the ray-cast prefilter (see setStitchRayAccel).
std::vector< double > computeEdgeLengths(const std::vector< int > &faces, const std::vector< Eigen::Vector3d > &vertices)
Compute edge lengths for all triangles Matches MATLAB: patchEdgeLengths(F, V)
DIC3Dcombined 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....
std::vector< int > 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< int > 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.
std::pair< std::vector< bool >, std::vector< bool > > 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,...
std::vector< bool > 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).