Learn R Programming

CRImage (version 1.20.0)

SauvolaThreshold: Do Sauvola thresholding

Description

Thresholding method using mean and standard deviation.

Usage

SauvolaThreshold(allGreyValues)

Arguments

allGreyValues
Vector of gray values.

Value

The threshold.

Details

A threshold for the gray values is returned

References

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

See Also

createBinaryImage

Examples

Run this code
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))

Run the code above in your browser using DataLab