Morphological operations with ball shaped structuring elements