Gazebo Rendering

API Reference

7.4.2
CameraLens Class Reference

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
 
CameraLensoperator= (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]

Constructor.

◆ ~CameraLens()

virtual ~CameraLens ( )
virtual

Destructor.

◆ CameraLens() [2/2]

CameraLens ( const CameraLens _other)
explicit

Constructor.

Parameters
[in]_otherThe 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]_fInput 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]_otherThe 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]_funAngle transform function

◆ SetC1()

void SetC1 ( double  _c)

Sets c1 parameter.

Parameters
[in]_cc1 parameter

◆ SetC2()

void SetC2 ( double  _c)

Sets c2 parameter.

Parameters
[in]_cc2 parameter

◆ SetC3()

void SetC3 ( double  _c)

Sets c3 parameter.

Parameters
[in]_cc3 parameter

◆ SetCustomMappingFunction()

void SetCustomMappingFunction ( double  _c1,
double  _c2,
AngleFunctionType  _fun,
double  _f,
double  _c3 
)

Set custom camera lens with specified parameters.

Parameters
[in]_c1Image scaling factor
[in]_c2Angle scaling factor
[in]_funAngle transform function
[in]_fFocal length of the optical system
[in]_c3Angle shift parameter, should be 0 in most cases

◆ SetCutOffAngle()

void SetCutOffAngle ( double  _angle)

Sets cut-off angle.

Parameters
[in]_anglecut-off angle

◆ SetF()

void SetF ( double  _f)

Sets f parameter.

Parameters
[in]_ff 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]_scaletrue if it should, note: c1 and f parameters are ignored in this case

◆ SetType()

void SetType ( MappingFunctionType  _type)

Set lens projection type.

Parameters
[in]_typeLens 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: