| PANDORE Version 6 | GREYC-IMAGE |
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.
Tip: If high is lower than low then pbinarization 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.
Segments the tangram.pan image in 2 classes, background and tangram pieces:
pbinarization 100 1e30 tangram.pan out.pan
Seuillage binaire d'une image.
Author: Régis Clouard