1. A method for processing data, comprising: receiving a temporal sequence of depth maps of a scene containing a humanoid form, the depth maps comprising a matrix of pixels having respective pixel depth values; using a digital processor, processing at least one of the depth maps so as to find respective three-dimensional (3D) medial axes of segments of limbs of the humanoid form in a 3D space; identifying joints in the limbs by finding approximate intersection points of the 3D medial axes of adjoining segments of the limbs, wherein for at least some of the adjoining limb segments, the respective 3D medial axes do not precisely intersect in the 3D space; and tracking movements of the humanoid form over the sequence using the medial axes and the joints of the limbs.