estimate_polynomial_transform

sofia_redux.toolkit.image.warp.estimate_polynomial_transform(source, destination, order=2, get_exponents=False)[source]

Estimate the polynomial transform for (x, y) coordinates.

Parameters:
sourcenumpy.ndarray

The source coordinates of shape (n_dimensions, n).

destinationnumpy.ndarray

The destination coordinates of shape (n_dimensions, n).

orderint, optional

The polynomial order (number of coefficients is order + 1).

get_exponentsbool, optional

If True, return the polynomial exponents used to derive the coefficients.

Returns:
coefficients, [exponents]numpy.ndarray (float), numpy.ndarray (float)

The derived polynomial coefficients of shape (n_dimensions, n_coeffs), and the optionally returned exponents of shape (n_coeffs, n_dimensions).