PANDORE Version 6 GREYC-IMAGE

padaptivemeanbinarization



Binarization on image using a local adaptive thresholding based on mean value.



Synopsis

padaptivemeanbinarization radius_x radius_y radius_z percent [-m mask] [im_in|-] [im_out|-]

Description

padaptivemeanbinarization is an adaptative binarization based on local contrast analysis. The algorithm is to slide a window and compute the mean value of the pixels inside the window. If the central pixel is greater than the specified percent of the mean value of the neighbors than the pixel becomes white otherwise it becomes black.

The algorithm is:

im_out(x,y) = 0   if im_in(x,y) <= mean(window(f(x,y), x,y, radius)) * (1-p/100)
            = 255 otherwise

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

Binarization of the image page.pan :

padaptivemeanbinarization 16 16 0 15 examples/page.pan bin.pan

See also

Thresholding

C++ prototype

Errc PAdaptiveMeanBinarization( const Img2duc &im_in, Img2duc &im_out, int radius_x, int radius_y, int radius_z, const int percent);

Version française

Binarisation de l'image par adaptation locale basée sur la moyenne.

References

B. Bradleya and G. Rothb, "Adaptive Thersholding using the Integral Image", Journal of Graphics, GPU, and Game Tools, 12(2), pp. 13-21, 2007.

Author: Sébastien Bernery