The histogram is segmented into two parts using a starting threshold value such as 0 = 2B-1, half the maximum dynamic range limit.
The sample mean (mf,0) of the gray values associated with the foreground pixels and the sample mean (mb,0) of the gray values associated with the background pixels are computed.
A new threshold value 1 is now computed as the average of these two sample means. The process is repeated, based upon the new threshold, until the threshold value does not change any more.
Requirements:
· MATLAB 6.5 or higher