CPPxDIC
C++ Digital Image Correlation library for fingertip 3D reconstruction
Loading...
Searching...
No Matches
parameters.h
Go to the documentation of this file.
1
7#ifndef PARAMETERS_H
8#define PARAMETERS_H
9
10#include <string>
11#include <vector>
12
13namespace cppxdic {
14
21 // Paths
22 std::string baseDataPath;
23 std::string baseResultPath;
24 std::string outputPath;
25
26 // Trial/Subject information
27 std::string subject;
28 std::string material;
29 std::string trial;
31 std::string phase;
32 std::string reftrial;
33
34 // File paths
35 std::string roifile;
36 std::string matchingfile;
37 std::string seedfile;
38
39 // Frame settings
40 int jump;
43
44 // Processing settings
46
47 // Camera numbers (derived from stereopair)
48 int cam_1;
49 int cam_2;
50
51 // Constructor with defaults
53 stereopair(1), jump(1),
56 cam_1(1), cam_2(2) {}
57};
58
64 bool enabled; // high_strain_analysis
65 std::string type; // seed_propagation type
66 bool auto_update; // auto_ref_change
67 int step; // step_ref_change
68
70 enabled(true), type("seed"),
71 auto_update(true), step(10) {}
72};
73
80 // Analysis settings
81 std::string type; // analysis_direction (e.g., "regular")
82 int radius; // subset_radius_ncorr
83 int spacing; // subset_spacing
84 double cutoff_diffnorm; // cutoff threshold
85 int cutoff_iteration; // number_iteration_solver
86 int total_threads; // number of threads
87
88 // Step analysis parameters
90
91 // Initial seed point (pixel world coordinates)
92 std::vector<int> initial_seed; // [x, y] in pixels
93
94 // Constructor with defaults
96 type("regular"),
97 radius(40),
98 spacing(10),
99 cutoff_diffnorm(1e-5),
100 cutoff_iteration(100),
101 total_threads(4) {}
102};
103
108struct SeedPoint {
109 std::vector<int> pw; // pixel world coordinates [x, y]
110 std::vector<int> sw; // subset world coordinates [x, y]
111
112 SeedPoint() : pw(2, 0), sw(2, 0) {}
113 SeedPoint(int px, int py) : pw{px, py}, sw(2, 0) {}
114};
115
121 std::vector<std::string> dircond; // Direction conditions
122 std::vector<int> nfcond; // Force conditions (N)
123 std::vector<int> spdcond; // Speed conditions
124 std::vector<int> repcond; // Repetition conditions
125 std::vector<double> spddxlcond; // Speed DXL conditions
126
127 // Helper to get pair order based on direction
128 void getPairOrder(const std::string& dir, std::vector<int>& pairOrder, bool& pairForced) const {
129 if (dir == "Ubnf") {
130 pairOrder = {2, 1};
131 pairForced = true;
132 } else if (dir == "Rbnf") {
133 pairOrder = {1, 2};
134 pairForced = true;
135 } else {
136 pairOrder = {1, 2};
137 pairForced = false;
138 }
139 }
140};
141
147 static constexpr int TRUE_FPS = 50;
148 static constexpr int LIMIT_GRAYSCALE_DEFAULT = 70;
149 static constexpr int LIMIT_GRAYSCALE_S8_PLUS = 100;
150
151 // DIC default parameters
152 static constexpr int SUBSET_RADIUS_TRACKING = 40;
153 static constexpr int SUBSET_RADIUS_MATCHING = 60;
154 static constexpr int SUBSET_SPACING = 10;
155 static constexpr double CUTOFF_TRACKING = 1e-5;
156 static constexpr double CUTOFF_MATCHING = 1e-5;
157 static constexpr int NUMBER_ITERATION_SOLVER = 100;
158 static constexpr int NUMBER_THREADS = 4;
159};
160
161} // namespace cppxdic
162
163#endif // PARAMETERS_H
DataSerializer - Abstract base class for format-agnostic DIC data I/O.
Base parameters structure Contains fundamental paths and settings for DIC analysis Equivalent to base...
Definition parameters.h:20
std::string baseResultPath
Definition parameters.h:23
std::string baseDataPath
Definition parameters.h:22
std::string matchingfile
Definition parameters.h:36
DIC constants Global constants used throughout the DIC analysis.
Definition parameters.h:146
static constexpr int NUMBER_ITERATION_SOLVER
Definition parameters.h:157
static constexpr int LIMIT_GRAYSCALE_DEFAULT
Definition parameters.h:148
static constexpr int SUBSET_RADIUS_MATCHING
Definition parameters.h:153
static constexpr double CUTOFF_MATCHING
Definition parameters.h:156
static constexpr int SUBSET_SPACING
Definition parameters.h:154
static constexpr int SUBSET_RADIUS_TRACKING
Definition parameters.h:152
static constexpr int LIMIT_GRAYSCALE_S8_PLUS
Definition parameters.h:149
static constexpr double CUTOFF_TRACKING
Definition parameters.h:155
static constexpr int NUMBER_THREADS
Definition parameters.h:158
static constexpr int TRUE_FPS
Definition parameters.h:147
Protocol information structure Contains trial condition information from protocol MAT file.
Definition parameters.h:120
std::vector< double > spddxlcond
Definition parameters.h:125
std::vector< int > spdcond
Definition parameters.h:123
std::vector< int > repcond
Definition parameters.h:124
std::vector< int > nfcond
Definition parameters.h:122
void getPairOrder(const std::string &dir, std::vector< int > &pairOrder, bool &pairForced) const
Definition parameters.h:128
std::vector< std::string > dircond
Definition parameters.h:121
Seed point structure Stores seed points in both pixel world (pw) and subset world (sw) coordinates.
Definition parameters.h:108
SeedPoint(int px, int py)
Definition parameters.h:113
std::vector< int > sw
Definition parameters.h:110
std::vector< int > pw
Definition parameters.h:109
Step analysis parameters structure Contains high strain analysis settings.
Definition parameters.h:63
Step parameters structure for DIC analysis Contains DIC-specific parameters like radius,...
Definition parameters.h:79
std::vector< int > initial_seed
Definition parameters.h:92
StepAnalysisParams stepanalysis_params
Definition parameters.h:89