Dear sir, I tried to use 'spatstat' to do resampling but its giving me warning message that it couldn't found function 'blur'. Do I have to install additional package? Thanking you Pujan
> Date: Fri, 25 Jul 2008 09:59:50 +0800> Subject: [R-sig-Geo] Spatial > Resampling> From: [EMAIL PROTECTED]> To: r-sig-geo@stat.math.ethz.ch> CC: > [EMAIL PROTECTED]> > Pujan Raj Regmi <[EMAIL PROTECTED]> writes:> > > I have > a satellite image of 12m spatial resolution (4 bands). I want to> > resample > to coarser level. i.e. to 18m, 24m,30m,36m and so on.> > The result I got > from ENVI are not realistic so I want to do it in R> > using weighted average > from neighboring pixels.> > In package 'spatstat' the function 'blur' will > perform spatial averaging> of a pixel image, using Gaussian weights. The > function 'as.im' can be used> to change the dimensions of a pixel image.> > > So for example if Z is a pixel image (object of class "im") then> > old.pixelsize <- Z$xstep> blurZ <- blur(Z, 1.5 * old.pixelsize)> old.dim <- > Z$dim> new.dim <- floor(old.dim/2)> Y <- as.im(blurZ, dimyx=new.dim)> > computes a Gaussian kernel-weighted average of pixel values, then> subsamples > the ima! ge.> > Adrian Baddeley> > > _________________________________________________________________ enger2_072008 [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo