Introduction to Kinect

advertisement
Introduction to Kinect
2. Calculating the depth on Kinect
On Kinect, we have IR projector combined IR camera to calculate
value image depth by Light Coding technology of Primesense.
1
Introduction to Kinect
2
Introduction to Kinect
Suppose, Projector send a single light along the red line. It will be
captured by the camera once it hits a surface.
We have 3 plane, a reference plane, a plane close and a distant
plane.
When the point hits a surface in the close plane it will appear right
in the image than if it was hitting a surface in the reference plane.
Likewise, when the point is projected onto an object on a plane which
is more distant than the reference plane, the point will appear more to
the left.
When the origin and direction of the light is known beforehand,
and the horizontal position of the dot is known for a reference depth,
then it is possible to find out the depth of the surface which the point
hits based on its horizontal position in the cameras image plane
3
Introduction to Kinect
According to Nicolas Burrus, who pioneered with information
about the Kinect from his own experiments, the depth of a point z can
be calculated in meters from the raw disparity of the point d (as
provided by the Kinect hardware) using the following equation[9]:
z = 1.0/(-0.0030711016 x d + 3.3309495161)
d is an 11-bit integer which ranges from 0 to 2047. z will change
sign from positive to negative when d is around 1084, so values
beyond that are useless for depth measurement.
4
Introduction to Kinect
Implementation tests with the Kinect pointing straight at a wall
and found that it is was to unable to reliability measure depth values
below 50 cm (see gure 2). These facts mean that only d values of
about 434 to 1084 represent actual measurable depth values
5
Some Libraries for Kinect
1. Kinect SDK beta
SDK beta released by Microsoft on 16th June 2011, SDK
beta allow to access all function of Kinect but This library only
support on Visual studio 2010.
* Support:
- Process sound
- Control motor angle of repose on Kinect.
- Good for the applications Skeleton tracking.
6
Some Libraries for Kinect
2. Open NI
Open NI supports many API functions, can combine
middleware to increase ability for Kinect.
* Support:
- Detect gesture.
- Skeleton tracking
- Windows, Linux, Mac OSX
7
Some Libraries for Kinect
3. Point cloud library
Point cloud is library to process image in 3D space. Having many
algorithms such as: filtering, surface reconstruction, segmentation,
feature estimation… PCL can apply on many platforms such as:
Window, Mac OS, Linux, Android,…
8
Implement
1. System design
Figure 4.1 General design
9
Implement
1. System design
1
10
2
3
Figure 4.2 Detail design
1
MCU IDE
2
Kinect Driver
3
Kinect IDE
Implement
Start
Define pin
Set communication
Val 1, Val 2, Val 3
Val 1 = 1
Val 1 = 2
No
Yes
No
Yes
Right
Val 1 = 0
Yes
Left
No
Val 2 = 1
Yes
Up
11
Stop
No
Val 2 = 2
Yes
Down
Val 2 = 0
Yes
Disable
Download