Statistical morphological filters for binary image processing