xdem.coreg.NuthKaab

xdem.coreg.NuthKaab#

class xdem.coreg.NuthKaab(max_iterations=10, offset_threshold=0.05, subsample=500000.0)[source]#

Nuth and Kääb (2011) coregistration, https://doi.org/10.5194/tc-5-271-2011.

Estimate horizontal and vertical translations by iterative slope/aspect alignment.

The translation parameters are stored in the self.meta keys “shift_x”, “shift_y” and “shift_z” (in georeferenced units for horizontal shifts, and unit of the elevation dataset inputs for the vertical shift), as well as in the “matrix” transform.

__init__(max_iterations=10, offset_threshold=0.05, subsample=500000.0)[source]#

Instantiate a new Nuth and Kääb (2011) coregistration object.

Parameters:
  • max_iterations (int) – The maximum allowed iterations before stopping.

  • offset_threshold (float) – The residual offset threshold after which to stop the iterations (in pixels).

  • subsample (int | float) – Subsample the input for speed-up. <1 is parsed as a fraction. >1 is a pixel count.

Methods

__init__([max_iterations, offset_threshold, ...])

Instantiate a new Nuth and Kääb (2011) coregistration object.

apply(elev[, bias_vars, resample, ...])

Apply the estimated transform to a DEM.

centroid()

Get the centroid of the coregistration, if defined.

copy()

Return an identical copy of the class.

error(reference_elev, to_be_aligned_elev[, ...])

Calculate the error of a coregistration approach.

fit(reference_elev, to_be_aligned_elev[, ...])

Estimate the coregistration transform on the given DEMs.

fit_and_apply(reference_elev, to_be_aligned_elev)

Estimate and apply the coregistration to a pair of elevation data.

from_matrix(matrix)

Instantiate a generic Coreg class from a transformation matrix.

from_translation([x_off, y_off, z_off])

Instantiate a generic Coreg class from a X/Y/Z translation.

residuals(reference_elev, to_be_aligned_elev)

Calculate the residual offsets (the difference) between two DEMs after applying the transformation.

to_matrix()

Convert the transform to a 4x4 transformation matrix.

Attributes

is_affine

Check if the transform be explained by a 3D affine transform.

meta

Metadata dictionary of the coregistration.