boxfilter
Contents: Description, Arguments, Usage, Examples, Images, Related Functions Supported Under Version: >1.69 Current Davinci Version: 2.27 64-bit Safe: Yes
Description Fast convolve (average) for uniform, rectangular masks. Also known as a boxcar filter or a low pass filter.
Arguments and Return Values Arguments: any three dimensional numeric array, a two dimensional box size and an ignore value Return Value: a float numeric array the x and y dimensios and organization of the original with convolved data.
Usage Syntax: boxfilter(obj = VAL [, x = INT] [, y = INT] [, z = INT] [, size = INT] [, ignore = VAL] [, verbose = 1]) The size can be either a size in x and y defining a rectangle or a square of side length of 'size'. Pixels containing the ignore value will be filled in with convolved values if they are within one half of a box length from a pixel that has a valid value. boxfilter() will only convolve in the x-y plane. You can specify either an x and y for rectangular windows, or just size for a square window. Returns windowed average for all non-ignore pixels. If you specify verbose, it will return a structure containing the windowed mean, pixel count and standard deviation under the window (plus some other stuff for working with running sums). Note: boxfilter() can use 24 bytes of memory per input pixel. It uses a LOT of memory and may exceed RAM limits if used on large objects. Use convolve, thm.convolve or rboxfilter for large arrays.
Examples dv> a 345x600x1 array of byte, bsq format [207,000 bytes] dv> bx=boxfilter(a,x=21,y=1,ignore=0) 345x600x1 array of float, bsq format [828,000 bytes] dv> by=boxfilter(a,x=1,y=21,ignore=0) 345x600x1 array of float, bsq format [828,000 bytes] dv> bboth=boxfilter(a,size=21,ignore=0) 345x600x1 array of float, bsq format [828,000 bytes] dv> bx=boxfilter(a,x=21,y=21,ignore=0,verbose=1) struct, 5 elements count: 345x600x1 array of int, bsq format [828,000 bytes] mean: 345x600x1 array of float, bsq format [828,000 bytes] sigma: 345x600x1 array of float, bsq format [828,000 bytes] n: 345x600x1 array of int, bsq format [828,000 bytes] s: 345x600x1 array of double, bsq format [1,656,000 bytes]
|
DavinciWiki Mini-Nav Bar Contents
Contact Developers
All other topics
Related Functions
Recent Core Changes Modified On: 07-06-2009 |