11#include <opencv2/opencv.hpp>
34 const cv::Mat& reference_image);
61 const cv::Mat& roi_mask);
71 static std::vector<int>
mapPixel2Subset(
const std::vector<int>& pixel_coords,
82 static std::vector<int>
mapSubset2Pixel(
const std::vector<int>& subset_coords,
95 const cv::Mat& U_mapped,
96 const cv::Mat& V_mapped);
110 cv::Mat& refmask_REF,
111 cv::Mat& refmask_trial,
130 static std::vector<int>
findROICenter(
const cv::Mat& roi_mask);
152 static cv::Point2f computeROICenterOfMass(
const cv::Mat& roi_mask);
ROIManager class Manages ROI masks and seed points for DIC analysis.
static std::vector< int > mapSubset2Pixel(const std::vector< int > &subset_coords, int subset_spacing)
Map subset coordinates to pixel coordinates Equivalent to map_subset2pixel.m.
static std::vector< int > findROICenter(const cv::Mat &roi_mask)
Find center of ROI mask.
static std::vector< int > mapPointCoordinate(const std::vector< int > &point_sw, const cv::Mat &U_mapped, const cv::Mat &V_mapped)
Map point coordinates using displacement fields Equivalent to map_pointcoordinate....
static SeedPoint loadSeedFromMat(const std::string &seed_file)
Load seed point from MAT file.
static std::vector< int > mapPixel2Subset(const std::vector< int > &pixel_coords, int subset_spacing)
Map pixel coordinates to subset coordinates Equivalent to map_pixel2subset.m.
static cv::Mat loadROIFromMat(const std::string &roi_file)
Load ROI mask from MAT file.
static ncorr::ROI2D matToNcorrROI(const cv::Mat &mask)
Convert OpenCV Mat to ncorr ROI2D.
static SeedPoint loadOrCreateSeed(const BaseParameters ¶ms, const cv::Mat &roi_mask)
Load or create seed point If seed file doesn't exist, creates a default seed point at ROI center.
static bool loadMatchingResults(const std::string &matching_file, cv::Mat &refmask_REF, cv::Mat &refmask_trial, cv::Mat &U_mapped, cv::Mat &V_mapped, int subset_spacing)
Load matching results from MAT file Extracts ROI masks and displacement fields from matching file.
static cv::Mat loadOrCreateROI(const BaseParameters ¶ms, const cv::Mat &reference_image)
Load or create ROI mask If ROI file doesn't exist, creates a full-image ROI Equivalent to checking an...
static cv::Mat createFullROI(const cv::Size &image_size)
Create default ROI mask (full image)
static cv::Mat ncorrROIToMat(const ncorr::ROI2D &roi)
Convert ncorr ROI2D to OpenCV Mat.
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...
Seed point structure Stores seed points in both pixel world (pw) and subset world (sw) coordinates.