PANDORE Version 6 GREYC-IMAGE

prankthresholding



Performs thresholding on image using the pixel rank.



Synopsis

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

Description

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

   create rank for all pixels values
   if rank(im_in[p]) ≥ low and rank(im_in[p]) ≤ high
   then im_out[p] = im_in[p];
   else im_out[p] = 0;

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

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

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE in case of bad parameters.

Examples

Selects pixels with the 17th first minimal values:

   prankthresholding 0 17 examples/tangram.pan out.pan

See also

Thresholding

C++ prototype

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

Author: Régis Clouard