Applying an edge detection filter