iCub-main
|
dragonfly2 and dragonfly2raw device driver implementation. More...
#include <DragonflyDeviceDriver2.h>
Public Member Functions | |
DragonflyDeviceDriver2 (bool raw=false) | |
Constructor. | |
virtual | ~DragonflyDeviceDriver2 () |
Destructor. | |
virtual bool | open (yarp::os::Searchable &config) |
Open the device driver. | |
virtual bool | close (void) |
Closes the device driver. | |
virtual yarp::os::Stamp | getLastInputStamp () |
Implements the IPreciselyTimed interface. | |
virtual bool | setBrightness (double v) |
Set Brightness. | |
virtual bool | setExposure (double v) |
Set Exposure. | |
virtual bool | setSharpness (double v) |
Set Sharpness. | |
virtual bool | setWhiteBalance (double blue, double red) |
Set White Balance. | |
virtual bool | setHue (double v) |
Set Hue. | |
virtual bool | setSaturation (double v) |
Set Saturation. | |
virtual bool | setGamma (double v) |
Set Gamma. | |
virtual bool | setShutter (double v) |
Set Shutter. | |
virtual bool | setGain (double v) |
Set Gain. | |
virtual bool | setIris (double v) |
Set Iris. | |
virtual double | getBrightness () |
Get Brightness. | |
virtual double | getExposure () |
Get Exposure. | |
virtual double | getSharpness () |
Get Sharpness. | |
virtual bool | getWhiteBalance (double &blue, double &red) |
Get White Balance. | |
virtual double | getHue () |
Get Hue. | |
virtual double | getSaturation () |
Get Saturation. | |
virtual double | getGamma () |
Get Gamma. | |
virtual double | getShutter () |
Get Shutter. | |
virtual double | getGain () |
Get Gain. | |
virtual double | getIris () |
Get Iris. | |
virtual bool | hasFeatureDC1394 (int feature) |
Is feature present? | |
virtual bool | setFeatureDC1394 (int feature, double value) |
Set feature value. | |
virtual double | getFeatureDC1394 (int feature) |
Get feature value. | |
virtual bool | hasOnOffDC1394 (int feature) |
Can be feature turned on/off? | |
virtual bool | setActiveDC1394 (int feature, bool onoff) |
Switch feature on/off. | |
virtual bool | getActiveDC1394 (int feature) |
Is feature ON or OFF? | |
virtual bool | hasAutoDC1394 (int feature) |
Has feature Auto mode? | |
virtual bool | hasManualDC1394 (int feature) |
Has feature Manual mode? | |
virtual bool | hasOnePushDC1394 (int feature) |
Has feature Manual mode? | |
virtual bool | setModeDC1394 (int feature, bool auto_onoff) |
Switch feature Auto/Manual. | |
virtual bool | getModeDC1394 (int feature) |
Is feature mode Auto or Manual? | |
virtual bool | setOnePushDC1394 (int feature) |
Trigger feature One Push adjust. | |
virtual unsigned int | getVideoModeMaskDC1394 () |
Get supported video mode mask. | |
virtual unsigned int | getVideoModeDC1394 () |
Get camera acquisition mode. | |
virtual bool | setVideoModeDC1394 (int video_mode) |
Set camera acquisition mode. | |
virtual unsigned int | getFPSMaskDC1394 () |
Get supported framerates mask. | |
virtual unsigned int | getFPSDC1394 () |
Get camera framerate. | |
virtual bool | setFPSDC1394 (int fps) |
Set camera framerate. | |
virtual unsigned int | getISOSpeedDC1394 () |
Get camera Firewire ISO speed. | |
virtual bool | setISOSpeedDC1394 (int speed) |
Set camera Firewire ISO speed. | |
virtual unsigned int | getColorCodingMaskDC1394 (unsigned int video_mode) |
Get supported color coding mask. | |
virtual unsigned int | getColorCodingDC1394 () |
Get image color coding. | |
virtual bool | setColorCodingDC1394 (int coding) |
Set image color coding. | |
virtual bool | setWhiteBalanceDC1394 (double b, double r) |
Set White Balance. | |
virtual bool | getWhiteBalanceDC1394 (double &b, double &r) |
Get White Balance. | |
virtual bool | getFormat7MaxWindowDC1394 (unsigned int &xdim, unsigned int &ydim, unsigned int &xstep, unsigned int &ystep, unsigned int &xoffstep, unsigned int &yoffstep) |
Get maximum image dimensions in Format 7 mode. | |
virtual bool | getFormat7WindowDC1394 (unsigned int &xdim, unsigned int &ydim, int &x0, int &y0) |
Get image dimensions in Format 7 mode. | |
virtual bool | setFormat7WindowDC1394 (unsigned int xdim, unsigned int ydim, int x0, int y0) |
Set image dimensions in Format 7 mode. | |
virtual bool | setOperationModeDC1394 (bool b1394b) |
Set Operation Mode. | |
virtual bool | getOperationModeDC1394 () |
Get Operation Mode. | |
virtual bool | setTransmissionDC1394 (bool bTxON) |
Set image transmission ON/OFF. | |
virtual bool | getTransmissionDC1394 () |
Is image transmission ON or OFF? | |
virtual bool | setBroadcastDC1394 (bool onoff) |
Set feature commands propagation ON/OFF. | |
virtual bool | setDefaultsDC1394 () |
Set camera features to default. | |
virtual bool | setResetDC1394 () |
virtual bool | setPowerDC1394 (bool onoff) |
Switch camera power ON/OFF. | |
virtual bool | setCaptureDC1394 (bool bON) |
Switch image capture ON/OFF. | |
virtual unsigned int | getBytesPerPacketDC1394 () |
Get Firewire communication packet size. | |
virtual bool | setBytesPerPacketDC1394 (unsigned int bpp) |
Set Firewire communication packet size. | |
virtual int | getRgbHeight () |
Return the height of each frame. | |
virtual int | getRgbWidth () |
Return the width of each frame. | |
virtual bool | getRgbSupportedConfigurations (yarp::sig::VectorOf< yarp::dev::CameraConfig > &configurations) |
Get the possible configurations of the camera. | |
virtual bool | getRgbResolution (int &width, int &height) |
Get the resolution of the rgb image from the camera. | |
virtual bool | setRgbResolution (int width, int height) |
Set the resolution of the rgb image from the camera. | |
virtual bool | getRgbFOV (double &horizontalFov, double &verticalFov) |
Get the field of view (FOV) of the rgb camera. | |
virtual bool | setRgbFOV (double horizontalFov, double verticalFov) |
Set the field of view (FOV) of the rgb camera. | |
virtual bool | getRgbIntrinsicParam (yarp::os::Property &intrinsic) |
Get the intrinsic parameters of the rgb camera. | |
virtual bool | getRgbMirroring (bool &mirror) |
Get the mirroring setting of the sensor. | |
virtual bool | setRgbMirroring (bool mirror) |
Set the mirroring setting of the sensor. | |
virtual bool | getCameraDescription (CameraDescriptor *camera) |
virtual bool | hasFeature (int feature, bool *hasFeature) |
virtual bool | setFeature (int feature, double values) |
virtual bool | getFeature (int feature, double *values) |
virtual bool | setFeature (int feature, double value1, double value2) |
virtual bool | getFeature (int feature, double *value1, double *value2) |
virtual bool | hasOnOff (int feature, bool *HasOnOff) |
virtual bool | setActive (int feature, bool onoff) |
virtual bool | getActive (int feature, bool *isActive) |
virtual bool | hasAuto (int feature, bool *hasAuto) |
virtual bool | hasManual (int feature, bool *hasManual) |
virtual bool | hasOnePush (int feature, bool *hasOnePush) |
virtual bool | setMode (int feature, FeatureMode mode) |
virtual bool | getMode (int feature, FeatureMode *mode) |
virtual bool | setOnePush (int feature) |
Protected Member Functions | |
FeatureMode | TRANSL_MODE (bool mode) |
bool | TRANSL_MODE (FeatureMode mode) |
Protected Attributes | |
void * | system_resources |
bool | raw |
dragonfly2 and dragonfly2raw device driver implementation.
Definition at line 287 of file DragonflyDeviceDriver2.h.
DragonflyDeviceDriver2::DragonflyDeviceDriver2 | ( | bool | raw = false | ) |
Constructor.
Definition at line 63 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Destructor.
Definition at line 68 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Closes the device driver.
Definition at line 102 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Definition at line 436 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Is feature ON or OFF?
feature | feature ID. |
Definition at line 229 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get Brightness.
Definition at line 163 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get Firewire communication packet size.
In Format7 mode the framerate depends from packet size.
Definition at line 371 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Definition at line 429 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get image color coding.
Definition at line 293 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get supported color coding mask.
The framerates bitmask is obtained as follows:
unsigned int mask=0;
for (unsigned int m=0; m<codings.num; ++m)
mask|=1<<(codings.codings[m]-DC1394_COLOR_CODING_MIN);
0=MONO8, 1=YUV411, 2=YUV422, 3=YUV444, 4=RGB8, 5=MONO16, 6=RGB16, 7=MONO16S, 8=RGB16S, 9=RAW8, 10=RAW16.
Definition at line 289 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get Exposure.
Definition at line 167 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Definition at line 494 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Definition at line 442 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get feature value.
feature | feature ID |
Definition at line 217 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get maximum image dimensions in Format 7 mode.
xdim | maximum width |
ydim | maximum height |
xstep | width granularity |
ystep | height granularity |
xoffstep | horizontal offset granularity |
yoffstep | vertical offset granularity |
Definition at line 309 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get image dimensions in Format 7 mode.
xdim | image width |
ydim | image height |
x0 | horizontal image offset |
y0 | vertical image offset |
Definition at line 317 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get camera framerate.
Definition at line 273 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get supported framerates mask.
The framerates bitmask is obtained as follows:
unsigned int mask=0;
for (unsigned int f=0; f<fps.num; ++f)
mask|=1<<(fps.framerates[f]-DC1394_FRAMERATE_MIN);
0=1.875 fps, 1=3.75 fps, 2=7.5 fps, 3=15 fps, 4=30 fps, 5=60 fps, 6=120 fps, 7=240 fps.
Definition at line 269 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get Gain.
Definition at line 195 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get Gamma.
Definition at line 187 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get Hue.
Definition at line 179 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get Iris.
Definition at line 199 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get camera Firewire ISO speed.
Definition at line 281 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Implements the IPreciselyTimed interface.
Definition at line 113 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Definition at line 448 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Is feature mode Auto or Manual?
feature | feature ID. |
Definition at line 249 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get Operation Mode.
Definition at line 325 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get the field of view (FOV) of the rgb camera.
horizontalFov | will return the value of the horizontal fov in degrees |
verticalFov | will return the value of the vertical fov in degrees |
Definition at line 404 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Return the height of each frame.
Definition at line 378 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get the intrinsic parameters of the rgb camera.
intrinsic | return a Property containing intrinsic parameters of the optical model of the camera. |
Look at IVisualParams.h for more details
Definition at line 412 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get the mirroring setting of the sensor.
mirror | true if image is mirrored, false otherwise |
Definition at line 416 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get the resolution of the rgb image from the camera.
width | image width |
height | image height |
Definition at line 391 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get the possible configurations of the camera.
configurations | list of camera supported configurations as CameraConfig type |
Definition at line 386 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Return the width of each frame.
Definition at line 382 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get Saturation.
Definition at line 183 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get Sharpness.
Definition at line 171 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get Shutter.
Definition at line 191 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Is image transmission ON or OFF?
Definition at line 333 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get camera acquisition mode.
Definition at line 265 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get supported video mode mask.
The video mode bitmask is obtained as follows:
unsigned int mask=0;
for (unsigned int m=0; m<modes.num; ++m)
mask|=1<<(modes.modes[m]-DC1394_VIDEO_MODE_MIN);
0=160x120 YUV444, 1=320x240 YUV422, 2=640x480 YUV411, 3=640x480 YUV422, 4=640x480 RGB8, 5=640x480 MONO8, 6=640x480 MONO16,7=800x600 YUV422, 8=800x600 RGB8, 9=800x600_MONO8, 10=1024x768 YUV422, 11=1024x768 RGB8, 12=1024x768 MONO8, 13=800x600 MONO16, 14=1024x768 MONO16, 15=1280x960 YUV422, 16=1280x960 RGB8, 17=1280x960_MONO8, 18=1600x1200 YUV422, 19=1600x1200 RGB8, 20=1600x1200 MONO8, 21=1280x960 MONO16, 22=1600x1200_MONO16, 23=EXIF, 24=FORMAT7 0, 25=FORMAT7 1, 26=FORMAT7 2, 27=FORMAT7 3, 28=FORMAT7 4, 29=FORMAT7 5, 30=FORMAT7 6, 31=FORMAT7 7
Definition at line 257 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get White Balance.
blue | normalized blue balance [0.0 : 1.0]. |
red | normalized red balance [0.0 : 1.0]. |
Definition at line 175 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Get White Balance.
blue | normalized blue balance [0.0 : 1.0]. |
red | normalized red balance [0.0 : 1.0]. |
Definition at line 305 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Definition at line 454 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Has feature Auto mode?
feature | feature ID. |
Definition at line 233 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Definition at line 460 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Is feature present?
feature | feature ID. |
Definition at line 209 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Definition at line 466 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Has feature Manual mode?
feature | feature ID. |
Definition at line 237 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Definition at line 472 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Has feature Manual mode?
feature | feature ID. |
Definition at line 241 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Definition at line 478 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Can be feature turned on/off?
feature | feature ID. |
Definition at line 221 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Open the device driver.
config | configuration for the device driver |
Definition at line 77 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Definition at line 484 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Switch feature on/off.
feature | feature ID. |
onoff | true=ON false=OFF. |
Definition at line 225 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set Brightness.
v | normalized image brightness [0.0 : 1.0]. |
Definition at line 120 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set feature commands propagation ON/OFF.
All the cameras on the same Firewire bus can be adjusted at once setting broadcast ON. In this way, they will share the feature settings.
onoff | true=ON false=OFF |
Definition at line 347 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set Firewire communication packet size.
In Format7 mode the framerate depends from packet size.
bpp | bytes per packet |
Definition at line 367 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Switch image capture ON/OFF.
onoff | true=ON false=OFF |
Definition at line 363 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set image color coding.
coding | image color coding ID: 0=MONO8, 1=YUV411, 2=YUV422, 3=YUV444, 4=RGB8, 5=MONO16, 6=RGB16, 7=MONO16S, 8=RGB16S, 9=RAW8, 10=RAW16. |
Definition at line 297 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set camera features to default.
Definition at line 351 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set Exposure.
v | normalized image exposure [0.0 : 1.0]. |
Definition at line 124 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Definition at line 502 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Definition at line 489 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set feature value.
feature | feature ID |
value | normalized feature value [0.0 : 1.0]. |
Definition at line 213 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set image dimensions in Format 7 mode.
xdim | image width |
ydim | image height |
x0 | horizontal image offset |
y0 | vertical image offset |
Definition at line 313 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set camera framerate.
fps | framerate ID: 0=1.875 fps, 1=3.75 fps, 2=7.5 fps, 3=15 fps, 4=30 fps, 5=60 fps, 6=120 fps, 7=240 fps. |
Definition at line 277 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set Gain.
v | normalized camera gain [0.0 : 1.0]. |
Definition at line 152 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set Gamma.
v | normalized image gamma [0.0 : 1.0]. |
Definition at line 144 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set Hue.
v | normalized image hue [0.0 : 1.0]. |
Definition at line 136 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set Iris.
v | normalized camera iris [0.0 : 1.0]. |
Definition at line 156 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set camera Firewire ISO speed.
speed | ISO speed ID: 0=100 Mbps, 1=200 Mbps, 2=400 Mbps, 3=800 Mbps, 4=1600 Mbps, 5=3200 Mbps. |
Definition at line 285 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Definition at line 510 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Switch feature Auto/Manual.
feature | feature ID. |
onoff | true=Auto false=Manual. |
Definition at line 245 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Definition at line 515 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Trigger feature One Push adjust.
feature | feature ID. |
Definition at line 253 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set Operation Mode.
b1394b | true=1394b false=LEGACY |
Definition at line 321 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Switch camera power ON/OFF.
onoff | true=ON false=OFF |
Definition at line 359 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Definition at line 355 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set the field of view (FOV) of the rgb camera.
horizontalFov | will set the value of the horizontal fov in degrees |
verticalFov | will set the value of the vertical fov in degrees |
Definition at line 408 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set the mirroring setting of the sensor.
mirror | true if image should be mirrored, false otherwise |
Definition at line 421 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set the resolution of the rgb image from the camera.
width | image width |
height | image height |
Definition at line 396 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set Saturation.
v | normalized image saturation [0.0 : 1.0]. |
Definition at line 140 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set Sharpness.
v | normalized image sharpness [0.0 : 1.0]. |
Definition at line 128 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set Shutter.
v | normalized camera shutter time [0.0 : 1.0]. |
Definition at line 148 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set image transmission ON/OFF.
bTxON | true=ON false=OFF |
Definition at line 329 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set camera acquisition mode.
video_mode | ID: 0=160x120 YUV444, 1=320x240 YUV422, 2=640x480 YUV411, 3=640x480 YUV422, 4=640x480 RGB8, 5=640x480 MONO8, 6=640x480 MONO16,7=800x600 YUV422, 8=800x600 RGB8, 9=800x600_MONO8, 10=1024x768 YUV422, 11=1024x768 RGB8, 12=1024x768 MONO8, 13=800x600 MONO16, 14=1024x768 MONO16, 15=1280x960 YUV422, 16=1280x960 RGB8, 17=1280x960_MONO8, 18=1600x1200 YUV422, 19=1600x1200 RGB8, 20=1600x1200 MONO8, 21=1280x960 MONO16, 22=1600x1200_MONO16, 23=EXIF, 24=FORMAT7 0, 25=FORMAT7 1, 26=FORMAT7 2, 27=FORMAT7 3, 28=FORMAT7 4, 29=FORMAT7 5, 30=FORMAT7 6, 31=FORMAT7 7 |
Definition at line 261 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set White Balance.
blue | normalized image blue balance [0.0 : 1.0]. |
red | normalized image red balance [0.0 : 1.0]. |
Definition at line 132 of file DragonflyDeviceDriver2.cpp.
|
virtual |
Set White Balance.
blue | normalized image blue balance [0.0 : 1.0]. |
red | normalized image red balance [0.0 : 1.0]. |
Definition at line 301 of file DragonflyDeviceDriver2.cpp.
|
inlineprotected |
Definition at line 869 of file DragonflyDeviceDriver2.h.
|
inlineprotected |
Definition at line 870 of file DragonflyDeviceDriver2.h.
|
protected |
Definition at line 868 of file DragonflyDeviceDriver2.h.
|
protected |
Definition at line 867 of file DragonflyDeviceDriver2.h.