Description Usage Arguments Details Value Note Author(s) References See Also Examples
The function allows to segment an image into two or three level sets.
1 2 3 4 5 6  segment(object, level=0.5, delta = 0, thresh = 3, fov = NULL, channel = 0,
hmax = 4, aws = TRUE, varmodel = NULL, ladjust = 1.25, xind = NULL,
yind = NULL, wghts = c(0.299, 0.587, 0.114, 0), scorr = TRUE,
lkern = "Triangle", plateau = NULL, homogen = TRUE,
earlystop = TRUE, demo = FALSE, select = FALSE, sext = 1.4,
connected = FALSE, graph = FALSE, max.pixel = 400, compress = TRUE)

object 
Image object, class "adimpro", as from

level 
center of gray/colorvalues of the second segment, will not be used if 
delta 
half width of gray/colorvalues of the second segment, nay be increased if 
thresh 
Critical value for final assignment to segment 1 or 3 , should be specified as a quantile of the standard Gaussian distribution. 
fov 
size of field of view in pixel 
channel 
specifies which information to use for segmentation. 0: use grey valued image obtained from color images, 13: use the specified color channel. 
hmax 
Maximum bandwidth to use in the iteration procedure. 
aws 
(logical). If 
varmodel 

ladjust 
adjustment factor for lambda (>=1). Default values for
lambda are selected for Gaussian distributions. Skewed or heavy
tailed distributions may require slightly larger values for lambda
to meet the propagation condition. 
xind, yind 
Restrict smoothing to rectangular area defined by pixel
indices 
wghts 
allows to weight the information from different (up to 4) color channels. The weights are used in the statistical penalty of the PSprocedure. 
scorr 
(logical). Specifies whether spatial correlation is to be
estimated. Defaults to 
lkern 
Specifies the location kernel. Defaults to "Triangle", other choices are "Quadratic", "Cubic" and "Uniform". The use of "Triangle" corresponds to the Epanechnicov kernel nonparametric kernel regression. 
plateau 
Extension of the plateau in the statistical kernel. Can take
values from (0,1), defaults to 
homogen 
If TRUE the algorithm determines, in each design point i, a circle of maximum radius,
such that the statistical penalty 
earlystop 
If TRUE the algorithm determines, in each design point i, a circle of minimal radius,
such that the circle includes all point j with positive weights 
demo 
(logical). If 
select 
if TRUE a homogeneous rectangular region can be specified interactively. A value of 
sext 
if 
connected 
if TRUE the set of pixel within the same segment connected to the specified pixel is extracted. 
graph 
(logical). If 
max.pixel 
Maximum dimension of images for display
if 
compress 
logical, determines if image data are stored in rawformat. 
The image is segmented into three parts by performing multiscale tests
of the hypotheses H1
value >= level  delta
and H2 value <= level + delta
.
Pixel where the first hypotesis is rejected are classified as 1
(segment 1)
while rejection of H2 results in classification 1
(segment 3).
Pixel where neither H1 or H2 are rejected ar assigned to a value 0
(segment 2). Critical values for the tests are adjusted for smoothness at the different scales inspected in the iteration process using results from multiscale testing,
see e.g. Duembgen and Spokoiny (2001). Critical values also depend on the
size of the region of interest specified in parameter fov
.
Within segment 2 structural adaptive smoothing is performed while if a pair of pixel belongs to segment 1 or segment 3 the corresponding weight will be nonadaptive.
If connected==TRUE
pixel in segment 2 0
are reassigned to a value 2
if they belong to a maximal connected subset of segment2 that contains the center of the specified homogeneous set.
Object of class "adimpro"
with
img 
containing a greyvalued image with 3 or 4 levels corresponding to the identified segments. 
and additional list elements
hsegm 
containing the maximal bandwidth used 
level 
the value of parameter 
delta 
the value of parameter 
thresh 
the value of parameter 
This function is still experimental and may be changes considerably in future.
Karsten Tabelow tabelow@wiasberlin.de and Joerg Polzehl polzehl@wiasberlin.de
Duembgen, L. and Spokoiny, V. (2001). Multiscale testing of qualitative hypoteses. Ann. Stat. 29, 124–152.
Polzehl, J. and Spokoiny, V. (2006). PropagationSeparation Approach for Local Likelihood Estimation. Probability Theory and Related Fields. 3 (135) 335  362.
read.image
, read.raw
, make.image
, show.image
, clip.image
1  ## Not run: demo(segment)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.