AURobotServers  4
Public Member Functions | Public Attributes | List of all members
UComCam Class Reference

#include <ucomcam.h>

Inheritance diagram for UComCam:
Inheritance graph

Public Member Functions

virtual void clear ()
 
const char * getSaturationModeStr (int mode)
 
const char * getWhiteModeStr (int mode)
 
void print (const char *prestring)
 
bool setCamDevice (UCamDevBase *dev)
 
bool setFromCam (UCamDevBase *dev, bool probe, bool clientInCtrl)
 
 UComCam ()
 
bool unpack (unsigned char *buff)
 
virtual ~UComCam ()
 

Public Attributes

unsigned int brightnessValue
 
char channelName [MAX_CHANNEL_NAME_LENGTH+1]
 
int channelNumber
 
bool channelNumberValid
 
bool cmdUse
 
bool cmdValid
 
unsigned int colourValue
 
bool compressionValid
 
unsigned int compressionValue
 
bool contourValid
 
unsigned int contourValue
 
unsigned int contrastValue
 
bool deviceValid
 
int deviceValue
 
bool fpsValid
 
int fpsValue
 
bool gainAutomatic
 
bool gainValid
 
unsigned int gainValue
 
unsigned int gammaValue
 
unsigned int hdrMode
 
bool hdrValid
 
unsigned long imageNumber
 
bool imageNumberValid
 
bool inCtrlValid
 
bool inCtrlValue
 
bool ledOn
 
bool ledValid
 
char name [UCamDevBase::MAX_CAM_DEV_NAME_LENGTH+1]
 
bool nameValid
 
bool openValid
 
bool openValue
 
unsigned int saturationCtrlMode
 
bool saturationCtrlValid
 
bool shutterAutomatic
 
bool shutterValid
 
unsigned int shutterValue
 
unsigned int sizeHeight
 
bool sizeValid
 
unsigned int sizeWidth
 
int streamFps
 
bool streamOn
 
bool streamValid
 
bool videoValid
 
unsigned int whiteBalGainBlue
 
unsigned int whiteBalGainRed
 
unsigned int whiteBalMode
 
bool whiteBalValid
 

Detailed Description

Structure to hold camera settings information and communicate this on a binary packed serial device.

Author
Christian Andersen

Constructor & Destructor Documentation

UComCam::UComCam ( )

Constructor clears all vaid flags.

UComCam::~UComCam ( )
virtual

Destructor

Member Function Documentation

void UComCam::clear ( )
virtual
const char * UComCam::getSaturationModeStr ( int  mode)

Returns saturation mode as string

Referenced by print().

const char * UComCam::getWhiteModeStr ( int  mode)

Get white ballance mode as string

References AU_WB_AUTO, AU_WB_FL, AU_WB_INDOOR, AU_WB_MANUAL, and AU_WB_OUTDOOR.

Referenced by print().

void UComCam::print ( const char *  prestring)
bool UComCam::setCamDevice ( UCamDevBase dev)
bool UComCam::setFromCam ( UCamDevBase dev,
bool  probe,
bool  clientInCtrl 
)
bool UComCam::unpack ( unsigned char *  buff)

Pack camera settings to string. Packs all valid values into the string and returns the number of bytes used. The format do not set byte at buff[2], as this is reserved to message serial number and must be set by communication part. if toCamServer the type is MSG_CAM_SET_CAMERA_STATE else it is information from camera server and the message type is set to MSG_CAM_CAMERA_STATE. Unpack the information from the buffer if the valid flags in the message for the individual data subjects are not valid, then the related valid flag is not changed. That is these may be left valid with value from before the call. If however it is importent to find the changes, then clear all the Valid flags first. Returns true if a buffer is provided and the camera name has a valid length (if valid)

Member Data Documentation

unsigned int UComCam::brightnessValue

Video brightness adjustment in camera. Normal value is 0x8000. Range is [0 .. 0xFFF0] a returned value of 0xFFFF probably meand 'unsupported feature'.

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

char UComCam::channelName[MAX_CHANNEL_NAME_LENGTH+1]

Channel name

Referenced by clear(), UComCamSml::pack(), print(), and setFromCam().

int UComCam::channelNumber

Video/tuner data channel, may be any number, but most likely not supported (webcams) or 4 channels (TV-card) TV-card: 0 = TV, 2 = video, 1,3=unknown.

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

bool UComCam::channelNumberValid

Is data channel numnber vaid

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

bool UComCam::cmdUse

Is command to be executed at every new image?

Referenced by clear().

bool UComCam::cmdValid

Command at every new image - valid?

Referenced by clear().

unsigned int UComCam::colourValue

Video colour sturation adjustment in camera. Normal value is 0x8000. Range is [0 .. 0xFFF0] a returned value of 0xFFFF probably meand 'unsupported feature'.

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

bool UComCam::compressionValid

Compression level used in image transfer. Is info valid.

Referenced by clear(), print(), setCamDevice(), and setFromCam().

unsigned int UComCam::compressionValue

Compression is needed in some image sizes and is optional in others. This value is the preferred cmpression if bandwidth allows.

Referenced by clear(), print(), setCamDevice(), and setFromCam().

bool UComCam::contourValid

Video gain contour control - is info valid

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

unsigned int UComCam::contourValue

Video gain contour - lead filter. Enhances edges in horizontal lines. Value is from 0 to 0xFFFF, but only some of the MSBs are implemented. The value 0 means no enhancement.

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

unsigned int UComCam::contrastValue

Video contrast adjustment in camera. Normal value is 0x8000. Range is [0 .. 0xFFF0] a returned value of 0xFFFF probably meand 'unsupported feature'.

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

bool UComCam::deviceValid

Video device number - usually means directly the '/dev/video0' device number series.

  • is info valid.

Referenced by clear(), UFunctionCam::handleCamGetCommand(), UFunctionCam::handleCamSetCommand(), UComCamSml::pack(), print(), setFromCam(), and UComCamSml::unpack().

int UComCam::deviceValue

Video device number - usually means directly the '/dev/video0' device number series (0..32).

Referenced by clear(), UFunctionCam::handleCamGetCommand(), UFunctionCam::handleCamSetCommand(), UComCamSml::pack(), print(), setFromCam(), and UComCamSml::unpack().

bool UComCam::fpsValid

Framerate in images per second

  • is info valid

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

int UComCam::fpsValue

Framerate in images per second from camera.

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

bool UComCam::gainAutomatic

Camera gain is set to automatic

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

bool UComCam::gainValid

Camera position relative to robot center

  • is info valid. Camera position relative to robot center. in meter x is left, y is up and z is behind - robot center. Camera position relative to robot center
  • is info valid. Camera rotation relative to robot. in radians Omagea is rotation about x, Phi is rotation about y and Kappa is rotation about z. Camera gain control- is value valid.

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

unsigned int UComCam::gainValue

Camera gain value: Manual gain values are in range from to 0xFFFF. Only some (typically 6 bit) of the MSB bits are actually implemented in camera.

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

unsigned int UComCam::gammaValue

Video Gamma correction value can change the the number of intensity bits used in the dark part of the image. A preliminary analysis suggests that a value of 0 means linear relation from intensity to coding in the 8-bit image. a higher value (up to 0xFFFF) makes the intensity coding non-linear compressing the bright parts and expanding the darker part. A value of 0x8000 is the default setting (TV-style gamma correction

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

unsigned int UComCam::hdrMode

High Dynamic range mode is number of images with increasing shutter and gain settings, plus one with closed shutter to get a black level image. p.t. only 3 images are supported, i.e. ine image with current gain and shutter setting, one with increased values and one with closed shutter and nominal gain (dark level). NB! the mode requires that gain and shutter is set to manual or is in no-saturation mode. 0 means hdr is OFF and 3 that it is on. Other values are equal to off.

Referenced by clear(), UComCamSml::pack(), print(), and UComCamSml::unpack().

bool UComCam::hdrValid

High dynamic range mode - e.g. takes 3 images and combine as a set. is hdrSetting valid.

Referenced by clear(), UComCamSml::pack(), print(), and UComCamSml::unpack().

unsigned long UComCam::imageNumber

Image number setting (serial number for used images) A long positive number increased for every used image frame, and placed in image meta data.

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

bool UComCam::imageNumberValid

Image number setting (serial number for used images) is info valid.

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

bool UComCam::inCtrlValid

Is client in control of camera - or take control

  • is info valid

Referenced by clear(), UFunctionCam::handleCamSetCommand(), UComCamSml::pack(), print(), setFromCam(), and UComCamSml::unpack().

bool UComCam::inCtrlValue

Is client in control of camera - or take control

Referenced by clear(), print(), and setFromCam().

bool UComCam::ledOn

Camera led value - true if on.

Referenced by clear(), UComCamSml::pack(), print(), and UComCamSml::unpack().

bool UComCam::ledValid

Camera LED (on/off control) is info valid.

Referenced by clear(), UComCamSml::pack(), print(), setFromCam(), and UComCamSml::unpack().

char UComCam::name[UCamDevBase::MAX_CAM_DEV_NAME_LENGTH+1]

Camera name

Referenced by clear(), UComCamSml::pack(), print(), and setFromCam().

bool UComCam::nameValid

Camera name valid

Referenced by clear(), UComCamSml::pack(), print(), setFromCam(), and UComCamSml::unpack().

bool UComCam::openValid

Camera device open/closed is valis or not

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

bool UComCam::openValue

Camera device is open/closed

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

unsigned int UComCam::saturationCtrlMode

Saturation mode setting. Value 0 is no saturation control. Value > 0 is one of the modes selected by UCamDevice.

Referenced by clear(), UComCamSml::pack(), print(), and UComCamSml::unpack().

bool UComCam::saturationCtrlValid

No saturation mode is a computer controlled adaptive gain where every 3rd image are analyzed for intensity and the brightest pixel is attempted to be at a desired intensity level (Y = 220). - is setting valid.

Referenced by clear(), UComCamSml::pack(), print(), and UComCamSml::unpack().

bool UComCam::shutterAutomatic

Is shutter set to automatic. NB! if automatic, then no values are available for actual setting.

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

bool UComCam::shutterValid

Shutter control - is value valid.

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

unsigned int UComCam::shutterValue

Shutter control value in range 0 to 0xFFFF, where the most significant (typically 5 bits) are implemented only.

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

unsigned int UComCam::sizeHeight

Frame size from camera - height in pixels

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

bool UComCam::sizeValid
unsigned int UComCam::sizeWidth

Frame size from camera - width in pixels

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

int UComCam::streamFps

Capture with this framerate (if possible). Positive values are frames per second, negative values are seconds per frame. (so -1 and 1 is the same ( 1 image per second).

Referenced by clear(), and print().

bool UComCam::streamOn

Do capture at regular intervals.

Referenced by clear(), and print().

bool UComCam::streamValid

Is images to be captured at regular intervals, then these values should be valid

Referenced by clear(), and print().

bool UComCam::videoValid

Gamma correction - is info valid.

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

unsigned int UComCam::whiteBalGainBlue
unsigned int UComCam::whiteBalGainRed

The white ballance gain can in some modes be moditored and can be set in manual mode. The values are gain in the red and blue channel (compared to the green). The range is 0 to 0x7FFF - but only a few of the MSBs are impelmented. A value of 0x4000 is assumed to be neutral (gain == 1.0), a higher value increases the gain.

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

unsigned int UComCam::whiteBalMode

White ballance can be set to automatic, a few stanrd settings and a manual value, the following values may be used:. PWC_WB_AUTO: Automatic PWC_WB_MANUAL: Manual PWC_WB_INDOOR: Indoor setting using high temperature wolfram light PWC_WB_OUTDOOR: An outdoor setting. PWC_WB_FL: Fluorcent lightning The values are defined in <pwc-ioctl.h> (in /usr/src/linux/drivers/usb(/media)

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().

bool UComCam::whiteBalValid

White ballance - is info valid.

Referenced by clear(), UComCamSml::pack(), print(), setCamDevice(), setFromCam(), and UComCamSml::unpack().


The documentation for this class was generated from the following files: