SauvolaThreshold: Do Sauvola thresholding

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/SauvolaThreshold.R

Description

Thresholding method using mean and standard deviation.

Usage

1
SauvolaThreshold(allGreyValues)

Arguments

allGreyValues

Vector of gray values.

Details

A threshold for the gray values is returned

Value

The threshold.

Author(s)

Henrik Failmezger, failmezger@cip.ifi.lmu.de

References

J. Sauvola, M. Pietikainen, "Adaptive Document Image Binarization," Pattern Recognition, vol. 33, 225-236, 2000

See Also

createBinaryImage

Examples

1
2
3
4
5
6
7
8
f1= system.file("extdata", "exImg2.jpg", package="CRImage")
print(f1)
img=readImage(f1)
print(img)
#convert to grayscale
imgG=EBImage::channel(img,'grey')
#threshold value
t=SauvolaThreshold(as.vector(imgG))

CRImage documentation built on Nov. 8, 2020, 8:01 p.m.