|
CppNCorr
C++ ncorr Digital Image Correlation engine
|
Drives an in-memory Digital Image Correlation session. More...
#include <session.h>
Classes | |
| struct | Impl |
Public Member Functions | |
| NcorrSession (const SessionConfig &config=SessionConfig()) | |
| Construct a session with the given configuration. | |
| ~NcorrSession () | |
| Destructor (defined in session.cpp because of the PIMPL). | |
| NcorrSession (NcorrSession &&) noexcept | |
| NcorrSession & | operator= (NcorrSession &&) noexcept |
| NcorrSession (const NcorrSession &)=delete | |
| NcorrSession & | operator= (const NcorrSession &)=delete |
| void | set_reference (const ImageBuffer &ref) |
| Set the reference (undeformed) frame. | |
| void | set_roi (const ImageBuffer &roi_mask) |
| Optionally supply a region-of-interest mask. | |
| DICResult | process_frame (const ImageBuffer &def) |
| Push a deformed frame and run DIC against the reference. | |
| bool | has_reference () const |
Drives an in-memory Digital Image Correlation session.
Typical lifecycle:
The session owns a private implementation (PIMPL) so that this header stays free of heavy internal ncorr includes.
Each call to process_frame runs a full DIC_analysis on {reference, deformed} and returns the native Lagrangian pixel displacements (and correlation coefficient) on the reduced analysis grid.
|
explicit |
Construct a session with the given configuration.
| config | Tuneable DIC parameters (defaults match Config). |
Definition at line 61 of file session.cpp.
|
default |
Destructor (defined in session.cpp because of the PIMPL).
|
defaultnoexcept |
|
delete |
| bool ncorr::NcorrSession::has_reference | ( | ) | const |
Definition at line 175 of file session.cpp.
|
delete |
|
defaultnoexcept |
| DICResult ncorr::NcorrSession::process_frame | ( | const ImageBuffer & | def | ) |
Push a deformed frame and run DIC against the reference.
| def | Deformed image buffer (same geometry as the reference). |
valid is false and message explains why. | std::logic_error | if no reference has been set. |
Definition at line 97 of file session.cpp.
| void ncorr::NcorrSession::set_reference | ( | const ImageBuffer & | ref | ) |
Set the reference (undeformed) frame.
Call once before processing.
The pixel data is copied into the session, so ref need not outlive the call. Calling again replaces the reference and invalidates prior state.
| ref | Reference image buffer. |
| std::invalid_argument | if ref is not valid(). |
Definition at line 68 of file session.cpp.
| void ncorr::NcorrSession::set_roi | ( | const ImageBuffer & | roi_mask | ) |
Optionally supply a region-of-interest mask.
The mask must match the reference geometry; any pixel whose grayscale value exceeds 0.5 marks a point to analyse. If never called, the whole frame is analysed. Setting a new reference clears any prior ROI.
| roi_mask | ROI mask buffer (same width/height as the reference). |
| std::invalid_argument | if the mask is invalid or, when a reference is set, its geometry does not match the reference. |
Definition at line 82 of file session.cpp.