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. More... | |
CameraLens (const CameraLens &_other) | |
Constructor. More... | |
virtual | ~CameraLens () |
Destructor. More... | |
AngleFunctionType | AngleFunction () const |
Gets angle transform function. More... | |
float | ApplyMappingFunction (float _f) const |
Apply mapping function to input number. More... | |
double | C1 () const |
Gets c1 parameter. More... | |
double | C2 () const |
Gets c2 parameter. More... | |
double | C3 () const |
Gets c3 parameter. More... | |
double | CutOffAngle () const |
Gets cut off angle. More... | |
double | F () const |
Gets f parameter. More... | |
bool | IsCustom () const |
Checks if lens type is of the custom type. More... | |
math::Vector3d | MappingFunctionAsVector3d () const |
CameraLens & | operator= (const CameraLens &_other) |
Assignment operator. More... | |
bool | ScaleToHFOV () const |
Checks if image should be scaled to fit horizontal FOV. More... | |
void | SetAngleFunction (AngleFunctionType _fun) |
Sets angle transform function. More... | |
void | SetC1 (double _c) |
Sets c1 parameter. More... | |
void | SetC2 (double _c) |
Sets c2 parameter. More... | |
void | SetC3 (double _c) |
Sets c3 parameter. More... | |
void | SetCustomMappingFunction (double _c1, double _c2, AngleFunctionType _fun, double _f, double _c3) |
Set custom camera lens with specified parameters. More... | |
void | SetCutOffAngle (double _angle) |
Sets cut-off angle. More... | |
void | SetF (double _f) |
Sets f parameter. More... | |
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. More... | |
void | SetType (MappingFunctionType _type) |
Set lens projection type. More... | |
MappingFunctionType | Type () const |
Get lens projection type. More... | |
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: