Spatial filter: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Scott
(New page: ===Purpose=== Image filtering ===Synopsis=== :xf = spatial_filter(x,win,options) ===Description=== Note that to allow robust statistics the filter is based on a moving window (or box),...)
 
imported>Neal
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
===Purpose===
===Purpose===


Image filtering
Image filtering based on convolution (and deconvolution)


===Synopsis===
===Synopsis===
Line 8: Line 8:


===Description===
===Description===
Note that 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 MxNxP (P can = 1).
* '''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). ''M'' pixels in the X-direction (vertical in the image) and ''N'' pixels in the Y-direction (horizontal in the image).
* '''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]. See options.psf below for additional information.


====Outputs====
====Outputs====
Line 24: Line 24:
::'gaussian' - (win) corresponds to the std in the Gaussian distribution.
::'gaussian' - (win) corresponds to the std in the Gaussian distribution.
::'box' - (win) is the number of x- and y- channels.
::'box' - (win) is the number of x- and y- channels.
* '''conv''': [ {'convolve'} | 'deconvolve' ] Governs the algorithm and tells it to convolve with the point source function given in (options.psf) or deconvolve. If 'deconvolve', then (options.reg) is used.
* '''reg''': {1e-6} regularization parameter (this parameter is used for ridging in the deconvolution algorithm).


===See Also===
===See Also===


[[box_filter]], [[linear_filter]]
[[box_filter]], [[line_filter]], [[savgol2d]]

Latest revision as of 11:21, 21 August 2009

Purpose

Image filtering based on convolution (and deconvolution)

Synopsis

xf = spatial_filter(x,win,options)

Description

Inputs

  • x = image data class 'double' or 'dataset'. If 'dataset' it must x.type=='image'. If 'double' it must be MxNxP (P can = 1). M pixels in the X-direction (vertical in the image) and N pixels in the Y-direction (horizontal in the image).
  • 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]. See options.psf below for additional information.

Outputs

  • xf = Filtered image class 'dataset'.

Options

options = a structure array with the following fields:

  • algorithm: [ {'gaussian'} | 'box'] Point source function for filtering.
'gaussian' - (win) corresponds to the std in the Gaussian distribution.
'box' - (win) is the number of x- and y- channels.
  • conv: [ {'convolve'} | 'deconvolve' ] Governs the algorithm and tells it to convolve with the point source function given in (options.psf) or deconvolve. If 'deconvolve', then (options.reg) is used.
  • reg: {1e-6} regularization parameter (this parameter is used for ridging in the deconvolution algorithm).

See Also

box_filter, line_filter, savgol2d