C language implementation of canny edge detection