convthresh(object, smoothfun = "disk2dsmooth", smoothpar = 1,
smoothfunargs = NULL, thresh = 1e-08, idfun = "disjointer",
zero.down = FALSE, time.point = 1, model = 1, ...)threshsizer(object, thresh = 1e-08, Ncontig = 50, idfun = "disjointer",
time.point = 1, model = 1, ...)
threshfac(object, fac = 0.06666667, q = 0.95, wash.out = NULL,
thresh = NULL, idfun = "disjointer", time.point = 1, model = 1,
...)
disjointer(x, method = "C")
## S3 method for class 'features':
plot(x, ..., set.pw = FALSE,
loc.byrow = TRUE, horizontal = TRUE)
## S3 method for class 'features':
print(x, ...)
## S3 method for class 'features':
summary(object, ...)
## S3 method for class 'summary.features':
plot(x, ...)
convthresh
: list object of class summary
: an object of class convthresh
or threshfac
).
plot
method functions, this is the output object returned from either convthresh
or threshfac
(or other feature identifying function that returns objects of class x
(the field to be smoothed, not the same as the argument to disjointer
) and a smoothing parameter as the first two arguments. Other arguments are allowed, ansmoothfun
.smoothfun
.thresh
is supplied.thresh
is NULL, then this is the quantile used to deterimne the thresholds for the two fields.x
, which is the convolved and thresholded (binary) field.thresh
is NULL.zapsmall
is used to set the very small positive values to zero.connected
from image.plot
from convthresh
and threshfac
: additional arguments to idfun
.Not used by the plot
, print
or summary
method functions.
The summary
method function can take the argumen
The summary method function for objects of class
convthresh
:The convolution threshold technique is a simple way of identifying features (referred to as objects in image analysis circles where features are the attributes thereof) within a field. First, the field is smoothed using a convolution smoother, and then it is set to a binary image where everything above a given threshold is set to one. Individual features are identified through any choice of function given by idfun
. The default is to use a connected components algorithm using the connected
.
This is the method used by Davis et al. (2006a,b).
threshsizer
:
This is the method described in, e.g., Nachamkin (2009) or Lack et al. (2010). Objects are identified as contiguous grid points above a threshold where at least Ncontig
connected points are above the threshold. This effectively allows only larger objects to be defined.
threshfac
:
This is the method described in Wernli et al. (2009). Objects are identified via a possibly modified threshold.
Davis, C. A., Brown, B. G. and Bullock, R. G. (2006b) Object-based verification of precipitation forecasts, Part II: Application to convective rain systems. Mon. Wea. Rev., 134, 1785--1795.
Lack, S. A., Limpert, G. L. and Fox, N. I. (2010) An object-oriented multiscale verification scheme. Wea. Forecasting, 25, 79--92, doi:10.1175/2009WAF2222245.1.
Nachamkin, J. E. (2009) Application of the composite method to the spatial forecast verification methods intercomparison dataset. Wea. Forecasting, 24, 1390--1400, doi:10.1175/2009WAF2222225.1.
Wernli, H., Paulat, M. Hagen, M. and Frei, C. (2008) SAL--A novel quality measure for the verification of quantitative precipitation forecasts. Mon. Wea. Rev., 136, 4470--4487.
Wernli, H., Hofmann, C. and Zimmer, M. (2009) Spatial forecast verification methods intercomparison project: Application of the SAL technique. Wea. Forecasting, 24, 1472--1484, doi:10.1175/2009WAF2222271.1.
connected
, as.im
, tess
, tiles
, owin
, FeatureSuite
, make.SpatialVx
x <- y <- matrix(0, 10, 12)
x[2:3,c(3:6, 8:10)] <- 1
y[c(4:7, 9:10),c(7:9, 11:12)] <- 1
hold <- make.SpatialVx(x, y, field.type="contrived", units="none",
data.name=c("Example", "x", "y"))
look <- convthresh(hold, smoothpar=0.5)
length(look$X.feats) # two objects in x.
length(look$Y.feats) # four ovjects in y.
plot(look$X.feats)
plot(look$Y.feats)
plot(look, set.pw=TRUE)
look2 <- summary(look)
plot(look2)
look3 <- threshsizer(hold, Ncontig=5)
plot(look3, set.pw=TRUE)
look4 <- threshfac(hold)
plot(look4, set.pw=TRUE)
data(pert000)
data(pert004)
data(ICPg240Locs)
hold <- make.SpatialVx(pert000, pert004, loc=ICPg240Locs,
projection=TRUE, map=TRUE,
field.type="Precipitation", units="mm/h",
data.name=c("Perturbed ICP Cases", "pert000", "pert004"))
look <- convthresh(hold, smoothpar=3.5)
length(look$X.feats)
length(look$Y.feats)
image.plot(look$sIx)
image.plot(look$sIy)
plot(look)
look2 <- summary(look, silent=TRUE)
plot(look2)
Run the code above in your browser using DataLab