Added morphological closing