Canny edge detection implementation