linumpy.registration.phase_correlation#
Phase-correlation registration for tile pairs.
Functions#
Find the translation between image pairs using phase correlation and cross-correlation. |
|
|
Compute the normalized cross-correlation between two ndarrays. |
|
Apply an hanning window to image. |
Module Contents#
- linumpy.registration.phase_correlation.pair_wise_phase_correlation(vol1: numpy.ndarray, vol2: numpy.ndarray, n_peaks: int = ..., return_cc: Literal[False] = ...) list[int][source]#
- linumpy.registration.phase_correlation.pair_wise_phase_correlation(vol1: numpy.ndarray, vol2: numpy.ndarray, n_peaks: int = ..., return_cc: Literal[True] = ...) tuple[list[int], float]
Find the translation between image pairs using phase correlation and cross-correlation.
- Parameters:
- Returns:
Translation of vol2 -/- vol1 in each direction
- Return type:
Notes
Works in 2D for now. Needs to be tested in 3D.
References
Preibisch S. et al. (2008) Fast Stitching of Large 3D Biological Datasets (ImageJ Proceesings)
- linumpy.registration.phase_correlation.cross_correlation(vol1, vol2, mask=None)[source]#
Compute the normalized cross-correlation between two ndarrays.
- Parameters:
vol1 (ndarray) – Fixed volume
vol2 (ndarray) – Moving volume
mask (ndarray) – Mask where the cross-correlation is computed. Assumed to be everywhere.
- Returns:
Cross correlation between the volumes
- Return type:
Notes
If a mask is given, the weighted NCC is computed instead of the NCC.
vol1, vol2 and mask should have the same shape.
mask is normalized before using it in the NCC computation.