There is provided a holographic projection system comprising a light receiving surface (125), a light source, (110) a spatial light modulator (140, 1210), a detector and a controller. The spatial light modulator is arranged to receive light from the light source and output spatially- modulated light in accordance with computer-generated holograms addressed to the spatial light modulator, wherein each computer- generated hologram comprises a hologram component arranged to perform a lensing function associated with a focusing power and corresponding to passing the spatially modulated light through a lens with a focusing power. The controller is arranged to set the focusing power to a plurality of values to form a plurality of respective images in corresponding focal planes. The detector is arranged to detect light of the image for each values of focusing power. The controller is further configured to measure a quality of the image for each value of focusing power and determine the focal length of the software lens which causes the image to be in focus on the light receiving surface.