8 #ifndef META_OCEAN_IO_CAMERA_CALIBRATION_MANAGER_H
9 #define META_OCEAN_IO_CAMERA_CALIBRATION_MANAGER_H
78 typedef std::pair<unsigned int, unsigned int>
Resolution;
126 typedef std::map<std::string, std::string>
AliasMap;
Device calibration object.
Definition: CameraCalibrationManager.h:70
ResolutionMap resolutionMap_
Resolution map.
Definition: CameraCalibrationManager.h:115
bool addResolution(const PinholeCamera &camera, const Priority priority)
Adds a new calibration for a specific frame resolution.
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::map< Resolution, CameraPair > ResolutionMap
Definition of a map mapping image resolutions to camera objects.
Definition: CameraCalibrationManager.h:88
std::pair< PinholeCamera, Priority > CameraPair
Definition of a pair of camera and priority values.
Definition: CameraCalibrationManager.h:83
std::pair< unsigned int, unsigned int > Resolution
Definition of a image resolution.
Definition: CameraCalibrationManager.h:78
This class implements a camera calibration manager as singleton.
Definition: CameraCalibrationManager.h:31
bool hasCalibration(const std::string &device) const
Returns whether this manager holds a valid camera profile for a specified device.
AliasMap aliasMap_
Map holding alias names.
Definition: CameraCalibrationManager.h:201
bool registerCalibration(const std::string &camera, const PinholeCamera &calibration)
Registers a new camera calibration.
bool registerAlias(const std::string &camera, const std::string &alias)
Registers an alias camera name.
~CameraCalibrationManager()
Destructs the manager.
bool registerCalibration(const std::string &camera, const unsigned int width, const unsigned int height, const Scalar fovX)
Registers a new camera calibration.
DeviceMap deviceMap_
Map holding all registered devices.
Definition: CameraCalibrationManager.h:198
Lock lock_
The lock of this manager.
Definition: CameraCalibrationManager.h:204
std::map< std::string, std::string > AliasMap
Definition of a map mapping alias device names to device names.
Definition: CameraCalibrationManager.h:126
CameraCalibrationManager()
Creates a new manager.
bool registerCalibrationFile(const std::string &url)
Registers a new camera calibration file.
Priority
Definition of different priority values for the camera calibrations.
Definition: CameraCalibrationManager.h:40
@ PRIORITY_LOW
Low priority.
Definition: CameraCalibrationManager.h:42
@ PRIORITY_MEDIUM
Medium priority.
Definition: CameraCalibrationManager.h:44
@ PRIORITY_HIGH
High priority.
Definition: CameraCalibrationManager.h:46
std::map< std::string, Device > DeviceMap
Definition of a map mapping device names to device objects.
Definition: CameraCalibrationManager.h:121
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.
Quality
Definition of different calibration qualities.
Definition: CameraCalibrationManager.h:55
@ QUALITY_INTERPOLATED
Interpolated calibration.
Definition: CameraCalibrationManager.h:59
@ QUALITY_EXACT
Exact calibration.
Definition: CameraCalibrationManager.h:57
This class implements a recursive lock object.
Definition: Lock.h:31
static constexpr T deg2rad(const T deg)
Converts deg to rad.
Definition: Numeric.h:3232
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:128
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15