SDK Calibration IO

std::vector<cv::Mat> Metavision::calib::load_detection_images(const std::filesystem::path &input_directory)

Loads pattern detection images from a directory.

Those images were generated during the pattern detection process and correspond to the images used to detect the pattern or images generated for visualization purposes.

Parameters

input_directory – Directory containing the pattern detection images

Throws

std::runtime_error – if the input directory does not exist

Returns

The loaded pattern detection images

class DetectionLogger

Logs pattern detections to disk.

ExtrinsicsReport Metavision::calib::extrinsics_report_from_json_string(const std::string &json)

Loads an extrinsics report from a serialized JSON string.

Parameters

json – The JSON string to load the extrinsics report from

Returns

The loaded extrinsics report

IntrinsicsReport Metavision::calib::intrinsics_report_from_json_string(const std::string &json)

Loads an intrinsics report from a serialized JSON string.

Parameters

json – The JSON string to load the intrinsics report from

Returns

The loaded intrinsics report

Pattern Metavision::calib::pattern_from_json_file(const std::filesystem::path &json_file)

Loads a pattern from a JSON file.

Parameters

json_file – The path to the JSON file to load the pattern from

Returns

The loaded pattern

Pattern Metavision::calib::pattern_from_json_string(const std::string &json)

Loads a pattern from a serialized JSON string.

Parameters

json – The JSON string to load the pattern from

Returns

The loaded pattern

PatternDetection Metavision::calib::detection_from_json_string(const std::string &json)

Loads a pattern detection from a serialized JSON string.

Parameters

json – The JSON string to load the pattern detection from

Returns

The loaded pattern detection

std::string Metavision::calib::detection_to_json_string(const PatternDetection &detection)

Serializes a pattern detection to a JSON string.

Parameters

detection – The pattern detection to serialize

Returns

The serialized JSON string

std::string Metavision::calib::extrinsics_report_to_json_string(const ExtrinsicsReport &extrinsics_report)

Serializes an extrinsics report to a JSON string.

Parameters

extrinsics_report – The extrinsics report to serialize

Returns

The serialized JSON string

std::string Metavision::calib::intrinsics_report_to_json_string(const IntrinsicsReport &intrinsics_report)

Serializes an intrinsics report to a JSON string.

Parameters

intrinsics_report – The intrinsics report to serialize

Returns

The serialized JSON string

std::string Metavision::calib::pattern_to_json_string(const Pattern &pattern)

Serializes a pattern to a JSON string.

Parameters

pattern – The pattern to serialize

Returns

The serialized JSON string

std::vector<PatternDetection> Metavision::calib::detections_from_json_string(const std::string &json)

Loads pattern detections from a serialized JSON string.

Parameters

json – The JSON string to load the pattern detections from

Returns

The loaded pattern detections