Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
IN-HOME DEPTH CAMERA CALIBRATION
Document Type and Number:
WIPO Patent Application WO/2012/061493
Kind Code:
A2
Abstract:
A system and method are disclosed for calibrating a depth camera in a natural user interface. The system in general obtains an objective measurement of true distance between a capture device and one or more objects in a scene. The system then compares the true depth measurement to the depth measurement provided by the depth camera at one or more points and determines an error function describing an error in the depth camera measurement. The depth camera may then be recalibrated to correct for the error. The objective measurement of distance to one or more objects in a scene may be accomplished by a variety of systems and methods.

Inventors:
MASALKAR PRAFULLA J (US)
STACHNIAK SZYMON P (US)
LEYVAND TOMMER (US)
ZHANG ZHENGYOU (US)
DEL CASTILLO LEONARDO (US)
MATHE ZSOLT (US)
Application Number:
PCT/US2011/058951
Publication Date:
May 10, 2012
Filing Date:
November 02, 2011
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
MICROSOFT CORP (US)
International Classes:
H04N13/02
Foreign References:
US20100103266A12010-04-29
Other References:
FUCHS ET AL.: "Extrinsic and depth calibration of ToF-cameras", COMPUTER VISION AND PATTERN RECOGNITION, CVPR 2008, IEEE CONFERENCE, 23 June 2008 (2008-06-23), pages 1 - 6, XP031297386
MARVIN LINDNER ET AL.: "Advances in Visual Computing Lecture Notes in Computer Science; LNCS", 1 January 2006, SPRINGER, article "Lateral and Depth Calibration of PMD-Distance sensors", pages: 524 - 533
See also references of EP 2636223A4
Download PDF:
Claims:
CLAIMS

What is Claimed:

1. A method of recalibrating a depth image sensor, the depth sensor capturing image data from a 3-D space, the method comprising:

(a) measuring a depth value of at least one sample point in the 3-D space using the depth sensor;

(b) determining a true depth value of the at least one sample point independently of the measurement of said step (a);

(c) modeling a depth error resulting from a deviation in the true depth determined in said step (b) and the depth measured in said step (a); and

(d) correcting the depth measurements made by the depth sensor using the depth error modeled in said step (c).

2. The method of claim 1, said step (b) comprising the step of imaging a rigid calibration object presented to the depth image sensor, the size of the calibration object being known to a computing device performing said step (b).

3. The method of claim 2, further comprising the step (e) of translating the position of the calibration object into a reference coordinate system of an RGB sensor associated with the depth sensor using homography.

4. The method of claim 1, said step (b) comprising the steps of receiving a user indication of an x-axis or y-axis dimensional size of an object, and correlating the input size to a distance from the depth sensor based on a known correlation between size of an object and number of pixels depicting that object at given distances between the object and the depth sensor.

5. The method of claim 4, wherein the size of the object is a user's height.

6. The method of claim 1, said steps (a) and (b) comprising the step of measuring at least two sample points on a calibration object at at least two different locations in the 3-D space.

7. A computer-readable storage medium including instructions for programming a processor to perform a method of recalibrating a depth sensor of a natural user interface, the depth sensor capturing image data from a 3-D space, the method comprising:

(a) measuring the depth of two or more points on a calibration object within the 3-D space using the depth sensor;

(b) determining the true depth of the two or more points on the calibration object independently of the depth sensor;

(c) modeling a depth error resulting from a deviation in the true depth determined in said step (b) and the depth measured in said step (a); and

(d) compensating depth measurements made by the depth sensor using the depth error modeled in said step (c).

8. The computer-readable medium of claim 7, where, for linear depth errors, said step (c) comprises the step of modeling the error in the form of measured depth of said step (a) = a(true depth of said step (b)) - β, where the β component represents the depth at which the sensor and the true depth are equal to each other, and a represents the slope of a line defined between the true depth and depth measured by the depth image sensor.

9. A system for recalibrating a depth sensor of a natural user interface, the depth sensor capturing image data from a 3-D space, the system comprising:

(a) a calibration object positioned within the 3-D space; and

(b) a computing device associated with the depth sensor, the computing device including a recalibration engine for comparing a true depth values of points on the calibration object in the 3-D space against depth values measured by the depth sensor, and deriving an error model which describes a deviation between the true depth values and the depth values measured by the depth sensor.

10. The system of claim 9, wherein the calibration object is a calibration card having different regions having horizontal and vertical components, the regions defining a plurality of points at intersections of the horizontal and vertical components.

Description:
IN-HOME DEPTH CAMERA CALIBRATION

BACKGROUND

[0001] In the past, computing applications such as computer games and multimedia applications used controllers, remotes, keyboards, mice, or the like to allow users to manipulate game characters or other aspects of an application. More recently, computer games and multimedia applications have begun employing cameras and software gesture recognition engines to provide a natural user interface ("NUI"). With NUI, user gestures and speech are detected, interpreted and used to control game characters or other aspects of an application.

[0002] NUI systems use three-dimensional (3-D) depth cameras to capture 3-D data of a scene. Depth cameras require several components to be precisely aligned in order to properly measure depth. Even a slight misalignment can result in significant depth measurement error. Misalignment may occur due to a variety of conditions, including for example improper manufacturing, extreme temperatures or other environmental factors, dropping the camera or other physical damage, etc. Once the alignment is changed, the depth may be improperly reported in a number of ways. The results of this distortion can cause a shift in the camera's depth range, a transformation of an object's dimensions, or a variety of other distortions may occur. It is therefore desirable to provide a system for calibrating a depth camera to capture an accurate depth image, preferably with minimal impact on the user experience.

SUMMARY

[0003] The present technology, roughly described, relates to recalibrating a depth sensor used in a NUI system. The NUI system in general includes a capture device including a depth sensor and an RGB sensor. The depth projector may emit light onto a scene, which light is reflected back and sensed by the depth sensor and RGB sensor. The depth sensor uses the reflected light to determine the depth of objects within the scene. The present technology relates to a system for recalibrating a depth sensor to correct for any depth measurement error which may occur after factory calibration of the depth sensor.

[0004] In general, the present system obtains a true depth measurement to an object in a field of view. The system then compares the true depth measurement to a depth measurement provided by the depth sensor to define an error model of the deviation. The present system provides a variety of methods for determining true depth measurements of one or more objects in a scene independently of the depth measurement obtained from the depth sensor. In straightforward embodiments, the depth sensor may simply be adjusted to the true depth. In further embodiments, more complex mathematical schemas may be developed to model depth error. The depth error may then be compensated for by minimizing the depth error.

[0005] One example of the present technology relates to a method of recalibrating a depth sensor of a natural user interface, the depth sensor capturing image data from a 3-D space. The method comprising the steps: (a) measuring a depth value of at least one sample point in the 3-D space using the depth sensor; (b) determining a true depth value of the at least one sample point independently of the measurement of said step (a); (c) modeling a depth error resulting from a deviation in the true depth determined in said step (b) and the depth measured in said step (a); and (d) correcting the depth measurements made by the depth sensor using the depth error modeled in said step (c).

[0006] A further example of the present technology relates to a computer-readable storage medium including instructions for programming a processor to perform a method of recalibrating a depth sensor of a natural user interface, the depth sensor capturing image data from a 3-D space. The method comprising the steps: (a) measuring the. depth of two or more points on a calibration object within the 3-D space using the depth sensor; (b) determining the true depth of the two or more points on the calibration object independently of the depth sensor; (c) modeling a depth error resulting from a deviation in the true depth determined in said step (b) and the depth measured in said step (a); and (d) compensating depth measurements made by the depth sensor using the depth error modeled in said step (c).

[0007] In another example, the present technology relates to a system for recalibrating a depth sensor of a natural user interface, the depth sensor capturing image data from a 3- D space, the system comprising: a calibration object positioned within the 3-D space; and a computing device associated with the depth sensor, the computing device including a recalibration engine for comparing a true depth values of points on the calibration object in the 3-D space against depth values measured by the depth sensor, and deriving an error model which describes a deviation between the true depth values and the depth values measured by the depth sensor.

[0008] This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter. Furthermore, the claimed subject matter is not limited to implementations that solve any or all disadvantages noted in any part of this disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

[0009] FIGURE 1 illustrates an example embodiment of a target recognition, analysis, and tracking system.

[0010] FIGURE 2 illustrates a further example embodiment of a target recognition, analysis, and tracking system.

[0011] FIGURE 3 illustrates an example embodiment of a capture device that may be used in a target recognition, analysis, and tracking system.

[0012] FIGURE 4 is a flowchart for calibrating a depth sensor according to a first embodiment of the present technology.

[0013] FIGURE 5 is an illustration of a user in a field of view of a capture device.

[0014] FIGURE 6 is a depth image of the user of Fig. 5.

[0015] FIGURE 7 is a high level flowchart for calibrating a depth sensor according to a second embodiment of the present technology.

[0016] FIGURE 8 is a graph of sample points measured by a depth sensor and the true determined depth of the same sample points.

