Detecting edges and corners using morphological filters