Dear Researchers,

with a low-pass guassian filter with a kernal mask of 3x3 pixel, I need to
test several "sigma" value (i.e. 1, 2, and 4 or eventually different
values) using "raster" library to understand the better smoothing for a
further segmentation algorithm


library(raster)
r <- raster(ncols=36, nrows=18, xmn=0)
r[] <- runif(ncell(r))
plot(r)

# create a gaussian filter 3 by 3
gf1=matrix(c(1,2,1,2,4,2,1,2,1), nrow=3)/16

# apply the gaussian filter
rg1 <- focal(r, w=gf1)
plot(rg1)

But i don't remember the theory how change the sigma values for different
test.

thanks in advance
Gianni

	[[alternative HTML version deleted]]

