PANDORE Version 6 | GREYC-IMAGE |
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;
Tip: If high is lower than low than prankthresholding performs an inverse thresholding.
Tip: If high is greater than the maximum gray level then high is set with the maximum value (respectively for low).
Returns SUCCESS or FAILURE in case of bad parameters.
Selects pixels with the 17th first minimal values:
prankthresholding 0 17 examples/tangram.pan out.pan
Author: Régis Clouard