# Patent

## Title
Upper-body skeleton extraction from depth maps

## Abstract

A method for processing data includes receiving a depth map of a scene containing at least an upper body of a humanoid form. The depth map is processed so as to identify a head and at least one arm of the humanoid form in the depth map. Based on the identified head and at least one arm, and without reference to a lower body of the humanoid form, an upper-body pose, including at least three-dimensional (3D) coordinates of shoulder joints of the humanoid form, is extracted from the depth map.

## Background
CROSS-REFERENCE TO RELATED APPLICATION
This application is a continuation of U.S. patent application Ser. No. 13/461,802, filed May 2, 2012.


FIELD OF THE INVENTION
The present invention relates generally to methods and systems for three-dimensional (3D) mapping, and specifically to processing of 3D map data.
BACKGROUND
A number of different methods and systems are known in the art for creating depth maps. In the present patent application and in the claims, the term “depth map” refers to a representation of a scene as a two-dimensional matrix of pixels, in which each pixel corresponds to a respective location in the scene and has a respective pixel depth value, indicative of the distance from a certain reference location to the respective scene location. In other words, the depth map has the form of an image in which the pixel values indicate topographical information, rather than brightness and/or color of the objects in the scene. Depth maps may be created, for example, by detection and processing of an image of an object onto which a speckle pattern is projected, as described in PCT International Publication WO 2007/043036 A1, whose disclosure is incorporated herein by reference. The terms “depth map” and “3D map” are used herein interchangeably and have the same meaning.
Depth maps may be processed in order to segment and identify objects in the scene. Identification of humanoid forms (meaning 3D shapes whose structure resembles that of a human being) in a depth map, and changes in these forms from scene to scene, may be used as a means for controlling computer applications. For example, PCT International Publication WO 2007/132451, whose disclosure is incorporated herein by reference, describes a computer-implemented method in which a depth map is segmented so as to find a contour of a humanoid body. The contour is processed in order to identify a torso and one or more limbs of the body. An input is generated to control an application program running on a computer by analyzing a disposition of at least one of the identified limbs in the depth map.
As another example, U.S. Patent Application Publication 2011/0052006, whose disclosure is incorporated herein by reference, describes a method for processing a temporal sequence of depth maps of a scene containing a humanoid form. A digital processor processes at least one of the depth maps so as to find a location of the head of the humanoid form, and estimates dimensions of the humanoid form based on this location. The processor tracks movements of the humanoid form over the sequence using the estimated dimensions.
SUMMARY
Embodiments of the present invention provide methods, devices and software for extracting information from depth maps.
There is therefore provided, in accordance with an embodiment of the present invention, a method for processing data, which includes receiving a depth map of a scene containing at least an upper body of a humanoid form. The depth map includes a matrix of pixels having respective pixel depth values. Using a digital processor, the depth map is processed so as to identify a head and at least one arm of the humanoid form in the depth map. Based on the identified head and at least one arm, and without reference to a lower body of the humanoid form, an upper-body pose, including at least three-dimensional (3D) coordinates of shoulder joints of the humanoid form, is extracted from the depth map.
The upper-body pose may be found while the humanoid form in the depth map is seated, or standing
In a disclosed embodiment, processing the depth map includes locating one or more ridges in the depth map corresponding to parts of the humanoid form, each ridge corresponding to a chain of the pixels whose respective depth values are local minima. Additionally or alternatively, processing the depth map includes locating depth edges in the depth map corresponding to parts of the humanoid form, and associating arcuate depth edges found in the depth map with the head and with a hand of the form. Further additionally or alternatively, extracting the upper-body pose includes finding 3D medial axes of the head and the at least one arm in the depth map, and finding the upper-body pose that includes estimated positions of the head and the at least one arm that satisfy constraints of a predefined body model while minimizing an error between the 3D medial axes and the estimated positions.
In some embodiments, the method includes controlling a computerized system responsively to the extracted upper-body pose.
There is also provided, in accordance with an embodiment of the present invention, a method for processing data, which includes receiving a depth map of a scene containing an object of interest. Using a digital processor, the depth map is processed so as to locate a single ridge on each limb of the object. The ridge corresponds to a chain of the pixels whose respective depth values are local minima. Features of the object are extracted from the depth map responsively to the ridge.
In a disclosed embodiment, processing the depth map includes finding each local minimum on a respective line oriented obliquely relative to the chain, while the respective depth values of the other pixels on the respective line are greater than the local minimum. Additionally or alternatively, extracting the features includes processing the depth map so as to locate one or more depth edges of the object, and applying the depth edges together with the ridge in order to reconstruct a three-dimensional shape of the object. Further additionally or alternatively, extracting the features includes partitioning the chain into segments, fitting a line to each segment, and finding a location and orientation of the object based on the line.
In one embodiment, the object is a head of a humanoid form, and extracting the features includes 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. Additionally or alternatively, identifying the object as the head includes processing the depth map so as to locate an arcuate depth edge around the upper end of the ridge.
There is additionally provided, in accordance with an embodiment of the present invention, apparatus for processing data, which includes an imaging assembly, which is configured to capture a depth map of a scene containing at least an upper body of a humanoid form. A processor is configured to process the depth map so as to identify a head and at least one arm of the humanoid form in the depth map, and to extract from the depth map, based on the identified head and at least one arm, and without reference to a lower body of the humanoid form, an upper-body pose including at least three-dimensional (3D) coordinates of shoulder joints of the humanoid form.
There is further provided, in accordance with an embodiment of the present invention, apparatus for processing data, which includes an imaging assembly, which is configured to capture a depth map of a scene containing an object of interest. A processor is configured to process the depth map so as to locate a single ridge on each limb of the object and to extract, responsively to the ridge, features of the object from the depth map.
There is moreover provided, in accordance with an embodiment of the present invention, a computer software product, including a computer-readable medium in which program instructions are stored, which instructions, when read by a computer, cause the computer to receive a depth map of a scene containing at least an upper body of a humanoid form, to process the depth map so as to identify a head and at least one arm of the humanoid form in the depth map, and to extract from the depth map, based on the identified head and at least one arm, and without reference to a lower body of the humanoid form, an upper-body pose including at least three-dimensional (3D) coordinates of shoulder joints of the humanoid form.
There is furthermore provided, in accordance with an embodiment of the present invention, a computer software product, including a computer-readable medium in which program instructions are stored, which instructions, when read by a computer, cause the computer to receive a depth map of a scene containing an object of interest, to process the depth map so as to locate a single ridge on each limb of the object, and to extract, responsively to the ridge, features of the object from the depth map.
The present invention will be more fully understood from the following detailed description of the embodiments thereof, taken together with the drawings in which:



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a schematic, pictorial illustration of a system for 3D mapping of humanoid forms, in accordance with an embodiment of the present invention;
FIG. 2 is a schematic representation of a depth map, in accordance with an embodiment of the present invention;
FIG. 3 is a flow chart that schematically illustrates a method for extracting an upper-body skeleton of a humanoid form from a depth map, in accordance with an embodiment of the present invention;
FIG. 4 is a schematic representation of depth edges extracted from the depth map of FIG. 2, in accordance with an embodiment of the present invention;
FIG. 5 is a schematic representation of ridges found in the depth map of FIG. 2, in accordance with an embodiment of the present invention;
FIGS. 6A and 6B are frontal and side views, respectively, of a human head, illustrating a method for detecting the head in a depth map in accordance with an embodiment of the present invention;
FIG. 7 is a schematic representation of a combination of ridges and edges defining a humanoid form in the depth map of FIG. 2, in accordance with an embodiment of the present invention; and
FIG. 8 is a schematic representation of an upper-body skeleton of a humanoid form extracted from the depth map of FIG. 2, in accordance with an embodiment of the present invention.