[0017] FIGURE 9 is an illustration of a user holding a calibration object positioned in a field of view of a capture device.

[0018] FIGURE 10 is an enlarged view of the calibration object.

[0019] FIGURE 11 is an enlarged view of the calibration object showing reference points which may be identified by the capture device.

[0020] FIGURE 12 is a view of the calibration object displayed to the user with a target for positioning the calibration object at a certain depth from the capture device.

[0021] FIGURE 13 is a flowchart for detecting points in the calibration object.

[0022] FIGURE 14 is an illustration of a plane of the calibration object relative to a coordinate system of the depth camera and relative to a coordinate system of the RGB camera.

[0023] FIGURE 15 is a flowchart for translating points in the plane of the calibration object to a reference frame of the RGB camera and then determining an error function based on the sample points measured by the RGB camera.

[0024] FIGURE 16 is a top view of a light ray projected from a projector, reflecting off of a sample point and incident on the depth sensor. [0025] FIGURE 17 is a top view as in Fig. 16, showing an error in the depth optics and a method for determining the error according to a third embodiment of the present technology.

[0026] FIGURE 18 is a graph of depth error over a range of error angles E.

[0027] FIGURE 19 is a graph of a depth error across the field of view.

[0028] FIGURE 20 is a graph of points of an object measured by an operation for determining true depth of the points, and the same points measured by the depth sensor and distorted by a depth error.

[0029] FIGURE 21 is a graph showing the degree and location of the distortion in the graph of Fig. 20.

[0030] FIGURE 22 shows a field of view including a generalized transformation from depth-camera space to world space, with correction for the misalignment angle E.

[0031] FIGURE 23 shows two sets of points on a rigid body measured at two different locations according to a fourth embodiment of the present technology.

[0032] FIGURE 24 A illustrates an example embodiment of a computing device that may be used to interpret one or more gestures in a target recognition, analysis, and tracking system.

[0033] FIGURE 24B illustrates another example embodiment of a computing device that may be used to interpret one or more gestures in a target recognition, analysis, and tracking system.

DETAILED DESCRIPTION

[0034] Embodiments of the present technology will now be described with reference to Figs. 1-24B which in general relate to a system for calibrating a depth camera. The system in general obtains an objective measurement of distance between a depth camera and one or more objects in a scene, referred to herein as true depth. The system then compares the true depth measurement to the depth measurement provided by the depth camera at one or more points and determines an error function describing an error in the depth camera measurement. The depth camera may then be recalibrated to correct for the error. The objective measurement of distance to one or more objects in a scene may be accomplished by a variety of systems and methods. These systems and methods are described below.

[0035] Referring initially to Figs. 1-3, the hardware for implementing the present technology includes a target recognition, analysis, and tracking system 10 which may be used to recognize, analyze, and/or track a human target such as the user 18. Embodiments of the target recognition, analysis, and tracking system 10 include a computing environment 12 for executing a gaming or other application. The computing environment 12 may include hardware components and/or software components such that computing environment 12 may be used to execute applications such as gaming and non-gaming applications. In one embodiment, computing environment 12 may include a processor such as a standardized processor, a specialized processor, a microprocessor, or the like that may execute instructions stored on a processor readable storage device for performing processes described herein.

[0036] The system 10 further includes a capture device 20 for capturing image and audio data relating to one or more users and/or objects sensed by the capture device. In embodiments, the capture device 20 may be used to capture information relating to movements, gestures and speech of one or more users, which information is received by the computing environment and used to render, interact with and/or control aspects of a gaming or other application. Examples of the computing environment 12 and capture device 20 are explained in greater detail below.

[0037] Embodiments of the target recognition, analysis and tracking system 10 may be connected to an audio/visual device 16 having a display 14. The device 16 may for example be a television, a monitor, a high-definition television (HDTV), or the like that may provide game or application visuals and/or audio to a user. For example, the computing environment 12 may include a video adapter such as a graphics card and/or an audio adapter such as a sound card that may provide audio/visual signals associated with the game or other application. The audio/visual device 16 may receive the audio/visual signals from the computing environment 12 and may then output the game or application visuals and/or audio associated with the audio/visual signals to the user 18. According to one embodiment, the audio/visual device 16 may be connected to the computing environment 12 via, for example, an S-Video cable, a coaxial cable, an HDMI cable, a DVI cable, a VGA cable, a component video cable, or the like.

[0038] In embodiments, the computing environment 12, the A V device 16 and the capture device 20 may cooperate to render an avatar or on-screen character 19 on display 14. In embodiments, the avatar 19 mimics the movements of the user 18 in real world space so that the user 18 may perform movements and gestures which control the movements and actions of the avatar 19 on the display 14. [0039] As shown in Figs. 1 and 2, in an example embodiment, the application executing on the computing environment 12 may be a soccer game that the user 18 may be playing. For example, the computing environment 12 may use the audiovisual display 14 to provide a visual representation of an avatar 19 in form of a soccer player controlled by the user. The embodiment of Fig. 1 is one of many different applications which may be run on computing environment 12 in accordance with the present technology. The application running on computing environment 12 may be a variety of other gaming and non-gaming applications. Moreover, the system 10 may further be used to interpret user 18 movements as operating system and/or application controls that are outside the realm of games or the specific application running on computing environment 12. As one example shown in Fig. 2, a user may scroll through and control interaction with a variety of menu options presented on the display 14. Virtually any controllable aspect of an operating system and/or application may be controlled by movements of the user 18.

[0040] Suitable examples of a system 10 and components thereof are found in the following co-pending patent applications, all of which are hereby specifically incorporated by reference: United States Patent Application Serial No. 12/475,094, entitled "Environment and/or Target Segmentation," filed May 29, 2009; United States Patent Application Serial No. 12/511,850, entitled "Auto Generating a Visual Representation," filed July 29, 2009; United States Patent Application Serial No. 12/474,655, entitled "Gesture Tool," filed May 29, 2009; United States Patent Application Serial No. 12/603 * 437, entitled "Pose Tracking Pipeline," filed October 21, 2009; United States Patent Application Serial No. 12/475,308, entitled "Device for Identifying and Tracking Multiple Humans Over Time," filed May 29, 2009, United States Patent Application Serial No. 12/575,388, entitled "Human Tracking System," filed October 7, 2009; United States Patent Application Serial No. 12/422,661, entitled "Gesture Recognizer System Architecture," filed April 13, 2009; United States Patent Application Serial No. 12/391,150, entitled "Standard Gestures " filed February 23, 2009; and United States Patent Application Serial No. 12/474,655, entitled "Gesture Tool," filed May 29, 2009.

[0041] Fig. 3 illustrates an example embodiment of the capture device 20 that may be used in the target recognition, analysis, and tracking system 10. In an example embodiment, the capture device 20 may be configured to capture video having a depth image that may include depth values via any suitable technique including, for example, time-of-flight, structured light, stereo image, or the like. According to one embodiment, the capture device 20 may organize the calculated depth information into "Z layers," or layers that may be perpendicular to a Z axis extending from the depth camera along its line of sight.

[0042] As shown in Fig. 3, the capture device 20 may include an image camera component 22. According to an example embodiment, the image camera component 22 may be a depth camera that may capture the depth image of a scene. The depth image may include a two-dimensional (2-D) pixel area of the captured scene where each pixel in the 2-D pixel area may represent a depth value such as a length or distance in, for example, centimeters, millimeters, or the like of an object in the captured scene from the camera.

[0043] As shown in Fig. 3, according to an example embodiment, the image camera component 22 may include an IR light component 24, a 3-D depth camera 26, and an RGB camera 28 that may be used to capture the depth image of a scene. For example, in time- of-flight analysis, the IR light component 24 of the capture device 20 may emit an infrared light onto the scene and may then use sensors (not shown) to detect the backscattered light from the surface of one or more targets and objects in the scene using, for example, the 3- D camera 26 and/or the RGB camera 28.

[0044] In some embodiments, pulsed infrared light may be used such that the time between an outgoing light pulse and a corresponding incoming light pulse may be measured and used to determine a physical distance from the capture device 20 to a particular location on the targets or objects in the scene. Additionally, in other example embodiments, the phase of the outgoing light wave may be compared to the phase of the incoming light wave to determine a phase shift. The phase shift may then be used to determine a physical distance from the capture device 20 to a particular location on the targets or objects.

[0045] According to another example embodiment, time-of-flight analysis may be used to indirectly determine a physical distance from the capture device 20 to a particular location on the targets or objects by analyzing the intensity of the reflected beam of light over time via various techniques including, for example, shuttered light pulse imaging.

[0046] In another example embodiment, the capture device 20 may use a structured light to capture depth information. In such an analysis, patterned light (i.e., light displayed as a -known pattern such as a grid pattern or a stripe pattern) may be projected onto the scene via, for example, the IR light component 24. Upon striking the surface of one or more targets or objects in the scene, the pattern may become deformed in response. Such a deformation of the pattern may be captured by, for example, the 3-D camera 26 and/or the RGB camera 28 and may then be analyzed to determine a physical distance from the capture device 20 to a particular location on the targets or objects.

