Edge Detection and Clustering in Images