PANDORE Version 6 | GREYC-IMAGE |
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.
Tip: If high is lower than low than pthresholding 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 of the tangram pieces:
pthresholding 100 1e30 tangram.pan out.pan
Seuillage d'une image selon la valeur de pixel.
Author: Régis Clouard