Kinect plug-in

From Rsewiki
Jump to: navigation, search

Introduction

The Kinect plugin transfers the images from the Kinect sensor to image-pool images, and thus allow data users to utilize the image pool functions - like poolpush - to be updated with new data as they arrive.

Configuration

The camera parameters are stored in the camera pool, default as device 18 and 19, and can be set like:

module load="aukinect.so.0"
module load=aucamrectify.so.0
camset device=18 name=kinectcolor
camset device=19 name=depth
var campool.device18.intrinsic="525.829, 0.0, 322.205; 0.0, 525.829, 257.529; 0.0, 0.0, 1.0"
var campool.device18.distortion="0.24042, -0.72509, -0.00018, -0.00022, 0.72285"
var campool.device19.intrinsic="595 0 320; 0 595 240; 0 0 1"

The shown parameters for device 18 (color camera) is based on a calibration on one of our devices, and should be fairly representative. The values for the IR sensor is a fairly rough guess - should be improved - when you have better data, please mail it to me ( jca@elektro.dtu.dk ).

The kinect plugin has the following configuration variables of its own:


  kinectNumber=0             (r/w) kinect number to be used on next open
  updCnt=70                  (r) Number of updates
  desiredFramerate=2         (rw) desired framerate (frames/sec) for both depth and
                             color
  measuredFramerate=2 2      (r) [color, depth] measured framerate (frames/sec)
  desiredResolution=1        (rw) desired resolution 0=low (QVGA), 1=medium (VGA), 2 =
                             high)
  imagesC3D=18 19 20 21      (rw) Image pool for [0] color, [1] depth (16bit), [2]
                             depth (RGB)image, [3] depth 8-bit BW
  camDeviceNum=18 19         (r/w) index to camera info - [color, depth]
  imgIR=0                    (r/w) is IR (dot) image to replace color image [0=color,
                             1= IR]
  useColor=1 1               (rw) [0]=1 request color (at next open), [1]=1 is in use
  useDepth=1 1               (rw) [0]=1 request depth (at next open), [1]=1 is in use
  useDepth8bit=1             (rw) make 8-bit BW image from depth -1 = no image, 0-8
                             subtracts 512 and shift 0-8 bits
  useDepthColor=0            (rw) make RGB pseudo color image from depth 0=do not make
  open=1 1                   (rw) [0]: set to 0 to close set to 1 to open, [1]:
                             0:isclosed 1:isopen
  initialized=1              (r) is the camera initialized
  tiltDeg=0                  (r/w) the current motor control tilt angle [degrees]
  tiltUse=0                  (r/w) should tilt control be attempted (0=not used,
                             1=used)
  led=2                      (r/w) LED value: OFF 0, GREEN 1, RED 2, YELLOW 3, B-YELLOW
                             4, B-GREEN 5, B-RED_YELLOW = 6, B-RED_GREEN = 7
  acc=-0.0359 8.2261 -5.053  (r) the current accelerometer reading in N/kg
  time=1326194516.8452       (r) Time at last update
  accInterval=0.7            (r/w) wait getting acc-readings at least this time [sec]
  accRate=0                  (r) rate of acc measurements (per second)
  accLogN=0                  (r/w) log acceleration evert N measurements (0 = close
                             log)
  imageLogN=0                (r/w) log images (color and depth) every Nth imageset (0 =
                             close log)
  replay=0 0                 (r) [0]: replay status 1=on, [1] current replay line

The shown values are with the device open, looking a bit down

Commands

The available kinect commands are found in the on-line help:

>> kinect help
<help subject="kinect">
--- kinect is a plugin to XBOX 360 3d camera
open=true|false     Start or stop camera stream to img=19 (depth) and img=18 color
silent              do not send a reply to this command
debug=true|false    Produce debug image (is true for color-depth img=19)
log=true|false      action log (open=false) to /rhome/demo//kinect.log 
logImage=N          logging of every N (N=0) images to /rhome/demo//kinectImage.log
replay=true|false   replay (replay=false) from /rhome/demo//replay/kinectImage.log
step = N            replay N steps from replay file
logAcc=N            logging of every N (N=0) acc value to /rhome/demo//kinectAcc.log 
help       This message
----
see also: 'kinectPush' for event handling of 3d cloud
see also: 'var kinect' for parameters
</help>
<kinect info="done"/>
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox