presetThr: Binarize images with a preset threshold.

Description Usage Arguments Value See Also Examples

Description

Given a single layer image and a global threshold value, it returns a binarized image. All pixels above the threshold are replaced with 1 and the rest with 0.

Usage

1
2
3
4
presetThr(x, ...)

## S4 method for signature 'RasterLayer'
presetThr(x, thr)

Arguments

x

RasterLayer.

...

Additional arguments (none implemented)

thr

numeric. Threshold value. It should be between minimum and maximum layer value.

Value

BinImage.

See Also

autoThr.

Examples

1
2
3
4
5
x <- loadPhoto()
x <- raster::subset(x, 3)
bin <- presetThr(x, 125)
bin
plot(bin)

GastonMauroDiaz/caiman documentation built on Jan. 22, 2022, 4:43 a.m.