[0047] According to another embodiment, the capture device 20 may include two or more physically separated cameras that may view a scene from different angles, to obtain visual stereo data that may be resolved to generate depth information. In another example embodiment, the capture device 20 may use point cloud data and target digitization techniques to detect features of the user.

[0048] The capture device 20 may further include a microphone 30. The microphone 30 may include a transducer or sensor that may receive and convert sound into an electrical signal. According to one embodiment, the microphone 30 may be used to reduce feedback between the capture device 20 and the computing environment 12 in the target recognition, analysis, and tracking system 10. Additionally, the microphone 30 may be used to receive audio signals that may also be provided by the user to control applications such as game applications, non-game applications, or the like that may be executed by the computing environment 12.

[0049] In an example embodiment, the capture device 20 may further include a processor 32 that may be in operative communication with the image camera component 22. The processor 32 may include a standardized processor, a specialized processor, a microprocessor, or the like that may execute instructions that may include instructions for receiving the depth image, determining whether a suitable target may be included in the depth image, converting the suitable target into a skeletal representation or model of the target, or any other suitable instruction.

[0050] The capture device 20 may further include a memory component 34 that may store the instructions that may be executed by the processor 32, images or frames of images captured by the 3-D camera or RGB camera, or any other suitable information, images, or the like. According to an example embodiment, the memory component 34 may include random access memory (RAM), read only memory (ROM), cache, Flash memory, a hard disk, or any other suitable storage component. As shown in Fig. 3, in one embodiment, the memory component 34 may be a separate component in communication with the image camera component 22 and the processor 32. According to another embodiment, the memory component 34 may be integrated into the processor 32 and/or the image camera component 22. [0051] As shown in Fig. 3, the capture device 20 may be in communication with the computing environment 12 via a communication link 36. The communication link 36 may be a wired connection including, for example, a USB connection, a Firewire connection, an Ethernet cable connection, or the like and/or a wireless connection such as a wireless 802.1 lb, g, a, or n connection. According to one embodiment, the computing environment 12 may provide a clock to the capture device 20 that may be used to determine when to capture, for example, a scene via the communication link 36.

[0052] Additionally, the capture device 20 may provide the depth information and images captured by, for example, the 3-D camera 26 and/or the RGB camera 28, and a skeletal model that may be generated by the capture device 20 to the computing environment 12 via the communication link 36. A variety of known techniques exist for determining whether a target or object detected by capture device 20 corresponds to a human target. Skeletal mapping techniques may then be used to determine various spots on that user's skeleton, joints of the hands, wrists, elbows, knees, nose, ankles, shoulders, and where the pelvis meets the spine. Other techniques include transforming the image into a body model representation of the person and transforming the image into a mesh model representation of the person.

[0053] The skeletal model may then be provided to the computing environment 12 such that the computing environment may perform a variety of actions. The computing environment may further determine which controls to perform in an application executing on the computer environment based on, for example, gestures of the user that have be'en recognized from the skeletal model. For example, as shown, in Fig. 3, the computing environment 12 may include a gesture recognition engine 190 for determining when the user has performed a predefined gesture. Various embodiments of the gesture recognition engine 190 are described in the above incorporated applications. In accordance with the present system, computing device 12 may further include a depth recalibration engine 194 for determining a true measure of depth to one or more objects in a field of view (FOV) independently of the depth value provided by the depth camera 26, and then recalibrating the depth camera 26 to compensate for any deviation. Various embodiments of the depth recalibration engine 194 are described below.

[0054] As mentioned in the Background section, it may happen that the 3-D depth camera 26 may lose its calibration so that the depth measurements taken by the camera are not accurate. Inaccurate depth measurements can have several effects. In case of depth cameras used with gaming systems, such errors can make the user appear closer or farther than he really is. Alternatively, the user may appear shorter or taller than his actual height. Alternatively, the. depth can widen the user in any axis, as well as skew and deform the user in any axis. A situation like this can easily make the software reach its limits. For example, if the software is limited to supporting users that are at least a certain height, a user which is improperly determined to be shorter than that will not be recognized by the software. The same can happen to a tall user at the opposite limit of the software's capability. Improper calibration of the depth camera 26 may result in a variety of other errors, distortions and complications.

[0055] In general, the present system therefore includes depth recalibration engine 194 for determining true depth measurements for one or more objects in the FOV. The depth recalibration engine 194 may then recalibrate the depth camera 26 (also referred to as the depth sensor) to compensate for any depth distortion. In straightforward embodiments, the depth sensor may simply be adjusted to the true depth determined by the depth recalibration engine 194. In further embodiments, more complex mathematical schemas may be developed to model depth error. The recalibration performed by the recalibration engine 194 may then correct the measured depth by minimizing the depth error. Various embodiments for the operation of depth recalibration engine 194 are set forth below.

[0056] In a first embodiment described with respect to Figs. 4-6, the depth recalibration engine operates by a user inputting his or her height, and then determining whether the measured pixel height (or arm span) correlates to this height. Referring initially to the flowchart of Fig. 4, in step 200, the recalibration engine 194 detects a problem possibly resulting from incorrect depth data. If no such problem is detected by the engine 194, the system next checks in step 204 whether a user has indicated a desire to perform a recalibration operation. If a problem is detected in step 200, or if a user requests to enter recalibration mode in step 204, then the recalibration engine 194 performs a recalibration operation of the depth camera 26.

[0057] In step 208, the recalibration engine 194 computes a user's height based on the depth measurement of depth camera 26 and the number of pixels in the measured depth image. In particular, a user is prompted to stand in front of the capture device 20, as shown for example in Fig. 5. The number of pixels along the y-axis may then be determined from the 11-bit gray scale VGA depth map by thresholding. The data may be taken over a number of frames and averaged to determine the correct number of pixels in a user's height along the y-axis. In some embodiments, the user may also be prompted to extend their arms outward as shown in Fig. 5 and as explained below. [0058] At each distance measured from the camera 26, there is a known correlation between the number of pixels in along a y-axis in the depth image, shown in Fig. 6, and the height of a user. For example, at 2.5m, the system expects a 175cm person to occupy 41 1 pixels along the y-axis. Thus, step 208 computes a user's expected height based on the measured depth and the number of pixels in the user's depth image along the y-axis. As explained below, the system may alternatively or additionally measure a user's "arm span," i.e., measured distance along an x-axis between the tips of the user's outstretched arms.

[0059] In step 210, the recalibration engine 194 may then prompt a user for his or her height. The step of prompting a user for height may occur before step 208 in further embodiments. The system may prompt a user for his height by a variety of methods via the NUI system 10. For example, the display 14 may have a virtual wheel or other visual indicator with a range of heights display. A user can swipe his or her hand or perform some other predefined gesture recognized by gesture recognition engine 190 until the appropriate height is displayed. A user may then select that height via another gesture. Alternatively, the user may verbally input their height.

[0060] In step 214, the recalibration engine determines whether the sensor height measured in step 208 matches the true height input by the user in step 210. If the heights match to within some tolerance, no recalibration is needed (step 218), and the recalibration engine 194 ends. On the other hand, if there is a disparity above some predefined tolerance, the recalibration engine determines the distance at which a user would be standing, based on the input height and the number of pixels along the y-axis in the depth image. The known relationship between pixels and height may then be corrected to the new relationship in step 224 to recalibrate the depth measurement of the camera 26. In embodiments, the steps 208 through 220 may be performed using a single sample.

Alternatively, a user may be prompted to stand at a variety of different distances so that the system may have more data with which to adjust the relationship between y-axis pixels and height.

[0061] It may happen that it is difficult for the capture device to determine the location of a user's feet in an image (which is necessary to determine the lowermost pixels in the image and overall number of pixels along the y-axis). Even where the number of pixels along the y-axis is clear, it may be desirable to provide a confirmation of the measured values. Accordingly, in addition to or instead of using the number of pixels along the y- axis in the depth image of Fig. 6, the recalibration engine 194 may use the number of pixels along the x-axis between the tips of the user's outstretched arms. Using the measured arm span, and a known correlation between arm span the number of pixels measured for arm span at each depth distance, the system may determine depth distance as described above in step 208. The true arm span may be determined in step 210 by a user providing their height. Using a known correlation between height and arm span, the user's arm span may then be determined. For example, one known correlation may be that arm span = 0.95 (height). The system may then compare the measured distance from the determined distance ins step 214 as described above.

[0062] In the embodiment described above, the object used to calibrate the depth camera 26 is the user's own body. In further embodiments, the steps 208 through 224 may be performed using an object other than the user's body for recalibration purposes. As long as the object is of fixed dimensions, which dimensions are known to the computing device 12, the system can determine a known relationship, at each distance, between the object dimensions and the number of pixels the object should take up along the x-axis and/or y-axis in the depth map. The object may for example be a piece of 8 ½ x 1 1 paper. Alternatively, the object may be a special calibration object provided with the system 10. Examples of such calibration objects are described below.

