PANDORE Version 6 GREYC-IMAGE

pmassthresholding



Performs binarization based on gray level percent.



Synopsis

pmassthresholding ratio [-m mask [im_in|-] [im_out|-]

Description

pmassthresholding sets to 0 every pixel value that is lower to ratio percent of the total gray levels ansd 255 otherwise.

The threshold value is determined as the gray level that splits the image in two class:

Pixel with value lower or equal to the threshold are set to 0 in the output image, and pixels with value greater than the threshold are set to 255 in the output image.

Parameters

Inputs

Outputs

Result

Returns the threshold value.

Examples

Discards the background and keeps the tangram pieces from the tangram.pan image:

   pmassthresholding 86 tangram.pan out.pan

See also

Thresholding

C++ prototype

Errc PMassThresholding( const Img2duc &im_in, Img2duc &im_out, Float ratio );

Version française

Binarisation d'une image basé sur le pourcentage de niveaux de gris.


Author: Régis Clouard