DETAILED DESCRIPTION OF EMBODIMENTS
Overview
Depth maps contain a wealth of data, but extracting high-level information from depth maps is often difficult. Finding and tracking the pose of a humanoid form in a depth map, for example, requires that a digital processor separate the limbs and torso from the background and other objects in the depth map and correctly identify the positions and orientations of the limbs and torso. (The term “pose” is used in the context of the present description and in the claims to refer to a set of 3D coordinates, such as joint locations, that define the 3D positions and orientations of at least some of the limbs. The term “limbs” refers to the arms, legs, and head.) This task may become even more challenging when only a part of the humanoid form, such as the upper body, is captured in the depth map or when the humanoid form is seated or otherwise positioned directly against a background object.
Embodiments of the present invention that are described hereinbelow provide robust, efficient methods, systems and software for extracting humanoid forms from depth maps. These methods are directed particularly at extracting the pose of a 3D form that is believed to correspond to a humanoid body, and particularly the pose of the upper body. The parameters and changes of the pose can serve as a simplified input to application programs running on computerized systems, enabling such systems to respond to users' gestures. The capability of these embodiments to extract the upper-body pose without reference to the lower body of the humanoid form is particularly useful in remote control and other applications in which the user may be seated.
In the disclosed embodiments, a digital processor processes a depth map so as to identify the head and at least one arm of the humanoid form in the depth map. The processor applies this limb information is extracting an upper-body pose, which comprises the 3D coordinates of the shoulder joints of the humanoid form along with the head and arm positions. For this purpose, the processor typically finds 3D medial axes of the head and at least one arm in the depth map, and then finds the upper-body pose that minimizes the error between these 3D medial axes and the estimated positions of the head and arm (or arms) according to the pose, while satisfying the constraints of a predefined body model.
In some of the disclosed embodiments, the digital processor locates ridges in the depth map. Such ridges correspond to chains of pixels whose respective depth values are local minima, i.e., they are the closest points on an object (such as the limb of a humanoid form) to the sensor that is used to create the depth map. When an object of interest is in contact with a background object just behind it, depth edges (i.e., transitions in the depth coordinate between neighboring pixels) in the depth map may be faint and difficult to detect. Ridges, however, will nearly always be present and thus can be used, with or without depth edge information, in identifying object features, such as the head and arm of a person sitting against a chair back.
To identify the head of a person in a depth map, the processor may search for a ridge that runs vertically over the person's face. The pixels along the ridge will typically have roughly constant depth values over the range from the chin to the forehead, but the depth values will increase markedly at the upper end of the ridge, corresponding to the top of the head. The digital processor may identify the head by searching for a ridge with this sort of characteristic, possibly along with other factors, such as the size and shape of the object along which the ridge runs. For example, the processor may attempt to locate an arcuate depth edge around the upper end of the ridge, corresponding to the top of the head.
Although the disclosed embodiments use certain specific techniques for identification and pose estimation of the parts of the upper body of a humanoid form appearing in a depth map, the principles of the present invention may similarly be applied, mutatis mutandis, to extraction of other sorts of information from depth maps, regarding various sorts of objects. In particular, ridge detection may be used in various other applications of depth mapping and is not limited to skeleton extraction applications. Furthermore, the techniques described herein may be used in conjunction with other techniques that are known in the art for processing and extracting pose information from depth maps, such as the techniques described in the publications cited in the Background section above.
System Description
FIG. 1 is a schematic, pictorial illustration of a 3D user interface system 20, in accordance with an embodiment of the present invention. The user interface is based on a 3D imaging assembly 22, which captures 3D scene information that includes at least a part of the body of a human user 28. The user in this example scenario is seated in a chair 30. Assembly 22 may also capture 2D color video images of the scene. Details of a 3D imaging assembly of this sort are described, for example, in PCT International Publication WO 2010/004542, whose disclosure is incorporated herein by reference.
Assembly 22 outputs a sequence of frames containing 3D map data (and possibly color image data, as well) to a computer 24, which extracts high-level information from the map data. This high-level information is provided via an Application Program Interface (API) to an application running on computer 24, which drives a display screen 26 accordingly. For example, user 28 may select and interact with content appearing on screen 26 by moving his arms.
In one embodiment, assembly 22 projects a pattern of spots onto the scene and captures an image of the projected pattern. Assembly 22 or computer 24 then computes the 3D coordinates of points in the scene (including points on the surface of the user's body) by triangulation, based on transverse shifts of the spots in the pattern. This approach is advantageous in that it does not require the user to hold or wear any sort of beacon, sensor, or other marker. It gives the depth coordinates of points in the scene relative to a predetermined reference plane, at a certain distance from assembly 22. Methods and devices for this sort of triangulation-based 3D mapping using a projected pattern are described, for example, in PCT International Publications WO 2007/043036, WO 2007/105205 and WO 2008/120217, whose disclosures are incorporated herein by reference, as well as in the above-mentioned WO 2010/004542.
Alternatively, system 20 may use other methods of 3D mapping, such as stereoscopic imaging or time-of-flight measurements, based on single or multiple cameras or other types of sensors, as are known in the art.
In the embodiment shown in FIG. 1, system 20 captures and processes a temporal sequence of depth maps (also referred to as 3D maps) containing user 28, while the user moves his body. Software running on a digital processor in assembly 22 and/or computer 24 processes the 3D map data to extract geometrical features of the humanoid form corresponding to user 28. The software analyzes these geometrical features (as described in detail hereinbelow) in order to extract an upper-body pose of the user, which typically includes 3D locations and orientations of the user's shoulders, arm joints and head. It may also analyze the trajectory of the hands over multiple frames in the sequence in order to identify gestures delineated by the hands. The skeleton and gesture information are provided via the above-mentioned API to an application program running on computer 24. This program may, for example, move and modify images presented on display 26 in response to the skeleton and/or gesture information.
Computer 24 typically comprises a general-purpose digital processor, which is programmed in software to carry out the functions described hereinbelow. The software may be downloaded to the processor in electronic form, over a network, for example, or it may alternatively be provided on tangible, non-transitory media, such as optical, magnetic, or electronic memory media. Alternatively or additionally, some or all of the described functions of the computer may be implemented in dedicated hardware, such as a custom or semi-custom integrated circuit or a programmable digital signal processor (DSP). Although computer 24 is shown in FIG. 1, by way of example, as a separate unit from imaging assembly 22, some or all of the processing functions of the computer may be performed by a suitable microprocessor and software or by dedicated circuitry within the housing of the imaging assembly or otherwise associated with the imaging assembly.
As another alternative, at least some of these processing functions may be carried out by a suitable digital processor that is integrated with display screen 26 (in a television set, for example) or with any other suitable sort of computerized device, such as a game console or media player. The sensing functions of assembly 22 may likewise be integrated into the computer or other computerized apparatus that is to be controlled by the sensor output. References in the description and the claims to a “digital processor” should thus be understood as referring to any and all processing configurations that may be used in implementing the methods described herein.
Methods for Feature Extraction and Pose Estimation
FIG. 2 is a schematic representation of a depth map 35 captured by assembly 22, in accordance with an embodiment of the present invention. The depth map, as explained above, comprises a matrix of pixels having respective depth values. The depth values are represented in FIG. 2 as gray-scale values, with lighter shades of gray corresponding to smaller depth values, i.e., locations closer to assembly 22. (Black areas correspond to pixels for which no depth values could be determined.) In this particular scene, the depth values of user 28 blend into those of chair 30 on which the user is sitting.
FIG. 3 is a flow chart that schematically illustrates a method for extracting an upper-body skeleton of a humanoid form from a depth map, in accordance with an embodiment of the present invention. Computer 24 applies this method upon receiving a depth map, such as map 35, at a map input step 40. Computer 24 processes the depth values in map 35 in order to identify and segment components of the image (i.e., groups of neighboring pixels) having characteristics of a humanoid form (such as overall size, shape, and motion from frame to frame of the sequence of depth maps). Methods for identification and segmentation of such forms in depth maps are described, for example, in U.S. Patent Application Publication 2011/0293137, whose disclosure is incorporated herein by reference.
Computer 24 processes the segmented forms in the depth map in order to find depth edges and ridges, at an edge and ridge extraction step 42. Various methods of edge extraction that are known in the art may be used at this step. For example, the computer may take a derivative of the depth map and then connect together neighboring pixels having similar derivative values until a complete edge has been defined. The above-mentioned WO 2007/132451 and US 2011/0052006 also describe methods that may be used for finding and processing depth edges.
FIG. 4 is a schematic representation of an edge map 50, containing depth edges extracted from depth map 35 (FIG. 2), in accordance with an embodiment of the present invention. Edge pixels are marked by dots in the figure. An edge 52 of chair 30 is clearly visible. Edges 54 and 56, corresponding to the user's head and arm, however, are only partly defined due to the proximity (in terms of depth coordinates) of the user's upper body to the chair behind it.
FIG. 5 is a schematic representation of a ridge map 60, showing ridges found in depth map 35, in accordance with an embodiment of the present invention. A ridge 62 corresponds roughly to the center line of the user's head, continuing down to the upper part of the user's torso. Ridges 64 and 66 run along the user's legs, while a ridge 68 runs along the user's right arm.
Ridges, as noted earlier, are chains of pixels whose respective depth values correspond to local minima (although the chain may not run precisely through all the actual local minima in its vicinity, as explained below). A “chain,” in the context of the present description and in the claims, refers to a series of neighboring pixels arranged consecutively along a line or curve. The term “neighboring” may include near neighbors, which are not directly adjacent (since noise and artifacts may affect some of the pixels along the chain). Each local minimum along the chain is the minimal depth value on a respective line that crosses the chain at an oblique angle (i.e., not parallel to the chain), while the respective depth values of the other pixels on the line to either side of the local minimum are greater than this minimal value.
Various algorithms may be applied by computer 24 in order to find ridges in map 35. One possible method is as follows:

    1. Search the area of interest in the depth map for a pixel with a minimal depth value located between neighboring pixels with greater depth values.
    2. Search along a line (roughly perpendicular to the chain, once a chain has been started) on opposite sides of the pixel having the minimal depth value until the extreme pixels of the ridge are found on both sides, defined as the pair of pixels along the line having depth values greater than the minimal value by a predefined threshold.
    3. Take the center point between these extreme pixels on the opposite sides of the line as the ridge point. (This center point may not necessarily coincide exactly with the local minimum, but the inventor has found this definition of the ridge points to give more reliable results.)
    4. Continue through steps 1-3 for the next point along the chain until done.


The above algorithm is built in such a way that the support pixels, i.e., pixels on the lines between the pairs of extreme pixels are mutually exclusive between any two ridges (no overlap). There could be, for example, two or more different local minima with the same extreme pixels, but they will be represented by only one middle pixel, as described above. The algorithm thus typically finds a single ridge on each limb of the body in the 3D map.
Computer 24 partitions the ridge and edge chains into straight segments and fits lines to these segments. This partitioning can be carried out recursively over the chains, using polygon simplification algorithms, for example, as are known in the art. Finding the chains as a preliminary step makes it possible to carry out this process efficiently. (Otherwise, it would be necessary to use complicated outlier rejection algorithms in the fitting process.)
Returning now to FIG. 3, computer 24 applies the ridges and edges found in depth map 35 in detecting the user's head and one or both arms, at a limb detection step 44. A number of different techniques may be combined at this step, some of which are described below. These techniques may be combined, as well, with other edge-based detection methods, such as those described in the above-mentioned US 2011/0052006. In addition, when computer 24 receives a sequence of depth maps, the pose and locations of limbs that were found in previous frames can be tracked in order to predict the locations of the limbs in the current frame, and thus focus and narrow the search for the head and arms. This sort of tracking, however, is beyond the scope of the present patent application.
FIGS. 6A and 6B are frontal and side views, respectively, of a head 70 of a human subject, illustrating a method of detecting the head in a depth map in accordance with an embodiment of the present invention. This method may be applied by computer 24 at step 44. The X-Y plane in these figures is parallel to the pixel plane of the depth map, while the Z-axis corresponds to the depth.
A ridge 72 runs along the front of head 70. The depth values along the ridge are roughly constant from the chin up to the forehead. Above the forehead, however, the depth values of the pixels at the upper end of ridge 72 rapidly increase, and the ridge then disappears (as illustrated by ridge 62 in FIG. 5). This sort of ridge structure is characteristic of the head and is therefore applied by computer 24 as an indicator of head location and orientation.
Another indicator of head location is an arcuate edge 74 extending around the top of head 70. Computer 24 may fit an arc to appropriate edges in depth map 35, and may then calculate the quality of the fit as a measure of likelihood that the object in question is a head. Edge 54 in FIG. 4 illustrates the sort of arcuate shape that can be used in detecting head location. (The upper end of edge 56, corresponding to the user's hand, shows that arc fitting can also be used as a hand detector.)
Other factors may also be used in finding and verifying the head location. For example, computer 24 may find the sides of the head by searching along lines in the depth map that are perpendicular to ridge 72 until it finds pixels on both sides of the ridge having depth values greater than those of the corresponding ridge pixel by roughly half the expected depth of the head (typically by about 9 cm). The computer may then draw a curve through these pixels and may check whether the curve has an appropriate shape and size to be a head. Additionally or alternatively, the computer may take pixels spanning the surface of the head to either side of ridge 72 and may verify that they form a 3D ellipsoidal shape appropriate for a head. Similar sorts of criteria may be applied, mutatis mutandis, in finding and verifying the locations of the user's arms in the depth map.
FIG. 7 is a schematic representation of a combination of ridges and edges defining a humanoid form in depth map 35, in accordance with an embodiment of the present invention. Edges 52, 54, 56 are the same as those shown in FIG. 4. Ridges 62, 64, 66, 68 from FIG. 5 have been fitted with corresponding lines 82, 84, 86, 88. The ridge points may be grouped for fitting in such a way that the lines that are fitted to neighboring groups of ridge points meet at sharp angles, which typically correspond to joint angles. (Other ridges, belonging to background objects, are also fitted with lines in FIG. 7, but these lines are eliminated from consideration by computer 24 due to geometrical and other factors.) Edges 52, 54, 56 may also be fitted with lines, as described, for example, in the above-mentioned US 2011/0052006, but these lines are omitted from FIG. 7 for the sake of simplicity.
The location of the user's head and right arm can be seen in FIG. 7 based on the presence of ridge lines 82 and 88 and edges 54 and 56, respectively. The head is bounded by arcuate edge 54 around the upper end of ridge line 82, which is roughly indicative of the 3D medial axis of the head. The computer uses line 88, together with edge 56 to either side of this line, to find the 3D medial axis of the user's arm.
Referring back to FIG. 3 again, computer 24 estimates the upper-body pose of the user, at a pose-building step 46. For this purpose, the computer takes the medial axes of the head and the arm that were found at step 44, and attempts to find a pose that will satisfy the constraints of a predefined body model while minimizing the error between the 3D medial axes and the estimated positions of the head and arm according to the pose. This step does not assume any knowledge of the lower body and can be carried out based on head and arm positions alone. The body model assumes only that the head is located above and between the shoulder joints and that the arms comprise hands, forearms, and upper arms, attached at appropriate joints with ranges of motion that are anatomically reasonable.
FIG. 8 is a schematic representation of an upper-body skeleton of user 28 that has been extracted from depth map 35, in accordance with an embodiment of the present invention. The skeleton comprises a set of segments connected by joints, which correspond roughly to bones and joints in the user's body. Although the skeleton is shown as a 2D construct due to limitations of the printed page, the components of the skeleton that are shown in the figure are characterized in practice by 3D coordinates. The user's head is represented by a head segment 90, indicating the location and orientation of the head. Fitting of the body model at step 46 has caused line 88 and edge 56 (FIG. 7) to be associated with a right forearm segment 92, between an elbow 94 and a wrist 96, which connects to a hand 98. The upper body itself is marked by shoulder joints 100 and 102, connected by a body segment 104. The body model yields a right upper arm segment 106 connecting joints 94 and 100. The 3D locations of joints 94, 96, 100 and 102 (possibly supplemented by the location of hand 98) define the upper-body pose. If the computer had been able to identify the user's left arm, the upper-body skeleton would include both arms, but a single arm is sufficient for pose definition in this model.
To locate shoulder joints 100 and 102, computer 24 takes as initial inputs the location of head segment 90 and elbow joint 94, as determined at step 44 and described above. The computer may also extract the slope dZ/dX of the frontal plane of the user's chest from the depth values in depth map 35. Based on these inputs, the computer finds the pose in terms of the center point (X,Y,Z coordinates) of the chest between the shoulders; the slope dY/dX between the shoulders; and a body size parameter. As explained earlier, the computer finds the parameters corresponding to the pose that minimizes the error relative to the arm and head locations that were found at step 44. Multiple different poses may be tested in this fashion until the optimal upper-body pose is found.
It will be appreciated that the embodiments described above are cited by way of example, and that the present invention is not limited to what has been particularly shown and described hereinabove. Rather, the scope of the present invention includes both combinations and subcombinations of the various features described hereinabove, as well as variations and modifications thereof which would occur to persons skilled in the art upon reading the foregoing description and which are not disclosed in the prior art.

## Claims

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, comprising a series of neighboring pixels arranged consecutively along the ridge, whose respective depth values are local minima; and
responsively to the ridge, extracting features of the object from the depth map.

2. The method according to claim 1, wherein processing the depth map comprises finding each local minimum on a respective line oriented obliquely relative to the chain, while the respective depth values of the other pixels on the respective line are greater than the local minimum.

3. The method according to claim 1, wherein extracting the features comprises processing the depth map so as to locate one or more depth edges of the object, and applying the depth edges together with the ridge in order to reconstruct a three-dimensional shape of the object.

4. The method according to claim 1, wherein extracting the features comprises partitioning the chain into segments, fitting a line to each segment, and finding a location and orientation of the object based on the line.

5. The method according to claim 1, 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.

6. The method according to claim 1, wherein the series of neighboring pixels arranged consecutively along the ridge defines a line or curve.

7. Apparatus for processing data, comprising:
an imaging assembly, which is configured to capture a depth map of a scene containing an object of interest, the depth map comprising a matrix of pixels having respective pixel depth values; and
a processor, which is configured to process 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, comprising a series of neighboring pixels arranged consecutively along the ridge, whose respective depth values are local minima, and to extract, responsively to the ridge, features of the object from the depth map.

8. The apparatus according to claim 7, wherein the processor is configured to find each local minimum on a respective line oriented obliquely relative to the chain, while the respective depth values of the other pixels on the respective line are greater than the local minimum.

9. The apparatus according to claim 7, wherein the processor is configured to locate one or more depth edges of the object in the depth map, and to apply the depth edges together with the ridge in order to reconstruct a three-dimensional shape of the object.

10. The apparatus according to claim 7, wherein the processor is configured to partition the chain into segments, to fit a line to each segment, and to find a location and orientation of the object based on the line.

11. The apparatus according to claim 7, wherein the object is a head of a humanoid form, and wherein the processor is configured to find an increase in the respective depth values of the pixels at an upper end of the ridge, and to identify the object as the head responsively to the increase.

12. The method according to claim 7, wherein the series of neighboring pixels arranged consecutively along the ridge defines a line or curve.