dicmain.hpp¶
Functions
-
void DICengine(const py::array_t<double> &img_ref_arr, const py::array_t<double> &img_def_stack_arr, const py::array_t<bool> &img_roi_arr, util::Config &conf, util::SaveConfig &saveconf)¶
Runs the 2D Digital Image Correlation (DIC) engine on input image data.
This function performs 2D DIC using a specified correlation criterion, shape function, interpolation scheme, and scan method. It computes displacement fields by comparing a reference image with a stack of deformed images over a defined region of interest (ROI).
The function supports multiple scan methods including raster scan, brute force, reliability-guided, and Fourier-based approaches. It computes correlation between the reference and deformed images over subsets defined by the ROI.
Subset data is initialized and processed in parallel using OpenMP. Results are optionally saved after each image or at the end of processing, depending on
saveconf.at_end
.Note
This function is intended to be called via the Python interface using pybind11. Image arrays are expected to be contiguous and C-style (row-major) in memory.
- Parameters:
img_ref_arr – A 2D NumPy array (pybind11) representing the reference image.
img_def_stack_arr – A 3D NumPy array containing a stack of deformed images. Each image must have the same dimensions as the reference image.
img_roi_arr – A 2D boolean NumPy array specifying the region of interest (ROI). True values indicate active ROI pixels.
conf – Configuration parameters for the DIC engine (subset size, correlation method, etc.). This is an instance of
util::Config
.saveconf – Output configuration for saving DIC results to disk. This is an instance of
util::SaveConfig
.
-
void build_info()¶
-
void set_num_threads(int n)¶
Sets the number of threads to be used by the DIC engine.
- Parameters:
n – The number of threads to set for the DIC engine.