1. A method for depth mapping, comprising: receiving an image of a pattern of spots that has been projected onto a scene, which includes a feature having a set of elongate appendages, which have respective transverse dimensions that are less than twice an average distance between the spots in the pattern that is projected onto the feature; processing the image in order to segment and find a three-dimensional (3D) location of the feature; and connecting the spots appearing on the feature in the 3D location in order to extract separate, respective contours of the appendages.