with edge detection