[0063] As indicated, the recalibration engine 194 may work by a variety of different methods. In one set of embodiments, the recalibration engine 194 relies on modeling depth camera error, and then using an object to infer the relationship between the depth properties measured by the depth camera and the real depth properties measured by one of a variety of methods and systems. As used herein, "sensor depth" refers to depth properties that are measured by the depth camera (which may require calibration), and "true depth" refers to the correct depth measured and/or computed by objective criteria. Depending on the nature and complexity of the depth camera error, and the feasibility in implementation of a given technique, there are various techniques that may be used to solve the problem and model depth error.

[0064] One set of techniques makes use of acquiring multiple sensor depth readings of a fixed sized object, where through some method, true depth measurements of the object can be acquired at the same time as the sensor depth is queried. Calibration is then achieved by the recalibration engine 194 by correlating the sensor depth with real depth by fitting the points to an error model that is known for the camera. The present technology does not limit the complexity of this model; it simply requires that enough samples are taken to fit the model through collected points. There are several ways for the true depth to be computed. Some examples explained below use a fixed size object for calibration where the size of the object is known. Another example explained below uses a fixed size object for calibration where the size of the fixed object is not known. [0065] One technique of the recalibration engine 194 for modeling and compensating for camera error uses a fixed object of known size and RGB homography. Referring to the flowchart of Fig. 7, in general, this technique begins with mathematically modeling the error of the depth camera in step 230. In step 234, this technique then detects feature points on a fixed calibration object of known size, which may for example be a card referred to herein as a calibration card. This technique then computes true depth of the calibration card using homography in step 236. The true depth is then correlated to the sensor depth reading taken by the depth camera in step 238. Further details of these steps are provided below.

[0066] In this example, the process begins with a mathematical model of the error in step 230. For a given capture device 20, it is possible to estimate the error using a linear model, describing the error using two variables, alpha (a) and beta (β) where:

Zsensor depth = Ct(Ztru e depth) - β· (1)

Fig. 8 demonstrates a linear error reading where the depth sensor is measured at various distances and compared against the true depth. The β component represents the depth at which the sensor and the true depth are equal (the intercept), and a represents the slope of the line. By computing both of these values, the incoming sensor depth can be converted into real depth, by inverting the error.

[0067] The example shown uses a linear error function, because it reduces the work needed from the user in obtaining depth measurements at different points and calibrates the depth camera 26 to acceptable levels. However, it is understood that more complex and non-linear error functions may alternatively be used.

[0068] With regard to detection of feature points in the calibration card in step 234, the RGB homography method requires a set of image feature points for which real world measurements can be obtained. An example of a calibration object in the form of a calibration card 150 is shown held by a user 18 in Fig. 9, and an enlarged view of the calibration object 150 is shown in Fig. 10. As shown in Fig. 11, the calibration card 150 has 16 feature points 152, each at the intersections of the borders of the different colored regions in the card 150. The calibration card 150 may also have a user-guidance image 154, which in the example shown is in the shape of a face. The purpose of user-guidance image 154 is explained below. The calibration card 150 shown in the figures is simply one example of a calibration object which may be used. In further embodiments, the calibration object may be a card or other object having a variety of other feature points for the purpose described below. The size of the card and the distance between feature points may be known. The user-guidance image 156 may be other image objects or may be omitted.

[0069] While there are known techniques for finding the feature points 152 using the capture device 20, a sample feature point algorithm may be used to identify the feature points at different depth measurements. An example of the operation of the sample feature point algorithm are described with respect to the flowchart of Fig. 13. One advantage to the sample feature point algorithm is that it makes it simple for users to provide the samples and its robustness. In a step 250, a user is prompted to hold the calibration card 150 a given distance from the capture device 20. In one example, the computing device 12 may display a pair of glasses 156 on display 14 as shown in Fig. 12. The glasses 156 may include a pair of circular targets 158 spaced apart a given distance.

[0070] An image of the calibration card 150 including user-guidance image 154 is displayed on the screen. The size of the user-guidance image 154 will depend on how far the card 150 is positioned from the capture device 20. Where the user is far away, the displayed card will be relatively small and the eyes of the user-guidance image 154 will be relative close together. Conversely, where the user is close, the displayed card will be relatively large and the eyes of the user-guidance image 154 will be relative far apart. The user is asked to roughly fit the eyes from user-guidance image 154 into the two targets 158, as shown in Fig. 12. The size of the glasses 156 displayed on the display 14 will vary for different samples, based on the desired distance of the card from the capture device for a given sample. Thus, the spacing between the targets 158 will generally dictate how close or far the card 150 is held from capture device 20.

[0071] By adjusting the size of that target, the user is forced to hold the card at different "distance buckets." The user is asked to hold the card at several general distances, for example, 1.4m, 1.7m, 2.1m and 2.5m. (if the user has that much room). Having more buckets produces a more accurate calibration, but is not mandatory. The user-guidance image 154 and targets 158 are merely one example of a method for easily prompting a user to position the calibration card an approximate distance from the capture device 20. It is appreciated that a wide variety of other methods may be used whereby a user 18 is prompted to position the calibration card 150 at different distances from the capture device 20. It is not critical that the distances be precise. The method merely provides for diverse distance measurements.

[0072] Once the calibration card is positioned at a give distance for a sample, the image of the calibration card captured by the RGB camera 28 is converted in step 254 into a luminance image for processing. The luminance image may then be thresholded in step 258 to separate white from black in step 258. One method of thresholding to black and white is disclosed in the publication to Nobuyuki Otsu, entitled "A threshold selection method from gray-level histograms," IEEE Trans. Sys., Man., Cyber. 9: 62-66. (1979), which publication is incorporated by reference herein in its entirety. This technique allows the algorithm to be more lighting independent, specifically the behavior of the edge detection, but other algorithms may be used to separate the white from black in the converted RGB luminance image.

[0073] With the eyes from user-guidance image 154 aligned within targets 158, a circle finding algorithm is run on the area inside the glasses in step 262 to determine the location of the eyes within the targets 158. Circle finding algorithms such as a Hough transform may be used, such as described in U. S. Patent 3,069,654 to Hough entitled, "Method And Means For Recognizing Complex Patterns," which patent is incorporated by reference herein in its entirety. Other circle finding algorithms may be used. Where other shapes are used in user-guidance image 154, these shapes may be similarly identified by known algorithms. The location of the eyes in the luminance map space provides an estimate of the location and distance of the calibration card 150. This allows guidance of feature detection making it more robust. In particular, given the eye proposal, the size and position of the card is estimated in luminance image space.

[0074] For each calibration card border edge, lines may be detected in step 264, for example by running a line detector algorithm in a window where the edges are expected. In the calibration card 150 of this example, this generates eight lines. The algorithm confirms that eight lines found contain four horizontal and four vertical lines. The algorithm next intersects the four horizontal and four vertical lines against each other in step 268 to generate 16 points.

[0075] Identification of me 16 points generates an estimate of where the card is. The algorithm may double check for false positives in step 270 by using template matching. With the estimate of the location/size of the card, a check is performed to confirm the pixels are black/white where they are expect to be. If this passes a threshold, the feature points are considered valid and are passed to a homography algorithm, from which a true depth value of the center of the card may be computed, together with an error value. The homography algorithm is described below.

[0076] Using the above technique together with the homography algorithm, alpha and beta may be computed in order to perform depth correction. Steps 250 through 270 of Fig. 13 provide some number of depth buckets each of which contains a small set of true/sensor depth pairs. As explained below, the point sets may be run through a least square line fit to generate a linear estimate of the error. The alpha and beta components are extracted from this line, and are used to convert sensor depth to real depth, calibrating the camera.

[0077] In general, the homography algorithm performs a transformation from a reference plane in which the points of the calibration card 150 lie to the reference systems of the depth camera 26 and RGB camera 28. These various geometric relations are shown in Fig. 14. Assuming the z-plane of the plane coordinate system coincides with the plane of calibration card 150. A point on the plane is denoted by M = [X; Y; 0] T with the z- component equal to 0. The plane coordinate system is related to the RGB camera coordinate system by rotation R and translation t, and the point M in the RGB camera coordinate system is given by

M c = JIM + t. (2)

[0078] The point M is projected to the image plane at m = [u; v] T . The RGB camera 28 coordinate system is related to the depth camera 26 coordinate system by rotation RD and translation tD, and the point M in the RGB camera coordinate system is given by

M 0 = X D M C + H D JIM + Jl D t + t D (3)

Here, RD and tD are determined at the manufacture of the capture device 20, and are assumed not changed.

