corr_setup#

corr_setup(rfftn, irfftn, template, template_mask, template_filter, target, fast_shape, fast_ft_shape, shared_memory_handler, **kwargs)[source]#

Setup for computing a normalized cross-correlation between a target (f), a template (g) given template_mask (m)

\[\frac{CC(f,g) - \overline{g} \cdot CC(f, m)} {(CC(f^2, m) - \frac{CC(f, m)^2}{N_g}) \cdot \sigma_{g}},\]

where

\[CC(f,g) = \mathcal{F}^{-1}(\mathcal{F}(f) \cdot \mathcal{F}(g)^*).\]

Notes

To be used with corr_scoring().

References

[1]

Lewis P. J. Fast Normalized Cross-Correlation, Industrial Light and Magic.