CPPxDIC
C++ Digital Image Correlation library for fingertip 3D reconstruction
Loading...
Searching...
No Matches
cppxdic::input::ImageFolderReader Class Reference

Reads frames from a folder of image files. More...

#include <image_folder_reader.h>

Public Member Functions

 ImageFolderReader (std::string folder)
 Construct a reader for a given image folder.
 
std::vector< std::string > listFrames (bool skip_roi_ref=true) const
 List image frames in the folder, sorted by filename.
 
const std::string & folder () const
 Decode the listed frames into pixel buffers.
 

Detailed Description

Reads frames from a folder of image files.

Stub status: directory listing + sorted, extension-filtered filename collection works; pixel decoding is not yet implemented.

Definition at line 29 of file image_folder_reader.h.

Constructor & Destructor Documentation

◆ ImageFolderReader()

cppxdic::input::ImageFolderReader::ImageFolderReader ( std::string  folder)
explicit

Construct a reader for a given image folder.

Parameters
folderAbsolute or relative path to the directory containing image frames.

Definition at line 44 of file image_folder_reader.cpp.

Member Function Documentation

◆ folder()

const std::string & cppxdic::input::ImageFolderReader::folder ( ) const
inline

Decode the listed frames into pixel buffers.

Returns
Empty vector for now.
TODO - what "fully implemented" means
  • Decode each frame (cv::imread) into the same single-channel representation the video reader produces (Red channel for RGB inputs, to match MATLAB iloc(:,:,1)).
  • Return frames as in-memory buffers (e.g. std::vector<cv::Mat>) so the DIC pipeline can consume them without a disk round-trip, matching the planned in-memory hand-off in apps/proxyncorr.
  • Honour frame start/end/jump selection consistent with Config (idx_frame_start, etc.).
Returns
The folder this reader was constructed with.

Definition at line 66 of file image_folder_reader.h.

◆ listFrames()

std::vector< std::string > cppxdic::input::ImageFolderReader::listFrames ( bool  skip_roi_ref = true) const

List image frames in the folder, sorted by filename.

Filters to common image extensions (.png .jpg .jpeg .bmp .tif .tiff, case-insensitive), skips hidden files, and optionally skips roi.png / ref.png helper images. Results are sorted lexicographically (zero-padded numeric filenames sort correctly).

Parameters
skip_roi_refIf true (default), excludes files named roi.png and ref.png.
Returns
Sorted list of full frame paths (folder + "/" + filename). Empty if the folder cannot be opened or contains no images.

Definition at line 46 of file image_folder_reader.cpp.


The documentation for this class was generated from the following files: