Dragonfly Parameters

From Wiki for RobotCub and Friends

Jump to: navigation, search

Author: Alessandro Scalzo


The dragonfly2 framegrabber device driver is based on libdc1394-2. It can acquire RGB color images in 320x240 or 640x480 resolutions. In 640x480 there are two options: Bayer decoding performed on board by the camera or Bayer pattern decoding performed by the driver. In the second mode the bandwidth required to the Firewire bus is lower, and thus the framerate can be up to 60 fps. In the first mode the framerate is limited to 15 fps with two cameras on the same channel. Moreover, once the resolution is chosen, the image can be cropped on board by the camera before the transfer on the Firewire bus.


Contents

Usage syntax

yarpdev --device grabber --subdevice dragonfly2 --name <yarp port name> [--DR2] 
[--video_type <type>] [--width|size_x <W> --height|size_y <H>] [--port_number <pn>] 
[--unit_number|d <un>] [--white_balance <red_value> <blue_value>] [--feature <value>] [...]

Module arguments

--name             // image output port
--DR2              // if specified, dragonfly2 hardware model is assumed
--video_type       // 1: RGB 320x240, 2: RGB 640x480 (default), 3: RGB 640x480 software Bayer decoding (higher fps) 
--width|size_x     // width image cropping (limited to image size)
--height|size_y    // height image cropping (limited to image size)
--port_number      // Firewire channel (need to specify only if you have more than one firewire card)
--d|unit_number    // camera unit number 
--white_balance    // red and blue balance, values are normalized betwen 0.0 and 1.0 
--feature          // camera feature setting, normalized between 0.0 and 1.0 (features listed below)

The video_type parameter

The video_type parameter determines how images are acquired by the dragonfly chip.

  • video_type 1: the image is acquired by the Dragonfly2 camera in 320x240 resolution as RGB color image, and transferred to the framegrabber driver memory buffer in this format. The Firewire bandwidth allows maximum framerate (60 fps) with two cameras. If specified, the --width and --height parameters will crop the image to the specified dimension.
  • video_type 2: the image is acquired by the Dragonfly2 camera in 640x480 resolution as RGB color image, and transferred to the framegrabber driver memory buffer in this format. The Firewire bandwidth allows 15 fps with two cameras. If specified, the --width and --height parameters will crop the image to the specified dimension.
  • video_type 3: the image is acquired as a raw Bayer pattern 640x480 image, and transferred in this format to the framegrabber driver memory buffer. In this way, the bandwidth required to the Firewire bus is lower than in the previous format, allowing 60 fps. The Bayer decoding to the usual RGB format provided by the DragonflyDeviceDriver2 framegrabber is performed at software level by the driver itself. If specified, the --width and --height parameters will crop the original 640 x 480 image to the specified dimension.


Port and Unit number

Many cameras can coexist on the same Firewire bus (port), sharing the available bandwidth. Each camera connected to the same Firewire bus will be identified by a unit number. Port numbers, as well as unit numbers, are assigned increasingly starting from 0. The iCub robot has one only Firewire card, and thus its port number is always 0 (can be omitted). The two left and right cameras will be unit 0 and 1. Unfortunately, there is no way to fix, for instance, the left camera as unit 0 and the right to unit 1: it depends on the starting order. Thus, if launching the driver you notice that the right and left camera Yarp port names are inverted, you will have to stop and restart the driver inverting the names.

With respect to the icub robot, a typical command line is:

yarpdev --device grabber --subdevice dragonfly2 --name /icub/cam/left  --DR2 --d 0|1 [...]
yarpdev --device grabber --subdevice dragonfly2 --name /icub/cam/right --DR2 --d 1|0 [...]


Features

brightness
exposure
sharpness
hue
saturation
gamma
shutter
gain
iris

Please notice that exposure is an auto mode, if set it controls gain and shutter parameters in order to match the desired exposure.

Personal tools