|
CPPxDIC
C++ Digital Image Correlation library for fingertip 3D reconstruction
|
ROIManager class Manages ROI masks and seed points for DIC analysis. More...
#include <roi_manager.h>
Static Public Member Functions | |
| 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 and calling draw_ref_roi in Matlab. | |
| static cv::Mat | loadROIFromMat (const std::string &roi_file) |
| Load ROI mask from MAT file. | |
| static SeedPoint | loadSeedFromMat (const std::string &seed_file) |
| Load seed point from MAT file. | |
| 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 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 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 > | 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.m. | |
| 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 | createFullROI (const cv::Size &image_size) |
| Create default ROI mask (full image) | |
| static std::vector< int > | findROICenter (const cv::Mat &roi_mask) |
| Find center of ROI mask. | |
| static cv::Mat | ncorrROIToMat (const ncorr::ROI2D &roi) |
| Convert ncorr ROI2D to OpenCV Mat. | |
| static ncorr::ROI2D | matToNcorrROI (const cv::Mat &mask) |
| Convert OpenCV Mat to ncorr ROI2D. | |
ROIManager class Manages ROI masks and seed points for DIC analysis.
Definition at line 22 of file roi_manager.h.
|
static |
Create default ROI mask (full image)
| image_size | Size of the image |
Definition at line 270 of file roi_manager.cpp.
|
static |
Find center of ROI mask.
| roi_mask | ROI mask |
Definition at line 276 of file roi_manager.cpp.
|
static |
Load matching results from MAT file Extracts ROI masks and displacement fields from matching file.
| matching_file | Path to matching MAT file |
| refmask_REF | Output: reference ROI mask |
| refmask_trial | Output: trial ROI mask |
| U_mapped | Output: U displacement field |
| V_mapped | Output: V displacement field |
Definition at line 199 of file roi_manager.cpp.
|
static |
Load or create ROI mask If ROI file doesn't exist, creates a full-image ROI Equivalent to checking and calling draw_ref_roi in Matlab.
| params | Base parameters containing file paths |
| reference_image | Reference image for ROI creation |
Definition at line 20 of file roi_manager.cpp.
|
static |
Load or create seed point If seed file doesn't exist, creates a default seed point at ROI center.
| params | Base parameters containing file paths |
| roi_mask | ROI mask |
Definition at line 132 of file roi_manager.cpp.
|
static |
Load ROI mask from MAT file.
| roi_file | Path to ROI MAT file |
Definition at line 31 of file roi_manager.cpp.
|
static |
Load seed point from MAT file.
| seed_file | Path to seed MAT file |
Definition at line 81 of file roi_manager.cpp.
|
static |
Map pixel coordinates to subset coordinates Equivalent to map_pixel2subset.m.
| pixel_coords | Pixel world coordinates [x, y] |
| subset_spacing | Subset spacing parameter |
Definition at line 149 of file roi_manager.cpp.
|
static |
Map point coordinates using displacement fields Equivalent to map_pointcoordinate.m.
| point_sw | Point in subset world coordinates |
| U_mapped | U displacement field (normalized by subset_spacing+1) |
| V_mapped | V displacement field (normalized by subset_spacing+1) |
Definition at line 170 of file roi_manager.cpp.
|
static |
Map subset coordinates to pixel coordinates Equivalent to map_subset2pixel.m.
| subset_coords | Subset world coordinates [x, y] |
| subset_spacing | Subset spacing parameter |
Definition at line 161 of file roi_manager.cpp.
|
static |
Convert OpenCV Mat to ncorr ROI2D.
| mask | OpenCV Mat mask |
Definition at line 297 of file roi_manager.cpp.
|
static |
Convert ncorr ROI2D to OpenCV Mat.
| roi | ncorr ROI2D object |
Definition at line 281 of file roi_manager.cpp.