2 #ifndef vpgl_poly_radial_distortion_h_ 3 #define vpgl_poly_radial_distortion_h_ 19 # include <vcl_msvc_warnings.h> 24 template <
class T,
int n>
46 const std::vector<T>& k)
55 const std::vector<T>& k)
63 assert(k.size() == n);
65 for (
unsigned int i=0; i<n; ++i, ++coptr)
71 if ( k ==
nullptr )
return;
74 for (
unsigned int i=0; i<n; ++i, ++kptr, ++coptr)
104 #endif // vpgl_poly_radial_distortion_h_ T coefficients_[n]
The coefficients of the nth-order polynomial.
A base class for radial lens distortions.
vgl_point_2d< T > distorted_center() const
Returns the center of distortion in the distorted image.
T distort_radius(T radius) const override
Distort a radial length.
vgl_point_2d< T > center() const
Returns the center of distortion.
void set_coefficients(const T *k)
A class for nth order polynomial radial lens distortion.
T coefficient(unsigned int i) const
Read-only coefficient accessor.
An abstract base class for radial lens distortions.
void set_coefficients(const std::vector< T > &k)
T & coefficient(unsigned int i)
Read-write coefficient accessor.
T distort_radius_deriv(T radius) const override
Compute the derivative of the distort_radius function.