Filtering Masks

This module provides several kernels for filtering.

Functions

pysofi.masks.gauss1d_mask(shape=(1, 3), sigma=0.5)

Generate a 1D gaussian mask.

pysofi.masks.gauss2d_mask(shape=(3, 3), sigma=0.5)

Generate a 2D gaussian mask - should give the same result as MATLAB’s fspecial(‘gaussian’,[shape],[sigma]).

Examples

To generate a 1D gaussian mask:

nf = masks.gauss1D_mask(shape=(1,21), sigma=2)