LaplaceCrossCorrelation#

class LaplaceCrossCorrelation(**kwargs)[source]#

Bases: CrossCorrelation

Uses the same formalism as CrossCorrelation but with Laplace filtered weights (\(\nabla^{2}\)):

\[\text{score} = \nabla^{2} \text{target_weights} \cdot \nabla^{2} \text{template_weights}\]
Parameters:
targetNDArray

A d-dimensional target to match the template coordinate set to.

template_coordinatesNDArray

Template coordinate array with shape (d,n).

template_weightsNDArray

Template weight array with shape (n,).

template_mask_coordinatesNDArray, optional

Template mask coordinates with shape (d,n).

target_maskNDArray, optional

A d-dimensional mask to be applied to the target.

negate_scorebool, optional

Whether the final score should be multiplied by negative one. Default is True.

return_gradientbool, optional

Invoking __call_ returns a tuple of score and parameter gradient. Default is False.

**kwargsDict, optional

Keyword arguments propagated to downstream functions.

Methods

LaplaceCrossCorrelation.grad()

Calculate the gradient of the cost function w.r.t.

LaplaceCrossCorrelation.rotate_array(arr, ...)

LaplaceCrossCorrelation.score(x)

Compute the matching score for the given transformation parameters.

LaplaceCrossCorrelation.score_angles(x)

Computes the score after a given rotation.

LaplaceCrossCorrelation.score_translation(x)

Computes the score after a given translation.