1. A method for recording image comprising the steps of: positioning a lens in front of an image sensor for recording an image; positioning an optical device in front of the lens; positioning an object in front of the optical device; and causing the image sensor to generate an output signal corresponding to images of the object imaged on the image sensor, wherein the optical device produces a compound image on the image sensor, the compound image comprising two or more superimposed, simultaneously taken, images of the object, wherein a spatial distance between corresponding objects of the two or more superimposed images on the image sensor in the compound image is dependent on a distance of the object from the lens, wherein the two or more superimposed images are imaged on the image sensor by the lens, and wherein the compound image is analyzed to determine the spatial distance between corresponding objects of the two or more superimposed images in the compound image on the image sensor wherein, in an iterative process, in every iteration, a direct image approximation I out (x,y) and a depth map approximation d out (x,y) are computed from the compound image I sensor (x,y), and the previous values of the direct image approximation I(x,y) from the depth map approximation d(x,y), and wherein a first view is recorded with a first intensity and a second view is recorded with a second intensity, wherein a ratio between said first and said second intensities is between 1.04 and 2.57 or between 1/2.57 and 1/1.04.