PANDORE Version 6 GREYC-IMAGE

pbinarization



Performs binary thresholding on image and graph.



Synopsis

pbinarization low high [-m mask] [im_in|-] [im_out|-]

Description

pbinarization classifies pixels of the input image im_in into 2 clusters. Pixels values that are lower than low or greater than high are set to 0; other values are set to 255:

   if im_in[p] ≥ low and im_in[p] ≤ high
   then im_out[p]=255;
   else im_out[p]=0;

If high is lower than low then pbinarization performs an inverse thresholding:

   if im_in[p] < high or im_in[p] > low
   then im_out[p]=255;
   else im_out[p]=0;

For multispectral and color images, the threshold is compared with the min or max pixel value of each band. For graph, pbinarization operates on graph nodes.

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

See also

Thresholding

C++ prototype

Errc PBinarization( const Img2duc &im_in, Img2duc &im_out, float low, float high );

Author: Régis Clouard