AbstractLinearDistortionModel#
- class optika.distortion.AbstractLinearDistortionModel[source]#
Bases:
AbstractDistortionModelA distortion model which is an affine transformation of the scene coordinates,
\[\text{distort}(\vec{c}) = \mathbf{M} \, (\vec{c} - \vec{c}_0) + \vec{b},\]where \(\mathbf{M}\) is
matrix, \(\vec{c}_0\) iscenter, and \(\vec{b}\) isintercept. Since the transformation is linear,undistort()is its exact inverse (unlike a polynomial fit).Attributes
The reference point subtracted from the coordinates before applying
matrix.The constant offset added after applying
matrix.The linear part of the affine transformation.
Methods
__init__()distort(coordinates)Convert scene coordinates to sensor coordinates.
to_string([prefix])Public-facing version of the
__repr__method that allows for defining a prefix string, which can be used to calculate how much whitespace to add to the beginning of each line of the result.undistort(coordinates)Convert sensor coordinates to scene coordinates.
Inheritance Diagram

- distort(coordinates)[source]#
Convert scene coordinates to sensor coordinates.
- Parameters:
coordinates (AbstractSpectralPositionalVectorArray) – The wavelength and position of each point in the scene.
- Return type:
- to_string(prefix=None)#
Public-facing version of the
__repr__method that allows for defining a prefix string, which can be used to calculate how much whitespace to add to the beginning of each line of the result.
- undistort(coordinates)[source]#
Convert sensor coordinates to scene coordinates.
- Parameters:
coordinates (AbstractSpectralPositionalVectorArray) – The wavelength and sensor position of each point.
- Return type:
- abstract property center: AbstractSpectralPositionalVectorArray#
The reference point subtracted from the coordinates before applying
matrix.
- abstract property intercept: AbstractSpectralPositionalVectorArray#
The constant offset added after applying
matrix.
- abstract property matrix: AbstractSpectralPositionalMatrixArray#
The linear part of the affine transformation.