Gazebo Rendering

API Reference

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

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: