|
Ocean
|
This class implements a camera calibration manager as singleton. More...
#include <CameraCalibrationManager.h>
Data Structures | |
| class | Device |
| Device calibration object. More... | |
Public Types | |
| enum | Priority { PRIORITY_LOW , PRIORITY_MEDIUM , PRIORITY_HIGH , PRIORITY_EXPLICIT } |
| Definition of different priority values for the camera calibrations. More... | |
| enum | Quality { QUALITY_EXACT , QUALITY_INTERPOLATED , QUALITY_DEFAULT } |
| Definition of different calibration qualities. More... | |
Public Member Functions | |
| 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 | 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. | |
| 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. | |
| bool | hasCalibration (const std::string &device) const |
| Returns whether this manager holds a valid camera profile for a specified device. | |
Protected Types | |
| typedef std::map< std::string, Device > | DeviceMap |
| Definition of a map mapping device names to device objects. | |
| typedef std::map< std::string, std::string > | AliasMap |
| Definition of a map mapping alias device names to device names. | |
Protected Member Functions | |
| CameraCalibrationManager () | |
| Creates a new manager. | |
| ~CameraCalibrationManager () | |
| Destructs the manager. | |
Protected Member Functions inherited from Ocean::Singleton< CameraCalibrationManager > | |
| Singleton ()=default | |
| Default constructor. | |
Protected Attributes | |
| DeviceMap | deviceMap_ |
| Map holding all registered devices. | |
| AliasMap | aliasMap_ |
| Map holding alias names. | |
| Lock | lock_ |
| The lock of this manager. | |
Friends | |
| class | Singleton< CameraCalibrationManager > |
Additional Inherited Members | |
Static Public Member Functions inherited from Ocean::Singleton< CameraCalibrationManager > | |
| static CameraCalibrationManager & | get () |
| Returns a reference to the unique object. | |
This class implements a camera calibration manager as singleton.
The manager organizes camera calibrations with different dimensions.
|
protected |
Definition of a map mapping alias device names to device names.
|
protected |
Definition of a map mapping device names to device objects.
|
protected |
Creates a new manager.
|
protected |
Destructs the manager.
| PinholeCamera Ocean::IO::CameraCalibrationManager::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.
| device | Name of the device |
| width | The width of the frame in pixel, with range [1, infinity) |
| height | The height of the frame in pixel, with range [1, infinity) |
| quality | Optional resulting quality of the calibration |
| defaultFovX | The default horizontal field of view the resulting camera profile will provide if no camera calibration exists for the specified device, with range (0, PI) |
| bool Ocean::IO::CameraCalibrationManager::hasCalibration | ( | const std::string & | device | ) | const |
Returns whether this manager holds a valid camera profile for a specified device.
| device | The name of the device to check |
| bool Ocean::IO::CameraCalibrationManager::registerAlias | ( | const std::string & | camera, |
| const std::string & | alias | ||
| ) |
Registers an alias camera name.
| camera | Original camera name |
| alias | Alias camera name |
| bool Ocean::IO::CameraCalibrationManager::registerCalibration | ( | const std::string & | camera, |
| const PinholeCamera & | calibration | ||
| ) |
Registers a new camera calibration.
This explicit calibration will receive the highest priority.
| camera | Name of the device or camera |
| calibration | The camera calibration profile |
| bool Ocean::IO::CameraCalibrationManager::registerCalibration | ( | const std::string & | camera, |
| const unsigned int | width, | ||
| const unsigned int | height, | ||
| const Scalar | fovX | ||
| ) |
Registers a new camera calibration.
| camera | Name or url of the camera to register |
| width | The width of the camera resolution in pixel, with range [1, infinity) |
| height | The height of the camera resolution in pixel, with range [1, infinity) |
| fovX | Horizontal field of view in radian, with range (0, PI) |
| bool Ocean::IO::CameraCalibrationManager::registerCalibrationFile | ( | const std::string & | url | ) |
Registers a new camera calibration file.
The file must have a specific file format.
| url | Url of the calibration file |
|
friend |
|
protected |
Map holding alias names.
|
protected |
Map holding all registered devices.
|
mutableprotected |
The lock of this manager.