Suppose we have L gray scale layers. t* is the layer over which all layers are considered Black. and the rest is considered white. So if we consider Co for white and C1 black then, Co = {0,1,2,….t} and C1={t+1,t+2,…L-1}.

To determine the threshold value we need to find the t=t* for which the ratio of class variance and total variance is maximum.

where sigmaB is the class variance for black pixels and sigmaT is total variance.

. here both W0 and W1 are functions of t. . and W is a constant. Pi is the probability of ith gray level . which makes . the mew values are found from following equations , . here UT is constant whereas Ut and U0 and U1 are functions of t.

sigmaT is determined using .

thats all the equations we need. A java Implementation of it can be seen here.

Source:

CHARACTER RECOGNITION SYSTEMS

A Guide for Students and Practioners

By MOHAMED CHERIET et all

### Like this:

Like Loading...

*Related*