PANDORE Version 6 GREYC-IMAGE

pthresholding



Performs thresholding on image, region map or graph.



Synopsis

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

Description

pthresholding builds the output image im_out with the pixels of the input image im_in that have a value greater or equal than low or lower or equal than high. Other values are set to 0:

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

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

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

For region map, pthresholding selects region with a label value greater or equal than low or lower or equal than high. There is no relabeling, output regions keep the same label than the input region.

For graph, pthresholding operates on graph nodes.

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE in case of bad parameters.

Examples

Selects pixels of the tangram pieces:

   pthresholding 100 1e30 tangram.pan out.pan

See also

Thresholding

C++ prototype

Errc PThresholding( const Img2duc &im_in, Img2duc &im_out, Uchar low, Uchar high );

Version française

Seuillage d'une image selon la valeur de pixel.


Author: Régis Clouard