Distortion

struct DistortionCoefficients

Base class for distortion coefficient sets.

Provides a polymorphic interface for all distortion coefficient types.

Subclassed by huira::BrownCoefficients, huira::OpenCVCoefficients, huira::OwenCoefficients

Public Functions

DistortionCoefficients() = default
DistortionCoefficients(const DistortionCoefficients&) = default
DistortionCoefficients &operator=(const DistortionCoefficients&) = default
virtual ~DistortionCoefficients() = default
template<IsSpectral TSpectral>
class Distortion

Abstract base class for lens distortion models.

Defines the interface for all distortion models, including distortion/undistortion and coefficient access.

Template Parameters:

TSpectral – The spectral representation type.

Subclassed by huira::BrownDistortion< TSpectral >, huira::OpenCVDistortion< TSpectral >, huira::OwenDistortion< TSpectral >

Public Functions

Distortion() = default
virtual ~Distortion() = default
virtual Pixel distort(Pixel homogeneous_coords) const = 0
virtual Pixel undistort(Pixel homogeneous_coords) const = 0
virtual DistortionCoefficients *get_coefficients() = 0
virtual const DistortionCoefficients *get_coefficients() const = 0
virtual std::string get_type_name() const = 0
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