[0079] Given these definitions, the recalibration of the depth camera 26 may be performed by following the steps shown in Fig. 15. In particular, given a set of known points {Mj} (at least 4) on a plane of calibration card 150, and their measured depth values {¾ ¾ } provided by the depth camera 26, where " ' " is used to denote the measure sensor depth value, recalibration may be performed by a step 276 of detecting corresponding points in the image plane of calibration card 150, denoted by {m;}. In step 280, the algorithm homography algorithm determines the homography matrix H between {M,} and {m;}. In step 282, the homography algorithm determines the rotation and translation (R, t) from H. In step 286, the algorithm computes the coordinates {Mj}, denoted by {MD , in the depth camera 28 coordinate system, using equation (3). And in step 288, a and β are determined for use in the error function of equation (1) from a} (which is the z component of β) and {¾}. The mathematical support for these calibration steps is set forth below.

[0080] The constraints on the depth camera's intrinsic parameters may be examined with respect to a single plane, e.g., the plane of calibration card 150. A 2D point on the plane is denoted by m = [u; v] T . A 3D point on the plane is denoted by M = [X; Y; Z] T . x may be used to denote the augmented vector by adding 1 as the last element: m = [u; v; 1] T and M = [X; Y; Z; 1] T A camera is modeled by the usual pinhole: the relationship between a 3D point M and its image projection m is given by sfn = A[X t ]M (4)

where s is an arbitrary scale factor; (R, t), called the extrinsic parameters, is the rotation and translation which relates the world coordinate system to the camera coordinate system; and A, called the camera intrinsic matrix, is given by

with (uo; vo) being the coordinates of the principal point, α„ and a v being the scale factors in image u and v axes, and θ being the parameter describing the angle of the two image axes (usually very close to 90). The abbreviation A "T is used for (A _1 ) T or (A 1 ) "1 .

[0081] With regard to the homography between the model plane and its image, it may be assumed that the model plane is on Z = 0 of the world coordinate system. The z ' th column of the rotation matrix R may be denoted by r . From (4) therefore:

= A [r x r 2 t]

[0082] M still may be used to denote a point on the model plane, but = [X, Y] since Z is always equal to 0. In turn, M=[X, Y, 1] T . Therefore, a model point M and its image m is related by a homography H:

sm=HM with H = A [r 1 r 2 t] (5) The 3 x 3 matrix H is defined up to a scale factor. [0083] Using the above, the homography between the model plane and its image may be estimated in a variety of ways. One technique may be based on maximum likelihood criterion. Let M t and ni l be the model and image points, respectively. Ideally, they should satisfy (5). In practice, they may not because of noise in the extracted image points. If it is assumed that mi is corrupted by Gaussian noise with means 0 and covariance matrix Ami. Then, the maximum likelihood estimation of H is obtained by minimizing the following functional where mi = with hj, the ith row of H.

[0084] In practice, it may be assumed that Ami = σ 2 I for all i. This is reasonable if points are extracted independently with the same procedure. In this case, the above problem becomes a nonlinear least-squares one, i.e., min H ∑j||m t — f i || 2 . The nonlinear minimization is conducted with the Levenberg-Marquardt Algorithm as implemented in Minpack. See, for example, the publication by J. More, "The Levenberg-Marquardt Algorithm, Implementation and Theory," Numerical Analysis, Lecture Note in Mathematics p. 630, Springer- Verlag (1977), which publication in incorporated by reference herein in its entirety.

[0085] This nonlinear minimization requires an initial guess, which can be obtained as follows. Let * = K , h , ¾] T . Then equation (5) can be rewritten as:

0 T M T -vM T \

[0086] Where there are n points, there are n above equations, which can be written in matrix equations as Lx = 0, where L is a 2n χ 9 matrix. As x is defined up to a scale factor, the solution is well known to be the right singular vector of L associated with the smallest singular value (or equivalently, the eigenvector of L T L associated with the smallest eigenvalue).

[0087] In L, some elements are constant 1, some are in pixels, some are in world coordinates, and some are multiplications of both. This makes L poorly conditioned numerically. Alternative results can be obtained by performing a simple data normalization, for example, the image coordinates can be normalized to the range (-1,1) and the coordinates of the points on the plane can also be in the range (-1, 1) using appropriate unit comparable to the plane size. [0088] The above may be used to determine the rotation and translation from the homography. Once H is obtained, since the intrinsic parameters of the camera A is known, from (5), the result is: - n =x A- 1 ^ (6) r 2 =x l- 1 /i 2 (7) r 3 = r 1 x r 2 (8) t = A ~1 h 3 (9) with x = l/l^ -1 ^ !! = l/||i4 -1 /i 2 || . Because of noise in the data, the so-computed matrix Q = [ri, r 2 , r 3 ] does not in general satisfy the properties of a rotation matrix.

[0089] The problem considered below is to solve the best rotation matrix R to approximate a given 3 x 3 matrix Q. Here, "best" is in the sense of the smallest Frobenius norm of the difference R - Q. That is, the following problem is being solved:

min\\R - Q || subject to R T R = / (10)

[0090] Since

