Box filter: Difference between revisions
Jump to navigation
Jump to search
imported>Neal |
imported>Neal |
||
Line 8: | Line 8: | ||
===Description=== | ===Description=== | ||
Spatial statistical filter. To allow robust statistics the filter is based on a moving window (or box), and is slow compared to other filter methods. | |||
====Inputs==== | ====Inputs==== | ||
* '''x''' = image data class 'double' or 'dataset'. If 'dataset' it must x.type=='image'. If 'double' it must be | * '''x''' = image data class 'double' or 'dataset'. If 'dataset' it must x.type=='image'. If 'double' it must be ''M''x''N''x''P'' (''P'' can = 1). | ||
* '''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]. | * '''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]. | ||
Revision as of 11:02, 21 August 2009
Purpose
Image filtering (spatial filtering with a moving window)
Synopsis
- xf = box_filter(x,win,options)
Description
Spatial statistical filter. To allow robust statistics the filter is based on a moving window (or box), and is slow compared to other filter methods.
Inputs
- x = image data class 'double' or 'dataset'. If 'dataset' it must x.type=='image'. If 'double' it must be MxNxP (P can = 1).
- 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'.
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}.