A method for determining the complex amplitude of the electromagnetic field associated with a scene, comprising the following steps: a) capturing a plurality of images of the scene by means of a photographic camera, the images being focused in planes of focus arranged at different distances, wherein the camera comprises a lens or system of lenses of focal length F and a sensor arranged at a certain distance from the lens in the image space, b) taking at least one image pair from the plurality of images and determining the accumulated wavefront to the conjugate plane in the object space corresponding to the intermediate plane with respect to the planes of focus of the two images of the pair, determining the wavefront W ( x,y) as: W x y = ∑ p = 0 N − 1 d p Z p x y where { Z p ( x, y)} is a predetermined set of polynomials and N is the number of polynomials used in the expansion, wherein the coefficients d j are determined by means of solving the system of equations: u 2 ⁢ X j − u 1 ⁢ X j 2 ⁢ z = ∑ p = 0 N − 1 d p ∂ ∂ x Z p x y | x = u 1 ⁢ X j + u 2 ⁢ X j 2, y = u 1 ⁢ Y k + u 2 ⁢ Y k 2 u 2 ⁢ Y k − u 1 ⁢ Y k 2 ⁢ z = ∑ p = 0 N − 1 d p ∂ ∂ y Z p x y | x = u 1 ⁢ X j + u 2 ⁢ X j 2, y = u 1 ⁢ Y k + u 2 ⁢ Y k 2 where 2 z is the distance between the planes of focus of the two images of the pair, where {( u 1 X ( j), u 1 Y ( k)), j, k = 1... T} are points belonging to the first image of the pair, and {( u 2 X ( j), u 2 Y ( k)), j, k = 1... T} are points belonging to the second image of the pair, such that for each 1 ≤ j, k ≤ T, the following is verified ∫ − ∞ u 1 ⁢ Y k ∫ − ∞ u 1 ⁢ X j f 1 ⁢ XY x y dxdy = s j s k and ∫ − ∞ u 2 ⁢ Y k ∫ − ∞ u 2 ⁢ X j f 2 ⁢ XY x y dxdy = s j s k where s(j) is a sequence of real numbers of values between 0 and 1, monotonically increasing for each 1 ≤ j ≤ T, where f XY is the two-dimensional density function which takes into account the probability of occurrence of a photon and is determined in each case by the normalized intensity I ( x,y) of the corresponding image of the pair, i.e.: ∫ − ∞ u 1 ⁢ Y k ∫ − ∞ u 1 ⁢ X j I 1 x y dxdy = s j s k ∫ − ∞ u 2 ⁢ Y k ∫ − ∞ u 2 ⁢ X j I 2 x y dxdy = s j s k. a) capturing a plurality of images of the scene by means of a photographic camera, the images being focused in planes of focus arranged at different distances, wherein the camera comprises a lens or system of lenses of focal length F and a sensor arranged at a certain distance from the lens in the image space, b) taking at least one image pair from the plurality of images and determining the accumulated wavefront to the conjugate plane in the object space corresponding to the intermediate plane with respect to the planes of focus of the two images of the pair, determining the wavefront W ( x,y) as: W x y = ∑ p = 0 N − 1 d p Z p x y where { Z p ( x, y)} is a predetermined set of polynomials and N is the number of polynomials used in the expansion, wherein the coefficients d j are determined by means of solving the system of equations: u 2 ⁢ X j − u 1 ⁢ X j 2 ⁢ z = ∑ p = 0 N − 1 d p ∂ ∂ x Z p x y | x = u 1 ⁢ X j + u 2 ⁢ X j 2, y = u 1 ⁢ Y k + u 2 ⁢ Y k 2 u 2 ⁢ Y k − u 1 ⁢ Y k 2 ⁢ z = ∑ p = 0 N − 1 d p ∂ ∂ y Z p x y | x = u 1 ⁢ X j + u 2 ⁢ X j 2, y = u 1 ⁢ Y k + u 2 ⁢ Y k 2 where 2 z is the distance between the planes of focus of the two images of the pair, where {( u 1 X ( j), u 1 Y ( k)), j, k = 1... T} are points belonging to the first image of the pair, and {( u 2 X ( j), u 2 Y ( k)), j, k = 1... T} are points belonging to the second image of the pair, such that for each 1 ≤ j, k ≤ T, the following is verified ∫ − ∞ u 1 ⁢ Y k ∫ − ∞ u 1 ⁢ X j f 1 ⁢ XY x y dxdy = s j s k and ∫ − ∞ u 2 ⁢ Y k ∫ − ∞ u 2 ⁢ X j f 2 ⁢ XY x y dxdy = s j s k where s(j) is a sequence of real numbers of values between 0 and 1, monotonically increasing for each 1 ≤ j ≤ T, where f XY is the two-dimensional density function which takes into account the probability of occurrence of a photon and is determined in each case by the normalized intensity I ( x,y) of the corresponding image of the pair, i.e.: ∫ − ∞ u 1 ⁢ Y k ∫ − ∞ u 1 ⁢ X j I 1 x y dxdy = s j s k ∫ − ∞ u 2 ⁢ Y k ∫ − ∞ u 2 ⁢ X j I 2 x y dxdy = s j s k.