\\R - Q \\ = trace ((R - QY(R - Q))

= 3 + trace (Q T Q) - Itrace (R T Q

problem (10) is equivalent to the one of maximizing trace (Λ Γ( ?).

[0091] Let the singular value decomposition of Q be USV T , where S = diag (oi, σ 2 , σ 3 ). If an orthogonal matrix Z by Z = V T R T U is defined, then

trace(R T Q) = trace(R T USV T ) = trace V T R T US)

= trace(ZS) = ∑f =1 z u a t ≤ ∑ =1 σ £ .

[0092] The maximum is achieved by setting R = UV T because then Z = I. This gives the solution to (10).

[0093] In the above paragraphs, the rotation and translation is estimated through the estimation of the homography matrix. This estimation can be refined through maximum likelihood inference. Assume that an image point mj is corrupted by noise with mean 0 and covariance matrix Ami. Then, the maximum likelihood estimation of (R, t) can be obtained by minimizing the following functional

i (m i - m(R, t, M i )) T An)(m i - m(R, t, M i -)), (1 1) where τη(β, t, M ) is the projection of point M { in the image plane, according to equation (5). A rotation R is parameterized by a vector of 3 parameters, denoted by r, which is parallel to the rotation axis and whose magnitude is equal to the rotation angle. R and r are related by the Rodrigues formal. See for example the publication by Z. Zhang ' et al. "3D Dynamic Scene Analysis: A Stereo Based Approach," Springer, Berlin, Heidelberg (1992). Minimizing (1 1) is a nonlinear minimization problem, which is solved with the Levenberg-Marquardt Algorithm as implemented in Minpack, as described above.

[0094] Another method performed by the recalibration engine 194 of determining an error model for recalibration purposes is referred to as "screen space measurement" and is now described with respect to Figs. 16-22. In general, the screen space measurement looks at points on an object, such as the calibration object 150 discussed above, and determines how the measured depth values deviate from the true depth values. This technique then attempts to define an error model that explains the deviation. This technique take into consideration two effects of measurement error: scaling, which affects all dimensions equally and is independent of the location in space, and spatial distortion, which is scaling that draws a dependency on one or more of the spatial coordinates. The ideal system has a scaling factor of 1 and no spatial distortion. In practice, depth measurement error causes the system to vary from the ideal.

[0095] Fig. 16 is a top view illustrating a projector, which may for example be IR light component 24, and an imager, which may for example be depth camera 26. The depth (Z) of a pixel (P) is determined by the distance, S, between the projector 24 and imager 2, and the angles A and B. Fig. 16 is a plane view from above the camera field of view. Light from the projector is reflected by an object at point P, which is then incident upon the imager. The angles A and B can be related to the projected image and the imager based on pattern recognition and the location of the pixel in the field of view. The distance S is a constant for the depth imager. From Fig. 16, the following trigonometric relationship can be derived:

z

tan 0 ) x+s z

tan(B) x z z

- S

tan(B) tan(yl) z z

S =

tan(/l) tan(B) [0096] As noted, depth error can be introduced into the system due to an angular shift of the projector, in the top-down plane view, relative to the position it was when the system was calibrated. Such a shift would constitute a misalignment of the optical axes of the projector and imager relative to their calibrated positions. In Fig. 16, the calibrated depth imager reports the depth of an object at point P as the sensor depth.

[0097] If, after calibration, the projector is offset by an angle E, the same ray of the projected pattern incident on point P' would return along the same path as the previous calibrated case, resulting in a reported depth equivalent to the point P in the calibrated case. Hence, after the post-calibration shift, the depth of point P', which is located at the true depth = Zactual and laterally at dimension Xactual, is reported as Zreported and Xreported. The difference between P and P' is the resultant reporting error.

[0098] Using the previous relationships between the two angles (B and A-E) and the depth Z, the following can be proved:

Zreported

Zreported ^ e

tan(B)

Zreported tan(B)

Zreported+S tan(B)

Zactual =

tan( l-E) tan(B)

Applying the trig identity for the tangent of a difference of two angles and algebra, this reduces to:

Zreported S [1 - tan(E)cotan(B ' ) - S 2 tan(g)

Zactual =

Zreported tan{E) [ 1 + cotan 2 (B)) + S [1 + tan(E)cotan(B)] Solving for Zreported and moving tan(B) factor to the denominator of each term:

Zactual[l + tan(E)cotan(B)] + S tan(£)

Zreported =

1 - tan(E)cotan(B) - Za tua ^ an ( g ) [ X + C otan 2 (B)

[0099] The angle B is derived from the pixel position on the imager which is a function of X and Z in the real world coordinate system. In one example of capture device 20, S is a constant of 75mm, and E is the relative angular offset between the imager and projector post-calibration. Positive values of E correspond to the projector "toeing-in" toward the imager, negative values correspond to "toe-out."

[00100] When inspecting the behavior of depth error measurement over various conditions, errors in reporting depth affect the X and Y transformations from depth map space to world space in the same proportion. It may be observed that the error in depth is not constant across range (Zactual) or FOV (B), and is in fact a nonlinear relationship. However, for very small angular offsets, i.e., fractions of a degree, the resulting error is very nearly linear as a function of range. The chart of Fig. 18 depicts the variation in center-tile range error over the specified range of the capture device 20 for various values of the angle E from 0.02° to 0.12°

[00101] Fig. 19 demonstrates the variation in depth error across the FOV of the imager at a fixed distance of 3.5m and an error angle E=0.12°. The error is least in the center of the FOV, and grows nearly 50% at the extreme edges. Also of note is the non-symmetrical nature across the FOV due to the bias of the projector being located to one side of the imager, which shows up in the math as a non-symmetrical range of angles A.

[00102] The generalized transformation of the imager pixel (Px, Py) with depth Z to world coordinates (X, Y, Z) is in the form:

In these transforms Nx is a constant defining the number of pixels spanning the FOV and the FOVx is the angular field of view in the Z-X plane; similar definitions apply to Ny and FOVy. If the depth measurement error were independent of real-world spatial coordinates, then the sensitivity of X, Y, and Z would all be equivalent, and hence there would be no spatial distortion in the transformation, only scaling. As shown earlier, for the case where measurement error is due to a misalignment of the optical elements, the depth error is a function of both the Z and X coordinates, and hence some amount of spatial distortion can be expected as a result.

[00103] Using the generalized representation of misalignment effects on depth measurement, the resulting spatial distortion can be modeled. Fig. 20 compares the actual and reported positions of an object rotated in the Z-X plane, the chart being a plot of the Z (depth) and X (horizontal dimension) axes. The actual path is a 500mm radius about a point 2m from the depth sensor 26; the sensor 26 has a modeled error angle E=0.12°. The depth error in this case is approximately 10.8% at 3.5m. The circle appears to be slightly wider and further away from the sensor, is slightly oval rather than round, and is also to some degree asymmetrical.

[00104] The average reported radius of the circle in this example is 545mm, the extent of the out-of-roundness of the reported circle is +4.5% to -2.6%, however, it is notable that the greater distortion is in the rearmost extent of the circle. If only the front-facing portion of the circle is evaluated, the extent of the distortion is reduced to +1.4% and -2.6%. This can be seen in the below graph of Fig. 21. It is understood that the illustrations, graphs and charts of Figs. 16-21 are by way of example only, and may vary in further embodiments.

[001 OS] If a sensor can be calibrated to a minimal distortion level at the factory, and if it can be assumed that the chief contributor to distortion in the field is optical misalignment from environmental and use factors such as temperature, drop shock, and aging, then it may be possible to implement in-field compensation by noting how the measured sizes of objects of vary through the play space.

[00106] In the previous spatial distortion example shown in Fig. 20, the size of the circle appears larger at greater depth than at closer depth. In the course of performing skeletal tracking the length of a fixed object, if a forearm, for example, is observed to shorten at close distances and lengthen at longer distance, a compensating computational step can be added to the depth information to counter the effect of the toe-in condition. If this step is implemented in the generalized form with a global parametric value for E, the algorithm can try successively larger or smaller values of E in response to whether objects appear relatively larger or smaller in the foreground. The range of possible values of E can be constrained to represent what may be expected in the field. For example, a range of - 0.12° to +0. 12° with steps of 0.02° would be sufficient to cover the range of error we would normally associate with a camera of ±10% error at 3.5m. " [00107] In this way, in-field compensation can be performed in real time and adapt to various conditions that might affect absolute accuracy as well as relative distortion. If successful, both relative distortion and absolute accuracy improve.

[00108] Referring to Fig. 22 and Fig. 17 described above, the following sets forth the generalized transformation from depth-camera space to world space, with correction for the misalignment angle E, based on the following definitions:

• Point (Px, Py, Zr) represents a depth-pixel reported by the depth camera

• The origin of the pixel space is lower-left corner justified

• Point (Xw, Yw, Zw) represents the depth pixel in world-space coordinates

• E represents the misalignment angle to compensate for, measured relative to the optical axis

• FOVx and FOVy are the angular fields of view, in ZX and ZY planes respectively, in which Px and Py are projected

• Nx and Ny are the number of pixels in X and Y pixel space respectively

• S is the space separating the projector and imager optical axes, which may for example be 75mm in one example of a depth camera 20.

[00109] Transforming from pixel space to object space for the reported pixel (Px, Py, Zr) is based on the geometry of Fig. 22. Symmetry allows the same expression to be derived for Yw by substitution of the appropriate constants:

Nx

xw PX

wx Nx

[00110] To state the transformation as a function of the input vector (Px, Py, and Z), and noting that the direction of the X axis is opposite that used to derive the angle B in the triangulation functions, angle B may first be restated using the following identities: cotaniB) J =— Zr = Lw * Zr 1 2 ' cotaniB) = [ΐ - ^ 2 αη ( ) Substituting into the general transform for Zactual from Zreported:

Za{Px, Zr, E)

— JJ - S 2 tan(E)

Zr tan(E) [ 1 + [l - tan 2 + S [l + t *o Π ? \ 2Ρχ λ + (FOVX>

-)]

2Px (FOVx\

Xa(Px, Zr) = Za ten —J

Table 1 is a non-limiting example of parameters which may be used for a capture device 20 in the example of Fig. 22:

Table 1

[00111] In the embodiments described above, it was assumed that the size of a calibration object in the FOV was known. However, in further embodiments performed by the recalibration engine 194, the object need only be of fixed size, but its size need not be known. One such example will now be described with reference to Fig. 23. This example minimizes real world distance variance, and operates by observing reported measurements of a rigid object in camera depth. This method relies only on depth measurements, and does not need matching measurements in a known, calibrated image (such as an RGB image). This object can be an item the user has to hold, such as a ball, book etc. Alternatively, it could be a body part such as the user's shoulders, arm etc.

[00112] In general, this method is based on the fact that the distance between a pair of points on a rigid object in x, y, z space will be the same regardless of where the pair of points are measured within the field of view. Thus, the distance between a pair of points on a fixed object may be measured at a first location, and the distance between the same pair of points on the object may be measured at a second location. To the extent the distance varies between the points measured at the first location and the same points measured at the second location, the deviation can be used to define the error model.

[00113] In this technique, the object must have a rigid property that can be measured (e.g., the radius of the ball, the length of the object, etc.) and samples are taken from the depth map only as the object is moved through the FOV. Pairs of true depth samples and sensor depth screen space (x,y) samples are taken of the rigid object at different depths and orientations to calculate a depth error offset. Multiple pairs of samples can be used for robustness. Also when the error function is not known, it can be approximated by determining depth error offsets in multiple regions in the view frustum with this technique as described above.

[00114] Using this technique, the depth error function may be characterized as: where a is the depth error offset at the z cam sampled depth. Referring now to Fig. 23, there are shown two sets of samples (xl, y 1, zl) / (x2, y 1, z2) and (x3, y3, z3) / (x4, y4, z4), where (x,y) are screen space coordinates in the depth map and z is the sampled depth at (xy). As noted, each sample may represent two points on a rigid object, such as a ball, or body part. These samples can describe a depth error equation:

(z2 - zl) 2 + (x2 (z2 - a) - xl (zl - a)) 2 + _ f 2 (z4 - z3) 2 + (x4 (z4 - a) - x3 (z3 - a)) + (y2 (z2 - a) - y 1 (z 1 - )) 2 (y4 (z4 - a) - y3 (z3 - a)) 2 where f is the focal length in pixels of the depth map and a is the error coefficient.

two solutions for the above quadratic equation are:

zl xl 2 — 2 x2 zl xl— 2x2z2xl -4-

2 yl 2 zl -2yly2zl + 2 x2 2 z2 -4- 2 y2 2 z2— 2 y 1 y2 z2— 2 x3 2 z3— 2 y3 2 z3 + 2x3 x4 z3 +- z4 -+-

2 x2 z2 xl— 2 yl 2 zl +2yly2zl— 2 x2 2 z2— 2 y2 2 z2 + 2 yl y2 z2 +- 2 x3 2 z3 + 2 y3 2 z3— 2 x3 x4 z3— 2 y3 y4 z3 + 2 x4 2 z4 -4- 2 y4 2 z4— 2 x3 x4 z4— 2 y3 y4 z ) 2

:1 2 -2x2x1 + x2 2 - x3 2 - x4 2 ■ +- yl 2 + y2 2 — y3 2 — y4 2 ■ +- 2x3x4-2yly2 + 2y3 y4) l 2 f 2 +- z2 2 f 2 - z3 2 f 2 - z4 2 f 2 - ZzlzZf 2 +2z3z4/ 2 +xl 2 zl 2 + yl 2 zl 2 + x2 2 z2 2 + y2 2 z2 2 - x3 2 z3 2 - y3 2 z3 2 - x4 2 z4 2 - y4 2 z4 2 - 2 xl x2 zl z2— 2 yl y2 zl z2 +

l 2 -2x2x1 + x2 2 — x3 2

y l 2 -I- y2 2 — y3 2

y4 2 + 2x3x4- 2yly2 + 2y3 y4))

( 2 zl xl 2 - 2 x2 zl xl— 2 x2 z2 xl -+-

2 yl 2 zl-2yly2zl + 2 x2 2 z2 +2 y2 2 z2 - 2 y 1 y2 z2— 2 x3 2 z3— 2 y3 2 z3+2x3 x4 z3 -+- z4 -+-

2 x2 z2 xl— 2 yl 2 zl -+- 2 yl y2 zl

2 x2 2 z2 - 2 y2 2 z2 +2yl y2 z2 +- 2 x3 2 z3 -4- 2 y3 2 7.3 -2x3 x4 z3—

2y3y4z3+2 x4 2 z4 + 2 y4 2 z4—

2 x3 x4 z4— 2 y3 y4 z4) 2

l 2 -2x2x1+ x2 2 - x3 2 - x4 2 -- yl 2 +- y2 2 — y3 2 — y4 2 +

2x3x4-2yly2 + 2y3 y4)

(zl 2 2 + z2 2 f 2 - z3 2 2 - z4 2 f 2 -

2zlz2/ 2 -1-2 z3 z4 2 4- xl 2 zl 2 + yl 2 zl 2 + x2 2 z2 2 ■ +- y2 2 z2 2

x3 2 z3 2 — y3 2 z3 2 — x4 2 z4 2 — y4 2

z4 2 — 2 xl x2 zl z2— 2 yl y2 zl z2 -+-

l 2 - 2x2x1+ x2 2 - x3 2

y l 2 +- y2 2 — y3 2

y4 2 +2x3x4- 2 yl y2 + 2 y3 y4))

