An edge detection program in C#