my implementation of the canny_edge_detector