Notice: MediaWiki has been updated. Report any rough edges to marcan@marcan.st

Difference between revisions of "Imaging Information"

From OpenKinect
Jump to: navigation, search
 
(11 intermediate revisions by 9 users not shown)
Line 1: Line 1:
 
== RGB Camera ==
 
== RGB Camera ==
  
The RGB camera has a slightly larger angle of view than the Depth camera. For computer vision applications, tt can be calibrated using standard techniques, e.g from [http://opencv.willowgarage.com/documentation/cpp/camera_calibration_and_3d_reconstruction.html OpenCV].
+
The RGB camera has a slightly larger angle of view than the Depth camera. For computer vision applications, it can be calibrated using standard techniques, e.g from [http://opencv.willowgarage.com/documentation/cpp/camera_calibration_and_3d_reconstruction.html OpenCV].
 +
 
 +
== Laser Illuminator ==
 +
 
 +
The IR emitter projects an irregular pattern of IR dots of varying intensities. The Depth Camera reconstructs a depth image by recognizing the distortion in this pattern. Apparent when looking at the IR view in the rgbdemo application, are nine much brighter dots in a regular grid: one in the center of the view and 8 aligned in a square formation near the edges. (Perhaps these can be used to aid in easier and more accurate calibration?)
  
 
== Depth Camera ==
 
== Depth Camera ==
Line 7: Line 11:
 
Lots of information on calibrating the depth camera is available on the [http://www.ros.org/wiki/kinect_node ROS kinect_node page].
 
Lots of information on calibrating the depth camera is available on the [http://www.ros.org/wiki/kinect_node ROS kinect_node page].
  
From their data, a basic first order approximation for converting the raw 11-bit disparity value to a depth value in centimeters is: 100/(-0.00307 * rawDisparity + 3.33). This approximation is approximately 10 cm off at 4 m away, and less than 2 cm off within 2.5 m. A more dense set of data and second or third order approximation could increase the accuracy maybe by an order of magnitude.
+
From their data, a basic first order approximation for converting the raw 11-bit disparity value to a depth value in centimeters is: 100/(-0.00307 * rawDisparity + 3.33). This approximation is approximately 10 cm off at 4 m away, and less than 2 cm off within 2.5 m.
 +
 
 +
A better approximation is given by Stéphane Magnenat in [https://groups.google.com/group/openkinect/browse_thread/thread/31351846fd33c78/e98a94ac605b9f21?lnk=gst&q=stephane&pli=1 this post]: distance = 0.1236 * tan(rawDisparity / 2842.5 + 1.1863) in meters. Adding a final offset term of -0.037 centers the original ROS data. The tan approximation has a sum squared difference of .33 cm while the 1/x approximation is about 1.7 cm.
 +
 
 +
Once you have the distance using the measurement above, a good approximation for converting (i, j, z) to (x,y,z) is:
 +
x = (i - w / 2) * (z + minDistance) * scaleFactor
 +
y = (j - h / 2) * (z + minDistance) * scaleFactor
 +
z = z
 +
Where
 +
minDistance = -10
 +
scaleFactor = .0021.
 +
These values were found by hand.
  
Once you have the distance using the measurement above A good approximation for converting (i, j, z) to (x,y,z) is: x = (i - w / 2) * (z + minDistance) * scaleFactor y = (j - h / 2) * (z + minDistance) * scaleFactor z = z
+
== Color/Depth Mapping ==
  
Where minDistance = -10 and scaleFactor = .0021. These values were found by hand.
+
To enable accurate mapping between depth pixels ([http://en.wikipedia.org/wiki/Voxel voxels]) and color pixels and obtain colored point clouds, the intrinsics parameters of both depth and color cameras are required (focal distances, distortion coefficients and image center), but their relative position and orientation in the world coordinate frame also need to be estimated. A preliminary attempt to extract all these parameters in a semi-automatic way is described there [http://nicolas.burrus.name/index.php/Research/Kinect]. A matlab toolbox that estimates all these parameters jointly is [http://www.ee.oulu.fi/~dherrera/kinect/].
  
To convert the 11-bit disparity value to an 8-bit grayscale value that is fairly linear with respect to distance: (2048 * 256) / (2048 - rawDisparity). Also, background noise can be effectively eliminated by ignoring rawDisparity values above 1023.
+
== Depth camera accuracy ==
  
== Color/Depth Mapping ==
+
From [http://www.primesense.com/?p=514 PrimeSense reference design for PS1080] (see [http://groups.google.com/group/openni-dev/browse_thread/thread/cdbc2b3fe643e597 this thread] for explanations):
  
To enable accurate mapping between depth pixels and color pixels and obtain colored point clouds, the intrinsics parameters of both depth and color cameras are required (focal distances, distortion coefficients and image center), but their relative position and orientation in the world coordinate frame also need to be estimated. A preliminary attempt to extract all these parameters in a semi-automatic way is described there [http://nicolas.burrus.name/index.php/Research/Kinect].
+
Field of View (Horizontal, Vertical, Diagonal) = 58° H, 45° V, 70° D
 +
Spatial x/y resolution (@ 2m distance from sensor) = 3mm
 +
Depth z resolution (@ 2m distance from sensor) = 1cm
 +
Operation range = 0.8m - 3.5m

Latest revision as of 15:02, 12 November 2013

RGB Camera

The RGB camera has a slightly larger angle of view than the Depth camera. For computer vision applications, it can be calibrated using standard techniques, e.g from OpenCV.

Laser Illuminator

The IR emitter projects an irregular pattern of IR dots of varying intensities. The Depth Camera reconstructs a depth image by recognizing the distortion in this pattern. Apparent when looking at the IR view in the rgbdemo application, are nine much brighter dots in a regular grid: one in the center of the view and 8 aligned in a square formation near the edges. (Perhaps these can be used to aid in easier and more accurate calibration?)

Depth Camera

Lots of information on calibrating the depth camera is available on the ROS kinect_node page.

From their data, a basic first order approximation for converting the raw 11-bit disparity value to a depth value in centimeters is: 100/(-0.00307 * rawDisparity + 3.33). This approximation is approximately 10 cm off at 4 m away, and less than 2 cm off within 2.5 m.

A better approximation is given by Stéphane Magnenat in this post: distance = 0.1236 * tan(rawDisparity / 2842.5 + 1.1863) in meters. Adding a final offset term of -0.037 centers the original ROS data. The tan approximation has a sum squared difference of .33 cm while the 1/x approximation is about 1.7 cm.

Once you have the distance using the measurement above, a good approximation for converting (i, j, z) to (x,y,z) is:

x = (i - w / 2) * (z + minDistance) * scaleFactor
y = (j - h / 2) * (z + minDistance) * scaleFactor
z = z
Where
minDistance = -10
scaleFactor = .0021.
These values were found by hand.

Color/Depth Mapping

To enable accurate mapping between depth pixels (voxels) and color pixels and obtain colored point clouds, the intrinsics parameters of both depth and color cameras are required (focal distances, distortion coefficients and image center), but their relative position and orientation in the world coordinate frame also need to be estimated. A preliminary attempt to extract all these parameters in a semi-automatic way is described there [1]. A matlab toolbox that estimates all these parameters jointly is [2].

Depth camera accuracy

From PrimeSense reference design for PS1080 (see this thread for explanations):

Field of View (Horizontal, Vertical, Diagonal) = 58° H, 45° V, 70° D
Spatial x/y resolution (@ 2m distance from sensor) = 3mm
Depth z resolution (@ 2m distance from sensor) = 1cm
Operation range = 0.8m - 3.5m