1. A method for processing data, comprising: receiving a depth map of a scene containing at least a part of a body of a humanoid form, the depth map comprising a matrix of pixels having respective pixel depth values; using a digital processor, extracting from the depth map a curvature map of the scene, the curvature map comprising respective curvature values and curvature orientations of at least some of the pixels in the matrix; and segmenting the depth map using the curvature values and curvature orientations in the curvature map so as to extract three-dimensional (3D) coordinates of one or more limbs of the humanoid form, wherein segmenting the depth map comprises: identifying blobs of the pixels in the depth map that correspond to the one or more limbs of the humanoid form; computing, for each blob, a dominant curvature direction of the blob responsively to the curvature orientations; defining a respective axis of each limb running perpendicular to the dominant curvature direction of a corresponding blob; processing the depth map so as to locate ridges running along respective axes of the one or more limbs, each ridge comprising a chain of the pixels whose respective curvature values are local maxima; and identifying locations and orientations of the one or more limbs based on the ridges.