46 std::tuple<std::string, std::vector<int>,
bool>
execute(
const std::string& trial,
58 const ncorr::DIC_analysis_output& dic_output,
79 const std::string& output_path,
82 const std::vector<int>& pairOrder,
100 void setupBaseParameters(
const std::string& trial,
102 const std::string& reftrial);
107 void setupStepParameters();
122 std::string determineReferenceTrial(
const std::string& trial);
134 bool importVideoFrames(
const std::string& trial,
136 std::vector<cv::Mat>& cam_first_raw,
137 std::vector<cv::Mat>& cam_second_raw,
148 void performSaturation(
const std::vector<cv::Mat>& cam_first_raw,
149 const std::vector<cv::Mat>& cam_second_raw,
150 std::vector<cv::Mat>& cam_first_satur,
151 std::vector<cv::Mat>& cam_second_satur);
164 bool initializeROIAndSeed(
const std::vector<cv::Mat>& cam_first_satur,
165 cv::Mat& refmask_REF,
166 cv::Mat& refmask_trial,
183 bool matchingInitialFrame(
const std::vector<cv::Mat>& cam_ref,
184 const std::vector<cv::Mat>& cam_cur,
185 const cv::Mat& refmask_ref,
186 const std::string ncorr_matching_path,
187 const std::string message,
189 cv::Mat& refmask_cur_matched,
203 bool performMatching(
const std::vector<cv::Mat>& cam_first_satur,
204 const std::vector<cv::Mat>& cam_second_satur,
205 cv::Mat& refmask_trial,
207 cv::Mat& refmask_trial_matched,
219 bool performTracking(
const int tracking_number,
220 const std::vector<cv::Mat>& cam_frames,
221 const cv::Mat& refmask,
232 bool performTracking1(
const std::vector<cv::Mat>& cam_first,
233 const cv::Mat& refmask_trial,
234 const SeedPoint& initial_seed_point_set1);
244 bool performTracking2(
const std::vector<cv::Mat>& cam_second,
245 const cv::Mat& refmask_trial_matched,
246 const SeedPoint& initial_seed_point_set2);
257 void applyImageFiltering(
const std::vector<cv::Mat>& cam_first_satur,
258 const std::vector<cv::Mat>& cam_second_satur,
259 const cv::Mat& refmask_trial,
260 std::vector<cv::Mat>& cam_first,
261 std::vector<cv::Mat>& cam_second);
270 void saveTrialInfo(
const std::string& trial,
int stereopair,
int num_frames);
280 void formatOutput(
const std::string& trial,
282 const std::vector<int>& pairOrder,
288 void writeNcorrMatSidecar(
const std::string& output_path,
289 const cv::Mat& ref_img,
290 const std::vector<cv::Mat>& cur_imgs,
291 const cv::Mat& roi_mask,
293 const ncorr::DIC_analysis_output& dic_output)
const;
298 void writeMatchingDebugPanel(
const std::string& stage_name,
299 const cv::Mat& ref_img,
300 const cv::Mat& cur_img,
301 const cv::Mat& mask_before,
302 const cv::Mat& mask_after,
305 const ncorr::DIC_analysis_output& dic_output)
const;
319 ncorr::DIC_analysis_output runNcorrAnalysis(
const cv::Mat& ref_img,
320 const std::vector<cv::Mat>& cur_imgs,
321 const cv::Mat& roi_mask,
324 const std::string& output_path,
325 const bool go_parallel,
326 const bool use_no_update =
false);
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).