A method for mapping includes projecting a primary speckle pattern from an illumination assembly into a target region. A plurality of reference images of the primary speckle pattern are captured at different, respective distances from the illumination assembly in the target region. A test image of the primary speckle pattern that is projected onto a surface of an object in the target region is captured and compared to the reference images so as to identify a reference image in which the primary speckle pattern most closely matches the primary speckle pattern in the test image. The location of the object is estimated based on a distance of the identified reference image from the illumination assembly.
CROSS-REFERENCE TO RELATED APPLICATIONS
This application claims the benefit of U.S. Provisional Patent Application 60/776,655, filed Feb. 27, 2006, whose disclosure is incorporated herein by reference.