edge detection with two edges