8#ifndef META_OCEAN_IO_LEGACY_CAMERA_CALIBRATION_MANAGER_H
9#define META_OCEAN_IO_LEGACY_CAMERA_CALIBRATION_MANAGER_H
78 using Resolution = std::pair<unsigned int, unsigned int>;
126 using AliasMap = std::map<std::string, std::string>;
174 PinholeCamera camera(
const std::string& device,
const unsigned int width,
const unsigned int height,
Quality* quality =
nullptr,
const Scalar defaultFovX = Numeric::deg2rad(45))
const;
Device calibration object.
Definition LegacyCameraCalibrationManager.h:70
PinholeCamera camera(const unsigned int width, const unsigned int height, Quality *quality, const Scalar defaultFovX=Numeric::deg2rad(45)) const
Returns a calibration for a specific frame resolution.
std::pair< PinholeCamera, Priority > CameraPair
Definition of a pair of camera and priority values.
Definition LegacyCameraCalibrationManager.h:83
std::map< Resolution, CameraPair > ResolutionMap
Definition of a map mapping image resolutions to camera objects.
Definition LegacyCameraCalibrationManager.h:88
bool addResolution(const PinholeCamera &camera, const Priority priority)
Adds a new calibration for a specific frame resolution.
std::pair< unsigned int, unsigned int > Resolution
Definition of a image resolution.
Definition LegacyCameraCalibrationManager.h:78
ResolutionMap resolutionMap_
Resolution map.
Definition LegacyCameraCalibrationManager.h:115
This class implements a camera calibration manager as singleton.
Definition LegacyCameraCalibrationManager.h:31
Priority
Definition of different priority values for the camera calibrations.
Definition LegacyCameraCalibrationManager.h:40
@ PRIORITY_MEDIUM
Medium priority.
Definition LegacyCameraCalibrationManager.h:44
@ PRIORITY_LOW
Low priority.
Definition LegacyCameraCalibrationManager.h:42
@ PRIORITY_HIGH
High priority.
Definition LegacyCameraCalibrationManager.h:46
~LegacyCameraCalibrationManager()
Destructs the manager.
bool registerCalibration(const std::string &camera, const PinholeCamera &calibration)
Registers a new camera calibration.
PinholeCamera camera(const std::string &device, const unsigned int width, const unsigned int height, Quality *quality=nullptr, const Scalar defaultFovX=Numeric::deg2rad(45)) const
Returns a calibration for a specific device with a specific frame resolution.
LegacyCameraCalibrationManager()
Creates a new manager.
Lock lock_
The lock of this manager.
Definition LegacyCameraCalibrationManager.h:204
std::map< std::string, std::string > AliasMap
Definition of a map mapping alias device names to device names.
Definition LegacyCameraCalibrationManager.h:126
Quality
Definition of different calibration qualities.
Definition LegacyCameraCalibrationManager.h:55
@ QUALITY_EXACT
Exact calibration.
Definition LegacyCameraCalibrationManager.h:57
@ QUALITY_INTERPOLATED
Interpolated calibration.
Definition LegacyCameraCalibrationManager.h:59
AliasMap aliasMap_
Map holding alias names.
Definition LegacyCameraCalibrationManager.h:201
std::map< std::string, Device > DeviceMap
Definition of a map mapping device names to device objects.
Definition LegacyCameraCalibrationManager.h:121
bool registerCalibration(const std::string &camera, const unsigned int width, const unsigned int height, const Scalar fovX)
Registers a new camera calibration.
bool registerCalibrationFile(const std::string &url)
Registers a new camera calibration file.
bool registerAlias(const std::string &camera, const std::string &alias)
Registers an alias camera name.
DeviceMap deviceMap_
Map holding all registered devices.
Definition LegacyCameraCalibrationManager.h:198
bool hasCalibration(const std::string &device) const
Returns whether this manager holds a valid camera profile for a specified device.
This class implements a recursive lock object.
Definition Lock.h:31
This template class is the base class for all singleton objects.
Definition Singleton.h:71
float Scalar
Definition of a scalar type.
Definition Math.h:129
The namespace covering the entire Ocean framework.
Definition Accessor.h:15