1. A method for processing data, comprising: receiving a depth map of a scene containing an object of interest, the depth map comprising a matrix of pixels having respective pixel depth values; using a digital processor, processing the depth map so as to locate a single ridge on each limb of the object, the ridge corresponding to a chain of the pixels whose respective depth values are local minima; and responsively to the ridge, extracting features of the object from the depth map, wherein the object is a head of a humanoid form, and wherein extracting the features comprises finding an increase in the respective depth values of the pixels at an upper end of the ridge, and identifying the object as the head responsively to the increase, and wherein identifying the object as the head comprises processing the depth map so as to locate an arcuate depth edge around the upper end of the ridge.