PANDORE Version 6 GREYC-IMAGE

pcontrastbinarization



Performs binarization on image based on the boundary contrast value.



Synopsis

pcontrastbinarization [-m mask] [im_in|-] [im_amp|-] [im_out|-]

Description

pcontrastbinarization binarizes the input image pixels into a small number of clusters according to their value.

The classification is based on the analysis of the gradient magnitude along the regions boundaries given in the im_amp image. The principle is based on the Kohler's algorithm:
Let p and q be two neighbors. A boundary between p and q is detected by a threshold t if:

   im_in[p]<=t<=im_in[q] or im_in[q]<=t<=im_in[p].

Thus, the set of boundary detected by t is:

   K(t) = { pair(p,q) / p and q neighbors and im_in[p]<=t<=im_in[q] or im_in[q]<=t<=im_in[p] }

The total contrast of the boundaries detected by t is:

   C(t) = sum(min(abs(t-im_in[p]),abs(t-im_in[q]))

The mean contrast is:

   Cm(s) = C(t) / card(K(t))

Then the result threshold is the maximum of the mean contrast function.

Inputs

Outputs

Result

Returns the threshold value.

Examples

Segments tangram pieces:

   pgradient 1 tangram.pan a.pan b.pan
   pnonmaximasuppression a.pan b.pan c.pan
   pthresholding 10 1e30 c.pan d.pan
   pcontrastbinarization tangram.pan d.pan out.pan

See also

Thresholding

C++ prototype

Errc PContrastBinarization( const Img2duc &im_in1, Img2duc &im_in2, Img2duc &im_out );

Version française

Binarisation de l'image par analyse du contraste aux frontières.

Reference

R. Kohler, "A segmentation system based on thresholding", CGIP, No. 15, pp 319-338, 1981.


Author: Régis Clouard