An object is illuminated from at least one illuminating direction. For each illuminating direction, an intensity image of the object is captured during the illumination. On the basis of the at least one intensity image, a phase contrast image of the object is generated.