PANDORE Version 6 GREYC-IMAGE

pderavi



Performs multi-thresholding on image using Deravi algorithm.



Synopsis

pderavi length [-m mask] [im_in|-] [im_out|-]

Description

pderavi classifies the input image pixels into a small number of clusters according to their value. Every pixel p of the input image is assigned to a cluster identified by the related threshold value:

   if threshold[k-1]<im_out[p]<=threshold[k].
   then im_out[p]=threshold[k]

The last threshold is equal to 255.

The number of clusters and the value of the thresholds are determined from the Deravi algorithm. It is based on the measure of the conditional probability of transition. For each gray level i the busyness ratio is:

   P(i) = (P1(i) + P2(i) ) / 2;

   P1(i) = [SUM(SUM((Tkl)*(Tkl))] / [SUM(SUM(Tkl))+ SUM(SUM(Tpq))]	
   with k=[0..i], l=[i+1..N-1], p=[0..i], q=[0..i]
 
   P2(i) = [SUM(SUM((Tkl)*(Tkl))] / [SUM(SUM(Tkl))+ SUM(SUM(Tpq))]
   with k=[i+1..N-1], l=[0..i], p=[i+1..N-1], q=[i+1..N-1]

The co-occurrence matrix Tkl contains the number of times the gray level k is a neighbor of the gray level l considering the neighborhood Nxy={ (x,y+1), (x+1,y) }.

Then the thresholds are located as regional minima of the conditional probability of transition function. The minima are searched in the space of length gray levels around the gray level i.

Notice: This operator can only work on grayscale image of bytes (Img2duc, Img3duc).

Parameters

Inputs

Outputs

Result

Returns the number of thresholds.

Examples

Segments tangram.pan and displays the number of thresholds:

   pderavi 15 tangram.pan out.pan
   pstatus

See also

Thresholding

C++ prototype

Errc PDeravi( const Img2duc &im_in, Img2duc &im_out, int length );

Version française

Multiseuillage de l'image par analyse de la matrice de co-occurences selon Deravi.

Reference

F. Deravi et al., "Gray level thresholding using second-order statistics", Pattern Recognition Letter, Vol. 1, No. 5-6, pp. 417-422, 1983.


Author: Régis Clouard