Utility function for image co-registration

eolearn.coregistration.utils.ransac(npts, model, n, k, t, d)[source]

Fit model parameters to data using the RANSAC algorithm

This implementation is written from pseudo-code found at http://en.wikipedia.org/w/index.php?title=RANSAC&oldid=116358182

  • npts – A set of observed data points

  • model – A model that can be fitted to data points

  • n – The minimum number of data values required to fit the model

  • k – The maximum number of iterations allowed in the algorithm

  • t – A threshold value for determining when a data point fits a model

  • d – The number of close data values required to assert that a model fits well to data


Model parameters which best fit the data (or None if no good model is found)

eolearn.coregistration.utils.random_partition(n, n_data)[source]

return n random rows of data (and also the other len(data)-n rows)

class eolearn.coregistration.utils.EstimateEulerTransformModel(src_pts, trg_pts)[source]

Bases: object

Estimate Euler transform linear system solved using linear least squares

This class estimates an Euler 2D transformation between two cloud of 2D points using SVD decomposition

Initialise target and source cloud points as Nx2 matrices. The transformation aligning source points to target points is estimated.

  • src_pts – Array of source points

  • trg_pts – Array of target points


Estimate rigid transformation given a set of indices


idx – Array of indices used to estimate the transformation


Estimated transformation matrix


Estimate Euler transformation on points listed in idx


idx – Indices used to estimate transformation


Transformation matrix

score(idx, warp_matrix)[source]

Estimate the registration error of estimated transformation matrix

  • idx – List of points used to estimate the transformation

  • warp_matrix – Matrix estimating Euler transformation


Square root of Target Registration Error