[00116] Only one of these solutions, namely the first one, is valid. In embodiments where the error over the FOV is assumed to be linear, two lines may be used and the resulting error coefficient a may then be used to model error across an entire FOV. In further embodiments, any number of lines may be defined using the same two points on a rigid object at different locations across the field of view. Once enough samples have been acquired calibration is performed by searching for the optimal values for the coefficients of the error model. What is minimized is some sort of measurable rigid property, such as minimizing the variance between the computed length/radius of all the samples and the average length/radius for all samples. Since the minimization of the variance is proportional to depth distortion, the values that are found are then used in the error correction function to un-distort depth. [00117] In cases where the error function is too complex to measure, it might not be feasible/accurate enough to use the technique described above with respect to Fig. 23. One way to approximate undefined error functions is to use a set of sample pairs of close proximity, and approximate the error with a function that has a single term. In this method, the object is sampled in the same way as above, and for every pair of samples that are close to each other, a simple approximation of error is performed. As depth points are read from the camera, the spatially nearest correction is chosen and applied.

[00118] A further method of determining an error model using a calibration object of fixed, but unknown size is now explained. To be general, given a 3D point, it is assumed that its true coordinates x = [x, y, z] T and its measured coordinates ' = [χ', y\ z'] r are related by a function g() with parameters p, i.e.,

x = g(x', p)

[00119] For example, if we use a simplified model z' = a(z - β), then p = [α,β] τ , and the above vector equation becomes:

x = x

y = y'

ζ = - + β

[00120] Furthermore, it may be assumed that the uncertainty (or imprecision) of point x' is modeled by a 3x3 covariance matrix Λ. Now, consider a pair of points observed by the depth camera, denoted by (χ^,χ 2 ), with covariance matrices (A 1# A 2 ). The squared distance is given by

L\ 2 = (x x - χ 2 ) τ (Χχ - x 2 ) = (g P) - (¾. p)) T (g(xi. P) - g0 P))

The variance of may be computed by:

where

t = 2¾£ «. P - g (xS. p))

¾ = -2 ¾2l(g(xl, p) - g«. p))

[00121] The same pair of points are observed another time by the depth camera, denoted by (χ^,χ^), with covariance matrices (Λ 3 , Λ 4 ). L 4 and σ 4 may be computed in the same way as above. Since these are two observations of the same pair:

In practice, e is not equal to 0, so its parameters p may be estimated by minimizing e 2 . Note that one pair of points only provides one constraint, and only one parameter may be estimated.

[00122] For N pairs of points before and after motion, the parameter vector p may be estimated by minimizing the following objective function:

rninp Sf e /vj

