Calibration Library 1.0.0
A C++ library for camera calibration and vision-related geometric transformations
Loading...
Searching...
No Matches
calib::pipeline::JsonPlanarDatasetLoader Class Referencefinal

Loader that reads planar target detections from JSON files. More...

#include <loaders.h>

Inheritance diagram for calib::pipeline::JsonPlanarDatasetLoader:
Collaboration diagram for calib::pipeline::JsonPlanarDatasetLoader:

Classes

struct  Entry
 Description of a JSON dataset entry on disk. More...
 

Public Member Functions

 JsonPlanarDatasetLoader ()=default
 
 JsonPlanarDatasetLoader (std::vector< Entry > entries)
 
void add_entry (const std::filesystem::path &path, std::optional< std::string > sensor_id=std::nullopt)
 Append a dataset file to the loader queue.
 
auto load () -> CalibrationDataset override
 Load and validate all configured dataset entries.
 
- Public Member Functions inherited from calib::pipeline::DatasetLoader
virtual ~DatasetLoader ()=default
 

Detailed Description

Loader that reads planar target detections from JSON files.

The loader accepts one or more dataset descriptions on disk. Each entry is validated when load() is invoked and the resulting detections are grouped into a single CalibrationDataset.

Definition at line 19 of file loaders.h.

Constructor & Destructor Documentation

◆ JsonPlanarDatasetLoader() [1/2]

calib::pipeline::JsonPlanarDatasetLoader::JsonPlanarDatasetLoader ( )
default

◆ JsonPlanarDatasetLoader() [2/2]

calib::pipeline::JsonPlanarDatasetLoader::JsonPlanarDatasetLoader ( std::vector< Entry entries)
inlineexplicit

Definition at line 34 of file loaders.h.

Member Function Documentation

◆ add_entry()

void calib::pipeline::JsonPlanarDatasetLoader::add_entry ( const std::filesystem::path &  path,
std::optional< std::string >  sensor_id = std::nullopt 
)

Append a dataset file to the loader queue.

Parameters
pathFilesystem location of the JSON payload to consume.
sensor_idOptional identifier to match against the dataset's sensor_id. When specified the loader throws if the file contains detections from a different sensor.

Definition at line 51 of file loaders.cpp.

◆ load()

auto calib::pipeline::JsonPlanarDatasetLoader::load ( ) -> CalibrationDataset
overridevirtual

Load and validate all configured dataset entries.

Exceptions
std::runtime_errorif no entries were configured or if any entry cannot be opened / validated.

Implements calib::pipeline::DatasetLoader.

Definition at line 56 of file loaders.cpp.


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