Owen Distortion Model

struct OwenCoefficients : public huira::DistortionCoefficients

Coefficients for Owen lens distortion model.

Holds the coefficients for the Owen distortion model, including both coordinate-aligned and rotated terms.

Public Functions

OwenCoefficients() = default
inline constexpr OwenCoefficients(double e1_val, double e2_val, double e3_val, double e4_val, double e5_val, double e6_val)

Public Members

double e1 = 0
double e2 = 0
double e3 = 0
double e4 = 0
double e5 = 0
double e6 = 0
template<IsSpectral TSpectral>
class OwenDistortion : public huira::Distortion<TSpectral>

Owen lens distortion model.

Implements the Owen distortion model with both coordinate-aligned and rotated terms.

Template Parameters:

TSpectral – The spectral representation type.

Public Functions

OwenDistortion() = default
explicit OwenDistortion(OwenCoefficients coefficients)

Constructs an OwenDistortion with the given coefficients.

Parameters:

coefficients – The Owen distortion coefficients.

virtual Pixel distort(Pixel homogeneous_coords) const override

Applies Owen distortion to the given pixel coordinates.

Computes the distorted coordinates by adding the Owen distortion delta.

Parameters:

homogeneous_coords – The input pixel coordinates (homogeneous).

Returns:

The distorted pixel coordinates.

virtual Pixel undistort(Pixel homogeneous_coords) const override

Removes Owen distortion from the given pixel coordinates.

Iteratively computes the undistorted coordinates using the Owen model.

Parameters:

homogeneous_coords – The distorted pixel coordinates (homogeneous).

Returns:

The undistorted pixel coordinates.

inline virtual std::string get_type_name() const override
inline virtual DistortionCoefficients *get_coefficients() override
inline virtual const DistortionCoefficients *get_coefficients() const override
inline void set_max_iterations(std::size_t max_iters)
inline std::size_t get_max_iterations() const
inline void set_tolerance(float tol)
inline float get_tolerance() const

Protected Attributes

std::size_t max_iterations_ = 20
double tol_sq_ = 1e-12
double tolerance_ = 1e-6