CPPxDIC
C++ Digital Image Correlation library for fingertip 3D reconstruction
Loading...
Searching...
No Matches
delaunay_triangulation.h
Go to the documentation of this file.
1
6#ifndef DELAUNAY_TRIANGULATION_H
7#define DELAUNAY_TRIANGULATION_H
8
9#include <opencv2/opencv.hpp>
10#include <vector>
11
12namespace cppxdic {
13
19public:
27 static std::vector<int> compute(const std::vector<cv::Point2f>& points);
28
38 static std::vector<int> filterByEdgeLength(const std::vector<int>& faces,
39 const std::vector<cv::Point2f>& vertices,
40 double max_edge_threshold);
41
50 static std::vector<double> computeEdgeLengths(const std::vector<int>& faces,
51 const std::vector<cv::Point2f>& vertices);
52
60 static std::vector<int> flipOrientation(const std::vector<int>& faces);
61
69 static std::vector<cv::Point2f> computeCentroids(const std::vector<int>& faces,
70 const std::vector<cv::Point2f>& vertices);
71
79 static std::vector<double> computeAreas(const std::vector<int>& faces,
80 const std::vector<cv::Point2f>& vertices);
81};
82
83} // namespace cppxdic
84
85#endif // DELAUNAY_TRIANGULATION_H
DelaunayTriangulation class Provides Delaunay triangulation utilities using CGAL.
static std::vector< int > flipOrientation(const std::vector< int > &faces)
Flip triangle orientation Matches MATLAB: F = F(:, [1 3 2])
static std::vector< double > computeEdgeLengths(const std::vector< int > &faces, const std::vector< cv::Point2f > &vertices)
Compute edge lengths for all triangles Matches MATLAB: patchEdgeLengths(F, V)
static std::vector< int > filterByEdgeLength(const std::vector< int > &faces, const std::vector< cv::Point2f > &vertices, double max_edge_threshold)
Filter irregular triangles by edge length Matches MATLAB: F(EdgeLengthsMax > threshold,...
static std::vector< cv::Point2f > computeCentroids(const std::vector< int > &faces, const std::vector< cv::Point2f > &vertices)
Compute face centroids.
static std::vector< double > computeAreas(const std::vector< int > &faces, const std::vector< cv::Point2f > &vertices)
Compute face areas.
static std::vector< int > compute(const std::vector< cv::Point2f > &points)
Compute Delaunay triangulation of 2D points Matches MATLAB: DT = delaunayTriangulation(P)
DataSerializer - Abstract base class for format-agnostic DIC data I/O.