thresh {EBImage}R Documentation

Image and color channel thresholding

Description

Functions to threshold images and color channels of images.

Usage

    thresh(x, w=5, h=5, offset=0.01, ...)
    athresh(x, w=10, h=10, offset=0, ...)
    cthresh(x, threshold=0, ...)

Arguments

x
An object of Image-class. For thresh it must be in the Grayscale mode.
w, h
Thresholding frame width and height in pixel.

offset
Threshold offset from the mean value.
threshold
Threshold value for channel thresholding (uniform).
...
Reserved for future use.

Value

A new instance of Image-class in the same color mode as input.

Details

If thresh and athresh are adaptive thresholind functions. While athresh can be used on both Grayscale and TrueColor images, thresh can only be used on Grayscale images, however it is significantly faster on them.

The value of offset in thresh is on the same scale as data, i.e. the default value is selected assuming data in the range [0,1]. This value for athresh should be selected empirically, as this function uses AdaptiveThreshold of ImageMagick and the scale of this parameter was not documented; the reasonable values are usually in the orders of 500, 1000 or avobe (at least to obtain similar thresholding to that of 0.01 with thresh on cytomicroscopic images. ).

Author(s)

Copyright (c) 2005-2006 Oleg Sklyar : osklyar@ebi.ac.uk

References

ImageMagick: http://www.imagemagick.org.

See Also

Image-class, Image, distmap, segment, [,Image-method

Examples

  ## Not run: see ?watershed for examples

[Package EBImage version 2.0.1 Index]