Box filter: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Neal
imported>Neal
Line 26: Line 26:
===See Also===
===See Also===


[[maxautofactors]], [[spatial_filter]], [[savgol2d]]
[[maxautofactors]], [[spatial_filter]], [[windowfilter]]

Revision as of 08:15, 11 September 2018

Purpose

Image or matrix (N-way) filtering (spatial filtering with a moving window)

Synopsis

xf = box_filter(x,win,options)

Description

BOX_FILTER is a spatial filter that filters and despises based on a moving window (or box). It tends to be slow compared to filter methods that can be vectorized.

Inputs

  • x = MxNxP data class 'double' or 'dataset'. If 'dataset' it must x.type=='image' (see BUILDIMAGE). If 'double' it must be MxNxP (P can = 1 or N-way arrays).
  • win = a 1 or 2 element vector of odd integers corresponding to the window width of the box filter. If scalar, (win) is set to win = [win win].

Outputs

  • xf = Filtered image class 'dataset' or matrix (or N-way array) class 'double.'

Options

options = a structure array with the following fields:

  • algorithm: [ {'mean'} | 'median' | 'max' | 'min' | 'meantrimmed' | 'mediantrimmed' ] governs filter method.
  • ntrim: when algorithm = 'meantrimmed' or 'mediantrimmed', (ntrim) is the input (n) to the functions MEANTRIMMED or MEDIANTRIMED {default = 2}.

See Also

maxautofactors, spatial_filter, windowfilter