PANDORE Version 6 | GREYC-IMAGE |
pcorrelationbinarization classifies pixels of the input image im_in into 2 clusters: the background and the foreground. The threshold value is determined as the gray level value s that maximizes the total amount of correlation provided by the background and the foreground separately. The total amount of correlation for threshold s is:
TC(s) = Cb(s) + Cf(s) { correlation for background + correlation for foreground } = -ln[G(s)*G'(s)] +2*ln[P(s)*(1-P(s))] where P(s) = SUM{i=0->s} [p(i)] and G(s) = SUM{i=0->s} [p(i)^2)] and G'(s) = SUM{i=s->m-1} [(p(i)^2] and pi = fi/W*H
The maximum correlation criterion is to determine the threshold smax such that:
TC(smax) = max TC(s)
Returns the threshold value.
Segments the tangram pieces:
pcorrelationbinarization tangram.pan a.pan
Binarisation de l'image par maximisation de la corrélation interclasse.
J-C Yen, F-J Chang, S. Chang, "A New Criterion for Automatic Multilevel Thresholding", IEEE Trans. on Image Processing, vol. 4, no. 3, pp 370-378, 1995.
Author: Régis Clouard