1. A method of generating a depth map comprising depth values representing distances to a viewer, for respective pixels of an image, the method comprising the steps of: determining a contour, using a determining unit, on the basis of pixel values of the image, the contour comprising a collection of adjacent points; computing curvature vectors, using a computing unit, at a number of the points; and assigning, using an assigning unit, a first one of the depth values corresponding to the first one of the pixels on the basis of the curvature vectors.