A New Algorithm for Edge Detection