Statistics for Preprocessing of binary document images by morphological operators