42 const std::uint8_t*
data =
nullptr;
60 ImageBuffer(
const std::uint8_t* data_,
int width_,
int height_,
int channels_ = 1)
90 std::vector<double>
u;
92 std::vector<double>
v;
194 std::unique_ptr<
Impl> impl_;
Drives an in-memory Digital Image Correlation session.
void set_roi(const ImageBuffer &roi_mask)
Optionally supply a region-of-interest mask.
~NcorrSession()
Destructor (defined in session.cpp because of the PIMPL).
void set_reference(const ImageBuffer &ref)
Set the reference (undeformed) frame.
bool has_reference() const
DICResult process_frame(const ImageBuffer &def)
Push a deformed frame and run DIC against the reference.
NcorrSession(NcorrSession &&) noexcept
Result of running DIC on a single deformed frame.
int height
Height of the displacement fields, in reduced-grid samples.
std::vector< double > v
Vertical Lagrangian displacement (v), pixels, row-major. NaN outside ROI.
bool valid
True if the frame was processed successfully.
int width
Width of the displacement fields, in reduced-grid samples.
std::vector< double > u
Horizontal Lagrangian displacement (u), pixels, row-major. NaN outside ROI.
std::vector< double > corrcoef
Per-point correlation coefficient, row-major, size width*height. NaN outside ROI.
std::string message
Human-readable status / error message (empty on success).
Thin, non-owning view over a raw image in memory.
const std::uint8_t * data
Pointer to the first byte of the (row-major, interleaved) pixel data.
std::size_t size_bytes() const
int channels
Number of interleaved channels per pixel (1 = grayscale, 3 = BGR, ...).
int width
Image width in pixels.
int height
Image height in pixels.
ImageBuffer()=default
Default-construct an empty (invalid) buffer.
ImageBuffer(const std::uint8_t *data_, int width_, int height_, int channels_=1)
Construct an image buffer view.
Configuration for an in-memory DIC session.
int scalefactor
Pyramid scale factor (downsampling level for the seed search).
int subregion_radius
Subregion (correlation window) radius in pixels.
bool debug
Enable verbose debug output from the engine.
int num_threads
Number of worker threads for parallel analysis.
int strain_radius
Strain subregion radius in pixels.