filterBinomial: Creates a circular binomail filter

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Create a circular low-pass filter using binomial coefincient and filter weights obtained from Pascal's triangle. Used for filtering Canopy height model before local maxima detection

Usage

1
filterBinomial(w = 3, CircularRadius = "euclidan")

Arguments

w

filter size

CircularRadius

How to define the radius of the circular filter, either in a euclidian distance space (w-1)/2 or by using the pixels w/2. Defaults to "euclidian"

Details

The filter should be used toghter with the focal function in the raster-package.

Value

a matrix of filter weights

Author(s)

Hans Ole Orka hans.ole.orka@gmail.org

See Also

focal and filterLocalMaxima

Examples

1
2
3
4
5
6
7
8
9
windows()
par(mfcol=c(2,2))
(f <- filterBinomial(w=3))
image(f)
(f <- filterBinomial(w=5))
image(f)
(f <- filterBinomial(w=9))
(f <- filterBinomial(w=19))
image(f)

hansoleorka/myR documentation built on May 17, 2019, 2:29 p.m.