1. A method for determining a sharpness metric (S) of an image (im), comprising performing edge detection on the image, wherein gradient values are assigned to pixels; determining a value representing a contrast metric C of the image; calculating at least a first threshold t 1 , a second threshold t 2 and a third threshold t 3 from the determined contrast metric C, wherein the first, second and third thresholds are related by a constant factor m according to t 1 =C, t 2 =m*t 1 and t 3 =m*t 2 , wherein m is greater than one; determining an amount of pixels having a gradient value of at least the first threshold t 1 , the pixels being first level edge pixels (B 1 ), an amount of pixels having a gradient value of at least the second threshold t 2 , the pixels being second level edge pixels (B 2 ), and an amount of pixels having a gradient value of at least the third threshold t 3 , the pixels being third level edge pixels (B 3 ); and determining the sharpness metric S from the factor m, a relationship S 2 between the amounts of second level and first level edge pixels and a relationship S 3 between the amounts of third level and first level edge pixels.