where e t = and v i is the variance of e given by v { = σ? 2 + σ 4 (ί . This is a nonlinear optimization, which can be done using, for example, the Levenberg-Marquardt algorithm. The initial guess is ready available if the distortion is not huge. With the simplified model z' = a(z— β), the initial guess will be = 1 and β = 0.

[00123] In the above embodiments, deviations between real depth and sensor depth was taken at a few points to define a model which may then be used to provide the measure of error at all locations within the 3-D world space captured by the capture device. In embodiments, the more sample points used to determine deviation between real and sensor depth, the more accurate the depth model may be, even for highly non-linear error models.

[00124] Moreover, the above embodiments focus on solutions which determine deviations between real and sensor depth using either no additional equipment or minimal additional equipment. This simplifies the solution and reduces cost of a commercial embodiment. However, it is understood that a variety of equipment may be used to determine real depth, such as for example lasers, additional depth cameras and other depth-finding devices.

[00125] Fig. 24 A illustrates an example embodiment of a computing environment, such as for example computing system 12, that may be used to perform the various techniques described above. The computing device 12 may be a multimedia console 300, such as a gaming console. As shown in Fig. 24A, the. multimedia console 300 has a central processing unit (CPU) 301 having a level 1 cache 302, a level 2 cache 304, and a flash ROM 306. The level 1 cache 302 and a level 2 cache 304 temporarily store data and hence reduce the number of memory access cycles, thereby improving processing speed and throughput. The CPU 301 may be provided having more than one core, and thus, additional level 1 and level 2 caches 302 and 304. The flash ROM 306 may store executable code that is loaded during an initial phase of a boot process when the multimedia console 300 is powered ON. [00126] A graphics processing unit (GPU) 308 and a video encoder/video codec (coder/decoder) 314 form a video processing pipeline for high speed and high resolution graphics processing. Data is carried from the GPU 308 to the video encoder/video codec 314 via a bus. The video processing pipeline outputs data to an A/V (audio/video) port 340 for transmission to a television or other display. A memory controller 310 is connected to the GPU 308 to facilitate processor access to various types of memory 312, such as, but not limited to, a RAM.

[00127] The multimedia console 300 includes an I/O controller 320, a system management controller 322, an audio processing unit 323, a network interface controller 324, a first USB host controller 326, a second USB host controller 328 and a front panel I/O subassembly 330 that are preferably implemented on a module 318. The USB controllers 326 and 328 serve as hosts for peripheral controllers 342(l)-342(2), a wireless adapter 348, and an external memory device 346 (e.g., flash memory, external CD/DVD ROM drive, removable media, etc.). The network interface 324 and/or wireless adapter 348 provide access to a network (e.g., the Internet, home network, etc.) and may be any of a wide variety of various wired or wireless adapter components including an Ethernet card, a modem, a Bluetooth module, a cable modem, and the like.

[00128] System memory 343 is provided to store application data that is loaded during the boot process. A media drive 344 is provided and may comprise a DVD/CD drive, hard drive, or other removable media drive, etc. The media drive 344 may be internal or external to the multimedia console 300. Application data may be accessed via the media drive 344 for execution, playback, etc. by the multimedia console 300. The media drive 344 is connected to the I/O controller 320 via a bus, such as a Serial ATA bus or other high speed connection (e.g., IEEE 1394).

[00129] The system management controller 322 provides a variety of service functions related to assuring availability of the multimedia console 300. The audio processing unit 323 and an audio codec 332 form a corresponding audio processing pipeline with high fidelity and stereo processing. Audio data is carried between the audio processing unit 323 and the audio codec 332 via a communication link. The audio processing pipeline outputs data to the A/V port 340 for reproduction by an external audio player or device having audio capabilities.

[00130] The front panel I/O subassembly 330 supports the functionality of the power button 350 and the eject button 352, as well as any LEDs (light emitting diodes) or other indicators exposed on the outer surface of the multimedia console 300. A system power supply module ' 336 provides power to the components of the multimedia console 300. A fan 338 cools the circuitry within the multimedia console 300.

[00131] The CPU 301, GPU 308, memory controller 310, and various other components within the multimedia console 300 are interconnected via one or more buses, including serial and parallel buses, a memory bus, a peripheral bus, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures can include a Peripheral Component Interconnects (PCI) bus, PCI-Express bus, etc.

[00132] When the multimedia console 300 is powered ON, application data may be loaded from the system memory 343 into memory 312 and/or caches 302, 304 and executed on the CPU 301. The application may present a graphical user interface that provides a consistent user experience when navigating to different media types available on the multimedia console 300. In operation, applications and/or other media contained within the media drive 344 may be launched or played from the media drive 344 to provide additional functionalities to the multimedia console 300.

[00133] The multimedia console 300 may be operated as a standalone system by simply connecting the system to a television or other display. In this standalone mode, the multimedia console 300 allows one or more users to interact with the system, watch movies, or listen to music. However, with the integration of broadband connectivity made available through the network interface 324 or the wireless adapter 348, the multimedia console 300 may further be operated as a participant in a larger network community.

[00134] When the multimedia console 300 is powered ON, a set amount of hardware resources are reserved for system use by the multimedia console operating system. These resources may include a reservation of memory (e.g., 16MB), CPU and GPU cycles (e.g., 5%), networking bandwidth (e.g., 8 kbs), etc. Because these resources are reserved at system boot time, the reserved resources do not exist from the application's view.

[00135] In particular, the memory reservation preferably is large enough to contain the launch kernel, concurrent system applications and drivers. The CPU reservation is preferably constant such that if the reserved CPU usage is not used by the system applications, an idle thread will consume any unused cycles.

[00136] With regard to the GPU reservation, lightweight messages generated by the system applications (e.g., popups) are displayed by using a GPU interrupt to schedule code to render popup into an overlay. The amount of memory required for an overlay depends on the overlay area size and the overlay preferably scales with screen resolution. Where a full user interface is used by the concurrent system application, it is preferable to use a resolution independent of the application resolution. A scaler may be used to set this resolution such that the need to change frequency and cause a TV resynch is eliminated.

[00137] After the multimedia console 300 boots and system resources are reserved, concurrent system applications execute to provide system functionalities. The system functionalities are encapsulated in a set of system applications that execute within the reserved system resources described above. The operating system kernel identifies threads that are system application threads versus gaming application threads. The system applications are preferably scheduled to run on the CPU 301 at predetermined times and intervals in order to provide a consistent system resource view to the application. The scheduling is to minimize cache disruption for the gaming application running on the console.

[00138] When a concurrent system application requires audio, audio processing is scheduled asynchronously to the gaming application due to time sensitivity. A multimedia console application manager (described below) controls the gaming application audio level (e.g., mute, attenuate) when system applications are active.

[00139] Input devices (e.g., controllers 342(1) and 342(2)) are . shared by gaming applications and system applications. The input devices are not reserved resources, but are to be switched between system applications and the gaming application such that each will have a focus of the device. The application manager preferably controls the switching of input stream, without knowledge of the gaming application's knowledge and a driver maintains state information regarding focus switches. The cameras 26, 28 and capture device 20 may define additional input devices for the console 300.

[00140] Fig. 24B illustrates another example embodiment of a computing environment 720 that may be the computing environment 12 shown in Figs. 1A-2 used to interpret one or more positions and motions in a target recognition, analysis, and tracking system. The computing system environment 720 is only one example of a suitable computing environment and is not intended to suggest any limitation as to the scope of use or functionality of the presently disclosed subject matter. Neither should the computing environment 720 be interpreted as having any dependency or requirement relating to any one or combination of components illustrated in the Exemplary operating environment 720. In some embodiments, the various depicted computing elements may include circuitry configured to instantiate specific aspects of the present disclosure. For example, the term circuitry used in the disclosure can include specialized hardware components configured to perform function(s) by firmware or switches. In other example embodiments, the term circuitry can include a general purpose processing unit, memory, etc., configured by software instructions that embody logic operable to perform function(s). In example embodiments where circuitry includes a combination of hardware and software, an implementer may write source code embodying logic and the source code can be compiled into machine readable code that can be processed by the general purpose processing unit. Since one skilled in the art can appreciate that the state of the art has evolved to a point where there is little difference between hardware, software, or a combination of hardware/software, the selection of hardware versus software to effectuate specific functions is a design choice left to an implementer. More specifically, one of skill in the art can appreciate that a software process can be transformed into an equivalent hardware structure, and a hardware structure can itself be transformed into an equivalent software process. Thus, the selection of a hardware implementation versus a software implementation is one of design choice and left to the implementer.

[00141] In Fig. 24B, the computing environment 420 comprises a computer 441, which typically includes a variety of computer readable media. Computer readable media can be any available media that can be accessed by computer 441 and includes both volatile and nonvolatile media, removable and non-removable media. The system memory 422 includes computer storage media in the form of volatile and/or nonvolatile memory such as ROM 423 and RAM 460. A basic input/output system 424 (BIOS), containing the basic routines that help to transfer information between elements within computer 441, such as during start-up, is typically stored in ROM 423. RAM 460 typically contains data and/or program modules that are immediately accessible to and/or presently being operated on by processing unit 459. By way of example, and not limitation, Fig. 24B illustrates operating system 425, application programs 426, other program modules 427, and program data 428. Fig. 24B further includes a graphics processor unit (GPU) 429 having an associated video memory 430 for high speed and high resolution graphics processing and storage. The GPU 429 may be connected to the system bus 421 through a graphics interface 431.

[00142] The computer 441 may also include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only, Fig. 24B illustrates a hard disk drive 438 that reads from or writes to non-removable, nonvolatile magnetic media, a magnetic disk drive 439 that reads from or writes to a removable, nonvolatile magnetic disk 454, and an optical disk drive 440 that reads from or writes to a removable, nonvolatile optical disk 453 such as a CD ROM or other optical media. Other removable/non-removable, volatile/nonvolatile computer storage media that can be used in the Exemplary operating environment include, but are not limited to, magnetic tape cassettes, flash memory cards, digital versatile disks, digital video tape, solid state RAM, solid state ROM, and the like. The hard disk drive 438 is typically connected to the system bus 421 through a non-removable memory interface such as interface 434, and magnetic disk drive 439 and optical disk drive 440 are typically connected to the system bus 421 by a removable memory interface, such as interface 435.

[00143] The drives and their associated computer storage media discussed above and illustrated in Fig. 24B, provide storage of computer readable instructions, data structures, program modules and other data for the computer 441. In Fig. 24B, for example, hard disk drive 438 is illustrated as storing operating system 458, application programs 457, other program modules 456, and program data 455. Note that these components can either be the same as or different from operating system 425, application programs 426, other program modules 427, and program data 428. Operating system 458, application programs 457, other program modules 456, and program data 455 are given different numbers here to illustrate that, at a minimum, they are different copies. A user may enter commands and information into the computer 441 through input devices such as a keyboard 451 and a pointing device 452, commonly referred to as a mouse, trackball or touch pad. Other input devices (not shown) may include a microphone, joystick, game pad, satellite dish, scanner, or the like. These and other input devices are often connected to the processing unit 459 through a user input interface 436 that is coupled to the system bus, but may be connected by other interface and bus structures, such as a parallel port, game port or a universal serial bus (USB). The cameras 26, 28 and capture device 20 may define additional input devices for the console 400. A monitor 442 or other type of display device is also connected to the system bus 421 via an interface, such as a video interface 432. In addition to the monitor, computers may also include other peripheral output devices such as speakers 444 and printer 443, which may be connected through an output peripheral interface 433.

[00144] The computer 441 may operate in a networked environment using logical connections to one or more remote computers, such as a remote computer 446. The remote computer 446 may be a personal computer, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to the computer 441, although only a memory storage device 447 has been illustrated in Fig. 24B. The logical connections depicted in Fig. 24B include a local area network (LAN) 445 and a wide area network (WAN) 449, but may also include other networks. Such networking environments are commonplace in offices, enterprise- wide computer networks, intranets and the Internet.

[00145] When used in a LAN networking environment, the computer 441 is connected to the LAN 445 through a network interface or adapter 437. When used in a WAN networking environment, the computer 441 typically includes a modem 450 or other means for establishing communications over the WAN 449, such as the Internet. The modem 450, which may be internal or external, may be connected to the system bus 421 via the user input interface 436, or other appropriate mechanism. In a networked environment, program modules depicted relative to the computer 441, or portions thereof, may be stored in the remote memory storage device. By way of example, and not limitation, Fig. 24B illustrates remote application programs 448 as residing on memory device 447. It will be appreciated that the network connections shown are Exemplary and other means of establishing a communications link between the computers may be used.

[00146] The foregoing detailed description of the inventive system has been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the inventive system to the precise form disclosed. Many modifications and variations are possible in light of the above teaching. The described embodiments were chosen in order to best explain the principles of the inventive system and its practical application to thereby enable others skilled in the art to best utilize the inventive system in various embodiments and with various modifications as are suited to the particular use contemplated. It is intended that the scope of the inventive system be defined by the claims appended hereto.