1. A method for detecting edges in an image, the method comprising: smoothing the image using a filter; determining a gradient magnitude and angle for each pixel of the image; performing a non-maximum suppression; and applying a double threshold with an upper and a lower threshold for determining the edges in the image, where the upper and the lower threshold are calculated automatically using a distribution of intensity values of the image.