PANDORE Version 6 | GREYC-IMAGE |
pchanda 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 Chanda et al. algorithm. It is based on the measure of the average contrast value. For each gray level i the average contrast value is:
SUM(SUM((Tkl)*(Tkl)) SUM(SUM((Tpq * Tpq))) contrast(i) = -------------------- + --------------------- SUM(SUM(Tkl)) SUM(SUM(Tpq))
with k in [0..i], l in [i+1..N-1], p in [i+1..N-1] and q in [0..i].
The co-occurrence matrix Tkl contains the number of times the gray level k is the neighbor of the gray level l considering the neighborhood Nxy={ (x,y+1) }.
Then the thresholds are located as regional maxima of the average contrast function. The maxima 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.
Returns the number of thresholds.
Segments tangram.pan and displays the number of thresholds:
pchanda 20 tangram.pan out.pan pstatus
Multiseuillage de l'image par analyse de la matrice de co-occurences selon Chanda.
B. Chanda, Chauduri and Majumder, "On Image Enhancement and threshold selection using the gray lavel co-occurence matrix", Pattern Recognition Letter, Vol.3, No. 4, pp. 243-251, 1985.