Camera distortion based on Brown's model.
More...
#include <rendering/rendering.hh>
Camera distortion based on Brown's model.
Note that the current implementation only supports barrel distortion.
gazebo::rendering::Distortion::Distortion |
( |
| ) |
|
virtual gazebo::rendering::Distortion::~Distortion |
( |
| ) |
|
|
virtual |
Apply distortion model.
- Parameters
-
[in] | _in | Input uv coordinate. |
[in] | _center | Normalized distortion center. |
[in] | _k1 | Radial distortion coefficient k1. |
[in] | _k2 | Radial distortion coefficient k2. |
[in] | _k3 | Radial distortion coefficient k3. |
[in] | _p1 | Tangential distortion coefficient p1. |
[in] | _p2 | Tangential distortion coefficient p2. |
- Returns
- Distorted coordinate.
Get the distortion center.
- Returns
- Distortion center.
double gazebo::rendering::Distortion::GetK1 |
( |
| ) |
const |
Get the radial distortion coefficient k1.
- Returns
- Distortion coefficient k1.
double gazebo::rendering::Distortion::GetK2 |
( |
| ) |
const |
Get the radial distortion coefficient k2.
- Returns
- Distortion coefficient k2.
double gazebo::rendering::Distortion::GetK3 |
( |
| ) |
const |
Get the radial distortion coefficient k3.
- Returns
- Distortion coefficient k3.
double gazebo::rendering::Distortion::GetP1 |
( |
| ) |
const |
Get the tangential distortion coefficient p1.
- Returns
- Distortion coefficient p1.
double gazebo::rendering::Distortion::GetP2 |
( |
| ) |
const |
Get the tangential distortion coefficient p2.
- Returns
- Distortion coefficient p2.
virtual void gazebo::rendering::Distortion::Load |
( |
sdf::ElementPtr |
_sdf | ) |
|
|
virtual |
Load the camera with a set of parmeters.
- Parameters
-
[in] | _sdf | The SDF camera info |
void gazebo::rendering::Distortion::SetCamera |
( |
CameraPtr |
_camera | ) |
|
Set the camera which distortion will be applied to.
- Parameters
-
[in] | _camera | Camera to be distorted |
void gazebo::rendering::Distortion::SetCrop |
( |
bool |
_crop | ) |
|
Set whether to crop the black border around the distorted image points.
- Parameters
-
[in] | _crop | True to crop the black border |
sdf::ElementPtr gazebo::rendering::Distortion::sdf |
|
protected |
The documentation for this class was generated from the following file: