17 #ifndef GAZEBO_RENDERING_DISTORTION_HH_
18 #define GAZEBO_RENDERING_DISTORTION_HH_
21 #include <ignition/math/Vector2.hh>
32 class DistortionPrivate;
49 public:
virtual void Load(sdf::ElementPtr _sdf);
53 public:
void SetCamera(
CameraPtr _camera);
59 public:
void SetCrop(
const bool _crop);
65 public:
bool Crop()
const;
69 public:
double K1()
const;
73 public:
double K2()
const;
77 public:
double K3()
const;
81 public:
double P1()
const;
85 public:
double P2()
const;
89 public: ignition::math::Vector2d Center()
const;
100 public:
static ignition::math::Vector2d Distort(
101 const ignition::math::Vector2d &_in,
102 const ignition::math::Vector2d &_center,
103 double _k1,
double _k2,
double _k3,
104 double _p1,
double _p2);
110 protected: ignition::math::Vector2d
111 DistortionMapValueClamped(
const int x,
const int y)
const;
116 protected:
void CalculateAndApplyDistortionScale();
120 private: std::unique_ptr<DistortionPrivate> dataPtr;
Camera distortion based on the Brown-Conrady model.
Definition: Distortion.hh:39
boost::shared_ptr< Camera > CameraPtr
Definition: RenderTypes.hh:90