CPPxDIC
C++ Digital Image Correlation library for fingertip 3D reconstruction
Loading...
Searching...
No Matches
cppxdic::StepDWorkflow Class Reference

StepDWorkflow class Implements the complete 2D DIC analysis workflow Equivalent to stepD_2DDIC.m in Matlab. More...

#include <step_d_workflow.h>

Public Member Functions

 StepDWorkflow (const Config &config)
 Constructor.
 
std::tuple< std::string, std::vector< int >, bool > execute (const std::string &trial, int stereopair, const StagePlan &plan=StagePlan{})
 Execute Step D: 2D DIC Analysis Main entry point for 2D DIC processing.
 

Static Public Member Functions

static bool updateMaskAndSeedFromOutput (const cv::Mat &input_mask, const SeedPoint &input_seed, const ncorr::DIC_analysis_output &dic_output, cv::Mat &output_mask, SeedPoint &output_seed)
 Map an ROI mask and seed point through the first displacement field.
 
static void formatDic2DPairResults (const Config &config, const StepParameters &step_params, const std::string &output_path, int cam_1, int cam_2, const std::vector< int > &pairOrder, bool pairForced)
 Format cached ncorr outputs into myDIC2DpairResults (step2_dic_finish equivalent).
 

Detailed Description

StepDWorkflow class Implements the complete 2D DIC analysis workflow Equivalent to stepD_2DDIC.m in Matlab.

Definition at line 27 of file step_d_workflow.h.

Constructor & Destructor Documentation

◆ StepDWorkflow()

cppxdic::StepDWorkflow::StepDWorkflow ( const Config &  config)
explicit

Constructor.

Parameters
configGlobal configuration

Definition at line 101 of file step_d_workflow.cpp.

Member Function Documentation

◆ execute()

std::tuple< std::string, std::vector< int >, bool > cppxdic::StepDWorkflow::execute ( const std::string &  trial,
int  stereopair,
const StagePlan &  plan = StagePlan{} 
)

Execute Step D: 2D DIC Analysis Main entry point for 2D DIC processing.

Parameters
trialTrial ID string (e.g., "005")
stereopairStereo pair number (1 or 2)
planWhich sub-steps to perform (matching / tracking / format) and optional per-camera narrowing. Defaults to the full Step D.
Returns
Tuple of (outputPath, pairOrder, pairForced)

Definition at line 107 of file step_d_workflow.cpp.

◆ formatDic2DPairResults()

void cppxdic::StepDWorkflow::formatDic2DPairResults ( const Config &  config,
const StepParameters &  step_params,
const std::string &  output_path,
int  cam_1,
int  cam_2,
const std::vector< int > &  pairOrder,
bool  pairForced 
)
static

Format cached ncorr outputs into myDIC2DpairResults (step2_dic_finish equivalent).

Loads ncorr{cam_1}.bin, ncorr{cam_2}.bin and ncorr{cam_1}{cam_2}.bin from output_path and writes myDIC2DpairResults_C_{cam_1}_C_{cam_2}.<ext>. Shared with the other xDIC modes, where cam_1/cam_2 are logical view numbers.

Parameters
configGlobal configuration (data_format, replacebadcorr, ...)
step_paramsTracking DIC parameters recorded in ncorrInfo
output_pathPer-trial/per-pair output directory holding the .bin caches
cam_1Reference camera/view id
cam_2Deformed camera/view id
pairOrderTrial-level stitch order metadata
pairForcedTrial-level forced-stitch metadata

Definition at line 869 of file step_d_workflow.cpp.

◆ updateMaskAndSeedFromOutput()

bool cppxdic::StepDWorkflow::updateMaskAndSeedFromOutput ( const cv::Mat &  input_mask,
const SeedPoint &  input_seed,
const ncorr::DIC_analysis_output &  dic_output,
cv::Mat &  output_mask,
SeedPoint &  output_seed 
)
static

Map an ROI mask and seed point through the first displacement field.

Equivalent to the map_pointcoordinate/map_subset2pixel + ROI update that stepD_2DDIC*.m performs after each ncorr matching call. Stateless, so it is shared with the other xDIC modes (e.g. mirrored).

Definition at line 1136 of file step_d_workflow.cpp.


The documentation for this class was generated from the following files: