1. A system for object reconstruction, comprising: an illuminating unit, comprising a coherent light source and a generator of a random pattern comprising a diffractive optical element (DOE) in an optical path of illuminating light propagating from the light source toward an object, thereby projecting the random pattern onto an object; an imaging unit configured to detect a light response of an illuminated region and generating image data indicative of the object within the projected pattern; and a processor, configured to reconstruct a three-dimensional (3D) map of the object responsively to a shift of the pattern in the image data relative to a reference image of the pattern.