fft_tools Package

fft_tools Package

image_registration.fft_tools Package

Functions

correlate2d(im1, im2[, boundary]) Cross-correlation of two images of arbitrary size.
dftups(inp[, nor, noc, usfac, roff, coff]) Translated from matlab:
get_ffts([nthreads, use_numpy_fft]) Returns fftn,ifftn using either numpy’s fft or fftw
shift2d(data, deltax, deltay[, phase, ...]) 2D version: obsolete - use ND version instead
shiftnd(data, offset[, phase, nthreads, ...]) FFT-based sub-pixel image shift.
smooth(image[, kernelwidth, kerneltype, ...]) Returns a smoothed image using a gaussian, boxcar, or tophat kernel
upsample_image(image[, upsample_factor, ...]) Use dftups to upsample an image (but takes an image and returns an image with all reals)

convolve_nd Module

image_registration.fft_tools.convolve_nd Module

Functions

convolvend(array, kernel[, boundary, ...]) Convolve an ndarray with an nd-kernel.

correlate2d Module

image_registration.fft_tools.correlate2d Module

Functions

correlate2d(im1, im2[, boundary]) Cross-correlation of two images of arbitrary size.

fast_ffts Module

image_registration.fft_tools.fast_ffts Module

Functions

get_ffts([nthreads, use_numpy_fft]) Returns fftn,ifftn using either numpy’s fft or fftw

shift Module

image_registration.fft_tools.shift Module

Shift

Fourier-transform based shifting. scipy.fftpack.shift does about the same thing, but only in one dimension

Functions

shift2d(data, deltax, deltay[, phase, ...]) 2D version: obsolete - use ND version instead
shiftnd(data, offset[, phase, nthreads, ...]) FFT-based sub-pixel image shift.

zoom Module

image_registration.fft_tools.zoom Module

Functions

zoom1d(inp[, usfac, outsize, offset, ...]) Zoom in to the center of a 1D array using Fourier upsampling
zoom_on_pixel(inp, coordinates[, usfac, ...]) Zoom in on a 1D or 2D array using Fourier upsampling
zoomnd(inp[, offsets, middle_convention]) Zoom in to the center of a 1D or 2D array using Fourier upsampling

scale Module

image_registration.fft_tools.scale Module

Functions

fourier_interp1d(data, out_x[, data_x, ...]) Use the fourier scaling theorem to interpolate (or extrapolate, without raising any exceptions) data.
fourier_interp2d(data, outinds[, nthreads, ...]) Use the fourier scaling theorem to interpolate (or extrapolate, without raising any exceptions) data.
fourier_interpnd(data, outinds[, nthreads, ...]) Use the fourier scaling theorem to interpolate (or extrapolate, without raising any exceptions) data.

upsample Module

Fourier upsampling (or interpolation, scaling, zooming) is achieved via DFTs using a dot product rather than the usual fft, as there is (probably?) no way to perform FFTs with a different kernel.

This notebook demonstrates 1-d Fourier upsampling.

image_registration.fft_tools.upsample Module

Functions

dftups(inp[, nor, noc, usfac, roff, coff]) Translated from matlab:
dftups1d(inp[, usfac, outsize, offset, ...])
odddftups(inp[, nor, noc, usfac, roff, coff])
upsample_image(image[, upsample_factor, ...]) Use dftups to upsample an image (but takes an image and returns an image with all reals)