2 #ifndef vpgl_radial_distortion_h_ 3 #define vpgl_radial_distortion_h_ 98 #endif // vpgl_radial_distortion_h_
A base class for radial lens distortions.
vgl_point_2d< T > distorted_center() const
Returns the center of distortion in the distorted image.
vpgl_radial_distortion(const vgl_point_2d< T > ¢er, bool has_deriv=false)
Constructor.
vgl_homg_point_2d< T > distort(const vgl_homg_point_2d< T > &point) const override
Distort a projected point on the image plane.
vgl_homg_point_2d< T > undistort(const vgl_homg_point_2d< T > &point, const vgl_homg_point_2d< T > *init=nullptr) const override
Return the original point that was distorted to this location (inverse of distort).
An abstract base class for all lens distortions.
void set_translation(const vgl_vector_2d< T > &offset, bool after=true) override
Set a translation to apply before of after distortion.
vpgl_radial_distortion(const vgl_point_2d< T > ¢er, const vgl_point_2d< T > &new_center, bool has_deriv=false)
Constructor.
vgl_point_2d< T > center() const
Returns the center of distortion.
vgl_point_2d< T > center_
The center of distortion.
virtual T undistort_radius(T radius, const T *init=nullptr) const
Return the inverse of distort function.
vgl_point_2d< T > distorted_center_
The center of distortion in the distorted space.
virtual T distort_radius_deriv(T radius) const
Compute the derivative of the distort_radius function.
void set_center(const vgl_point_2d< T > &c)
Set the center of distortion.
forward declare vgl_homg_point_2d<T> and vgl_vector_2d<T>.
void set_distorted_center(const vgl_point_2d< T > &dc)
Set the center of distortion in the distorted image.
virtual T distort_radius(T radius) const =0
Distort a radial length.