Input: Image feature , seed , initial threshold , restriction of region size
Output: Adaptive threshold
Grow region from seed by using ;
Calculate the size of region , get ;
if    then
Calculate by Eq. (2) and Eq. (3);
else
;
end if
Algorithm 2: Adaptive threshold algorithm.