Blur — SciPy Filters for QGIS

Fourier Ellipsoid

class scipy_filters.algs.scipy_fourier_algorithm.SciPyFourierEllipsoidAlgorithm[source]

Ellipsoid fourier filter

Ellipsoidal box filter calculated by multiplication with a circular or ellipsoidal kernel in the frequency domain.

The input band is transformed with fast fourier transform (FFT) using fft2 (for 2D) or fftn (for 3D) from scipy.fft. The multiplication with the fourier transform of a gaussian kernel is calculated with fourier_ellipsoid from scipy.ndimage. The product is transformed back with ifft2 or ifftn, respectively. Only the real part of the resulting complex numbers is returned.

Note

No data cells within the filter radius are filled with 0.

Dimension Calculate for each band separately (2D) or use all bands as a 3D datacube and perform filter in 3D.

Note

bands will be the first axis of the datacube.

Size Size of the circular or ellipsoidal box.

Fourier Gaussian

class scipy_filters.algs.scipy_fourier_algorithm.SciPyFourierGaussianAlgorithm[source]

Gaussian fourier filter

Gaussian filter calculated by multiplication in the frequency domain. This is faster with large kernels (large sigma).

The input band is transformed with fast fourier transform (FFT) using fft2 (for 2D) or fftn (for 3D) from scipy.fft. The multiplication with the fourier transform of a gaussian kernel is calculated with fourier_gaussian from scipy.ndimage. The product is transformed back with ifft2 or ifftn, respectively. Only the real part of the resulting complex numbers is returned.

Note

No data cells within the filter radius are filled with 0.

Dimension Calculate for each band separately (2D) or use all bands as a 3D datacube and perform filter in 3D.

Note

bands will be the first axis of the datacube.

Sigma Standard deviation of the gaussian filter.

Fourier uniform

class scipy_filters.algs.scipy_fourier_algorithm.SciPyFourierUniformAlgorithm[source]

Fourier uniform (i.e. mean) filter

Uniform filter calculated by multiplication with a box kernel in the frequency domain.

The input band is transformed with fast fourier transform (FFT) using fft2 (for 2D) or fftn (for 3D) from scipy.fft. The multiplication with the fourier transform of a gaussian kernel is calculated with fourier_uniform from scipy.ndimage. The product is transformed back with ifft2 or ifftn, respectively. Only the real part of the resulting complex numbers is returned.

Note

No data cells within the filter radius are filled with 0.

Dimension Calculate for each band separately (2D) or use all bands as a 3D datacube and perform filter in 3D.

Note

bands will be the first axis of the datacube.

Size Size of the box.

Gaussian filter

class scipy_filters.algs.scipy_gaussian_algorithm.SciPyGaussianAlgorithm[source]

Gaussian filter (blur with a gaussian kernel)

Calculated with gaussian_filter from scipy.ndimage.

Note

No data cells within the filter radius are filled with 0.

Dimension Calculate for each band separately (2D) or use all bands as a 3D datacube and perform filter in 3D.

Note

bands will be the first axis of the datacube.

Sigma Standard deviation of a gaussian kernel.

Border mode determines how input is extended around the edges: Reflect (input is extended by reflecting at the edge), Constant (fill around the edges with a constant value), Nearest (extend by replicating the nearest pixel), Mirror (extend by reflecting about the center of last pixel), Wrap (extend by wrapping around to the opposite edge).

Order Optionally use first, second or third derivative of gaussian. Truncate Radius of kernel in standard deviations.

Uniform filter

class scipy_filters.algs.scipy_statistical_algorithms.SciPyUniformAlgorithm[source]

Uniform filter (a.k.a. box filter or mean filter)

Calculated with uniform_filter from scipy.ndimage.

Note

No data cells within the filter radius are filled with the band mean.

Dimension Calculate for each band separately (2D) or use all bands as a 3D datacube and perform filter in 3D.

Note

bands will be the first axis of the datacube.

Size Size of filter in pixels if no footprint is given. Equivalent to a footprint array of shape size_rows × size_cols (in 2D) or size_bands × size_rows × size_cols (in 3D) filled with ones.

Border mode determines how input is extended around the edges: Reflect (input is extended by reflecting at the edge), Constant (fill around the edges with a constant value), Nearest (extend by replicating the nearest pixel), Mirror (extend by reflecting about the center of last pixel), Wrap (extend by wrapping around to the opposite edge).