register_translation
-
skimage.feature.register_translation(src_image, target_image, upsample_factor=1, space='real')
[source] -
Efficient subpixel image translation registration by cross-correlation.
This code gives the same precision as the FFT upsampled cross-correlation in a fraction of the computation time and with reduced memory requirements. It obtains an initial estimate of the cross-correlation peak by an FFT and then refines the shift estimation by upsampling the DFT only in a small neighborhood of that estimate by means of a matrix-multiply DFT.
Parameters: src_image : ndarray
Reference image.
target_image : ndarray
Image to register. Must be same dimensionality as
src_image
.upsample_factor : int, optional
Upsampling factor. Images will be registered to within
1 / upsample_factor
of a pixel. For exampleupsample_factor == 20
means the images will be registered within 1/20th of a pixel. Default is 1 (no upsampling)space : string, one of “real” or “fourier”
Defines how the algorithm interprets input data. “real” means data will be FFT’d to compute the correlation, while “fourier” data will bypass FFT of input data. Case insensitive.
Returns: shifts : ndarray
Shift vector (in pixels) required to register
target_image
withsrc_image
. Axis ordering is consistent with numpy (e.g. Z, Y, X)error : float
Translation invariant normalized RMS error between
src_image
andtarget_image
.phasediff : float
Global phase difference between the two images (should be zero if images are non-negative).
References
[R157] Manuel Guizar-Sicairos, Samuel T. Thurman, and James R. Fienup, “Efficient subpixel image registration algorithms,” Optics Letters 33, 156-158 (2008).
Please login to continue.