Describes a lens of a camera as amapping function of type r = c1*f*fun(theta/c2+c3) More...
#include <CameraLens.hh>
Public Member Functions | |
CameraLens () | |
Constructor. | |
CameraLens (const CameraLens &_other) | |
Constructor. | |
virtual | ~CameraLens () |
Destructor. | |
AngleFunctionType | AngleFunction () const |
Gets angle transform function. | |
float | ApplyMappingFunction (float _f) const |
Apply mapping function to input number. | |
double | C1 () const |
Gets c1 parameter. | |
double | C2 () const |
Gets c2 parameter. | |
double | C3 () const |
Gets c3 parameter. | |
double | CutOffAngle () const |
Gets cut off angle. | |
double | F () const |
Gets f parameter. | |
bool | IsCustom () const |
Checks if lens type is of the custom type. | |
math::Vector3d | MappingFunctionAsVector3d () const |
CameraLens & | operator= (const CameraLens &_other) |
Assignment operator. | |
bool | ScaleToHFOV () const |
Checks if image should be scaled to fit horizontal FOV. | |
void | SetAngleFunction (AngleFunctionType _fun) |
Sets angle transform function. | |
void | SetC1 (double _c) |
Sets c1 parameter. | |
void | SetC2 (double _c) |
Sets c2 parameter. | |
void | SetC3 (double _c) |
Sets c3 parameter. | |
void | SetCustomMappingFunction (double _c1, double _c2, AngleFunctionType _fun, double _f, double _c3) |
Set custom camera lens with specified parameters. | |
void | SetCutOffAngle (double _angle) |
Sets cut-off angle. | |
void | SetF (double _f) |
Sets f parameter. | |
void | SetScaleToHFOV (bool _scale) |
Sets whether the image should be scaled to fit horizontal FOV If True, the projection will compute a new focal length for achieving the desired FOV. | |
void | SetType (MappingFunctionType _type) |
Set lens projection type. | |
MappingFunctionType | Type () const |
Get lens projection type. | |
Detailed Description
Describes a lens of a camera as amapping function of type r = c1*f*fun(theta/c2+c3)
Constructor & Destructor Documentation
◆ CameraLens() [1/2]
CameraLens | ( | ) |
Constructor.
◆ ~CameraLens()
|
virtual |
Destructor.
◆ CameraLens() [2/2]
|
explicit |
Constructor.
- Parameters
-
[in] _other The other camera lens
Member Function Documentation
◆ AngleFunction()
AngleFunctionType AngleFunction | ( | ) | const |
Gets angle transform function.
- Returns
- Angle transform function
◆ ApplyMappingFunction()
float ApplyMappingFunction | ( | float | _f | ) | const |
Apply mapping function to input number.
- Parameters
-
[in] _f Input floating point number to apply the mapping function to.
- Returns
- Result of the application
◆ C1()
double C1 | ( | ) | const |
Gets c1 parameter.
- Returns
- c1 parameter
◆ C2()
double C2 | ( | ) | const |
Gets c2 parameter.
- Returns
- c2 parameter
◆ C3()
double C3 | ( | ) | const |
Gets c3 parameter.
- Returns
- c3 parameter
◆ CutOffAngle()
double CutOffAngle | ( | ) | const |
Gets cut off angle.
- Returns
- Cut off angle
◆ F()
double F | ( | ) | const |
Gets f parameter.
- Returns
- f parameter
◆ IsCustom()
bool IsCustom | ( | ) | const |
Checks if lens type is of the custom type.
- Returns
- True if this->Type() == MFT_CUSTOM
◆ MappingFunctionAsVector3d()
math::Vector3d MappingFunctionAsVector3d | ( | ) | const |
◆ operator=()
CameraLens & operator= | ( | const CameraLens & | _other | ) |
Assignment operator.
- Parameters
-
[in] _other The other camera lens
◆ ScaleToHFOV()
bool ScaleToHFOV | ( | ) | const |
Checks if image should be scaled to fit horizontal FOV.
- Returns
- True if the image will be scaled
◆ SetAngleFunction()
void SetAngleFunction | ( | AngleFunctionType | _fun | ) |
Sets angle transform function.
- Parameters
-
[in] _fun Angle transform function
◆ SetC1()
void SetC1 | ( | double | _c | ) |
Sets c1 parameter.
- Parameters
-
[in] _c c1 parameter
◆ SetC2()
void SetC2 | ( | double | _c | ) |
Sets c2 parameter.
- Parameters
-
[in] _c c2 parameter
◆ SetC3()
void SetC3 | ( | double | _c | ) |
Sets c3 parameter.
- Parameters
-
[in] _c c3 parameter
◆ SetCustomMappingFunction()
void SetCustomMappingFunction | ( | double | _c1, |
double | _c2, | ||
AngleFunctionType | _fun, | ||
double | _f, | ||
double | _c3 | ||
) |
Set custom camera lens with specified parameters.
- Parameters
-
[in] _c1 Image scaling factor [in] _c2 Angle scaling factor [in] _fun Angle transform function [in] _f Focal length of the optical system [in] _c3 Angle shift parameter, should be 0 in most cases
◆ SetCutOffAngle()
void SetCutOffAngle | ( | double | _angle | ) |
Sets cut-off angle.
- Parameters
-
[in] _angle cut-off angle
◆ SetF()
void SetF | ( | double | _f | ) |
Sets f parameter.
- Parameters
-
[in] _f f parameter
◆ SetScaleToHFOV()
void SetScaleToHFOV | ( | bool | _scale | ) |
Sets whether the image should be scaled to fit horizontal FOV If True, the projection will compute a new focal length for achieving the desired FOV.
- Parameters
-
[in] _scale true if it should, note: c1 and f parameters are ignored in this case
◆ SetType()
void SetType | ( | MappingFunctionType | _type | ) |
Set lens projection type.
- Parameters
-
[in] _type Lens projection / mapping function type
◆ Type()
MappingFunctionType Type | ( | ) | const |
Get lens projection type.
- Returns
- Lens projection / mapping function type
The documentation for this class was generated from the following file: