Skip to content

nabu.preproc.distortion

source module nabu.preproc.distortion

Classes

Functions

source correct_distortion_interpn(image, coords, bounds_error=False, fill_value=None)

Correct image distortion with scipy.interpolate.interpn.

Parameters

  • image : array Distorted image

  • coords : array Coordinates of the distortion correction to apply, with the shape (Ny, Nx, 2)

source class DistortionCorrection(estimation_method='fft-correlation', estimation_kwargs=None, correction_method='interpn', correction_kwargs=None)

A class for estimating and correcting image distortion.

Initialize a DistortionCorrection object.

Parameters

  • estimation_method : str Name of the method to use for estimating the distortion

  • estimation_kwargs : dict, optional Named arguments to pass to the estimation method, in the form of a dictionary.

  • correction_method : str Name of the method to use for correcting the distortion

  • correction_kwargs : dict, optional Named arguments to pass to the correction method, in the form of a dictionary.

Methods

source method DistortionCorrection.estimate_distortion(image, reference_image)

source method DistortionCorrection.correct_distortion(image, coords)

source method DistortionCorrection.estimate_and_correct(image, reference_image)