mr2.utils.filters

Spatial and temporal filters.

Functions

dct_filters(kernel_size[, dtype])

Create a separable orthonormal cosine basis for an N-dimensional patch.

dct_matrix(n[, dtype])

Create the orthonormal discrete cosine transform of type II.

fft_filters(kernel_size[, dtype])

Create the complex Fourier modes of an N-dimensional patch.

filter_separable(x, kernels, dim[, ...])

Apply one-dimensional kernels successively along the selected axes.

gabor_filters_2d(n_filters, kernel_size[, ...])

Create oriented cosine filters under an isotropic Gaussian envelope.

gaussian_filter(x, sigmas[, dim, truncate, ...])

Smooth a tensor with a separable N-dimensional Gaussian filter.

gaussian_window(coordinate, width)

Evaluate a continuous Gaussian window with unit gain at the origin.

hann_window(coordinate, width)

Evaluate a continuous Hann window with unit gain at the origin.

radial_hann_window(coordinates, widths)

Evaluate a Hann window on the radius of scaled continuous coordinates.

uniform_filter(x, width[, dim, pad_mode, ...])

Smooth a tensor by averaging a rectangular neighborhood.