base_pgcamera_control Class Reference
[Base_pgcamera]

#include <base_pgcamera.h>

Public Member Functions

 base_pgcamera_control ()
 Class constructor.
 base_pgcamera_control (int HN, unsigned int NN, dc1394video_mode_t vm, int FR)
 Overloaded class constructor.
 ~base_pgcamera_control ()
 Class destructor.
int PrintPossibleModes (void)
 Prints to shell all the camera possible modes.
int PrintPossibleFrameRates (void)
 Prints to shell all the camera possible frame rates.
int SetHandleNum (int num)
 Prints to shell all the camera features.
int SetNodeNum (int num)
 Sets the flag NodeNum to num.
int SetColorFormat (int cm)
 Sets the camera color format.
int SetFeatureToManualAuto (unsigned int f, unsigned int val)
 Sets a camera feature to manual or auto control.
int SetPredefinedParams (int paramsset)
int SetFlgverbose (unsigned char val)
 Sets the flag verbose to val.
int SetFlgtestimgparams (unsigned char val)
 Sets the flag testimgparams to val.
int OpenHandle (void)
 Opens the raw1394 handle with the num HandleNum.
int TurnOffCamera (void)
 Turns off the camera in handle handlenum and node nodenum.
int TurnOnCamera (void)
 Turns on the camera in handle handlenum and node nodenum.
int GetCameraNodes (void)
 Gets all the cameras and their nodes in the predefined handlenum.
int SetupCapture_dma (void)
 Sets up the capture.
int StartIsoTransmission (void)
 Starts iso transmission.
int GetFrame_dma (IplImage *img, double *ts)
 Gets an image from the camera at handle handlenum and node nodenum.
int GetFrameRate (void)
 Inits camera to its factory settings.
int GetBrightness (void)
int GetSaturation (void)
int GetExposure (void)
int GetSharpness (void)
int GetWhiteBalance (void)
int GetHue (void)
int GetGamma (void)
int GetShutter (void)
int GetGain (void)
int GetIris (void)
int SetFrameRate (int fr)
int SetBrightness (unsigned int b, unsigned char manual)
int SetSaturation (unsigned int s, unsigned char manual)
int SetExposure (unsigned int e, unsigned char manual)
int SetSharpness (unsigned int s, unsigned char manual)
int SetWhiteBalance (unsigned int ub, unsigned int vr, unsigned char manual)
int SetHue (unsigned int h, unsigned char manual)
int SetGamma (unsigned int g, unsigned char manual)
int SetShutter (unsigned int s, unsigned char manual)
int SetGain (unsigned int g, unsigned char manual)

Data Fields

struct {
   unsigned int   width
   unsigned int   height
   int   numchannels
   unsigned int   channel
   unsigned int   speed
   int   colormode
   int   framerate
   unsigned int   Brightness
   unsigned int   Exposure
   unsigned int   Sharpness
   unsigned int   Hue
   unsigned int   Saturation
   unsigned int   Gamma
   unsigned int   Temperature
   unsigned int   Shutter
   unsigned int   Gain
   unsigned int   FrameRate
   unsigned int   Iris
   struct {
      unsigned int   u_b_value
      unsigned int   v_r_value
   }   WhiteBalance
captureparams
unsigned char verbose
unsigned char hashandle
unsigned char testimgparams

Private Member Functions

void cleanup_and_exit (dc1394camera_t *camera)

Private Attributes

dc1394framerates_t framerates
dc1394framerate_t framerate
dc1394video_frame_t * frame
dc1394camera_t * camera
dc1394_t * d
dc1394camera_list_t * list
dc1394error_t err
dc1394video_mode_t video_mode
dc1394color_coding_t coding
dc1394video_modes_t video_modes
dc1394bool_t is_color
dc1394featureset_t features
dc1394feature_mode_t tmp_mode
int handlenum
int nodenum
int numNodes
int numCameras
struct {
   unsigned char   verbose
   unsigned char   hashandle
   unsigned char   testimgparams
flg

Member Function Documentation

void base_pgcamera_control::cleanup_and_exit ( dc1394camera_t *  camera  )  [inline, private]

Referenced by base_pgcamera_control(), GetFrame_dma(), and ~base_pgcamera_control().

Here is the caller graph for this function:

int base_pgcamera_control::GetCameraNodes ( void   ) 

Gets all the cameras and their nodes in the predefined handlenum.

Returns:
function result. 1 is OK 0 is NOK
int base_pgcamera_control::OpenHandle ( void   ) 

Opens the raw1394 handle with the num HandleNum.

Returns:
function result. 1 is OK 0 is NOK
int base_pgcamera_control::PrintPossibleFrameRates ( void   ) 

Prints to shell all the camera possible frame rates.

Returns:
function result. 1 is OK 0 is NOK
int base_pgcamera_control::PrintPossibleModes ( void   ) 

Prints to shell all the camera possible modes.

Returns:
function result. 1 is OK 0 is NOK
int base_pgcamera_control::SetColorFormat ( int  cm  ) 

Sets the camera color format.

The color format is defined in an enum declared in dc1394_control.h
The supported modes are:

  • MODE_160x120_YUV444 = 64 (WARNING: TESTS FAILED WITH THIS OPTION)
  • MODE_320x240_YUV422
  • MODE_640x480_YUV411
  • MODE_640x480_YUV422 (WARNING: TESTS FAILED WITH THIS OPTION)
  • MODE_640x480_RGB (WARNING: TESTS FAILED WITH THIS OPTION)
  • MODE_640x480_MONO (WARNING: TESTS FAILED WITH THIS OPTION)
  • MODE_640x480_MONO16 (WARNING: TESTS FAILED WITH THIS OPTION)

If none of this modes is selected the default mode MODE_320x240_YUV422 is selected

Parameters:
cm Color format reference given by an enum defined in dc1394_control.h
Returns:
function result. 1 is OK 0 is NOK
int base_pgcamera_control::SetFeatureToManualAuto ( unsigned int  f,
unsigned int  val 
)

Sets a camera feature to manual or auto control.

The available features are defined in a enum of dc1394_control.h
These are:

  • FEATURE_BRIGHTNESS = 416
  • FEATURE_EXPOSURE
  • FEATURE_SHARPNESS
  • FEATURE_WHITE_BALANCE
  • FEATURE_HUE
  • FEATURE_SATURATION
  • FEATURE_GAMMA
  • FEATURE_SHUTTER
  • FEATURE_GAIN
  • FEATURE_IRIS
  • FEATURE_FOCUS
  • FEATURE_TEMPERATURE
  • FEATURE_TRIGGER
  • FEATURE_TRIGGER_DELAY
  • FEATURE_WHITE_SHADING
  • FEATURE_FRAME_RATE
    Parameters:
    f feature to change
    val 1 is auto and 0 for manual
    Returns:
    function result. 1 is OK 0 is NOK
int base_pgcamera_control::SetFlgtestimgparams ( unsigned char  val  )  [inline]

Sets the flag testimgparams to val.

If true every time a get image is called the pointer to the image is first tested avoiding a runtime crash.

Parameters:
val 1 for TRUE or 0 for FALSE
Returns:
function result. 1 is OK 0 is NOK
int base_pgcamera_control::SetFlgverbose ( unsigned char  val  )  [inline]

Sets the flag verbose to val.

If true reports will be written to the shell.

Parameters:
val 1 for TRUE or 0 for FALSE
Returns:
function result. 1 is OK 0 is NOK
int base_pgcamera_control::SetHandleNum ( int  num  )  [inline]

Prints to shell all the camera features.

Returns:
function result. 1 is OK 0 is NOK Prints to shell some camera info
function result. 1 is OK 0 is NOK Sets the flag HandleNum to num
Parameters:
num Number of the handle
Returns:
function result. 1 is OK 0 is NOK

References handlenum.

int base_pgcamera_control::SetNodeNum ( int  num  )  [inline]

Sets the flag NodeNum to num.

Parameters:
num Number of the node
Returns:
function result. 1 is OK 0 is NOK

References nodenum.

int base_pgcamera_control::SetupCapture_dma ( void   ) 

Sets up the capture.

Returns:
function result. 1 is OK 0 is NOK
int base_pgcamera_control::StartIsoTransmission ( void   ) 

Starts iso transmission.

Returns:
function result. 1 is OK 0 is NOK
int base_pgcamera_control::TurnOffCamera ( void   ) 

Turns off the camera in handle handlenum and node nodenum.

Returns:
function result. 1 is OK 0 is NOK
int base_pgcamera_control::TurnOnCamera ( void   ) 

Turns on the camera in handle handlenum and node nodenum.

Returns:
function result. 1 is OK 0 is NOK

Field Documentation

dc1394camera_t* base_pgcamera_control::camera [private]
dc1394color_coding_t base_pgcamera_control::coding [private]

Referenced by base_pgcamera_control().

dc1394_t* base_pgcamera_control::d [private]

Referenced by base_pgcamera_control().

dc1394error_t base_pgcamera_control::err [private]
dc1394featureset_t base_pgcamera_control::features [private]

Referenced by base_pgcamera_control().

struct { ... } base_pgcamera_control::flg [private]
dc1394video_frame_t* base_pgcamera_control::frame [private]

Referenced by GetFrame_dma().

dc1394framerate_t base_pgcamera_control::framerate [private]

Referenced by base_pgcamera_control().

dc1394framerates_t base_pgcamera_control::framerates [private]

Referenced by base_pgcamera_control().

dc1394bool_t base_pgcamera_control::is_color [private]

Referenced by base_pgcamera_control().

dc1394camera_list_t* base_pgcamera_control::list [private]
dc1394feature_mode_t base_pgcamera_control::tmp_mode [private]
dc1394video_mode_t base_pgcamera_control::video_mode [private]

Referenced by base_pgcamera_control().

dc1394video_modes_t base_pgcamera_control::video_modes [private]

Referenced by base_pgcamera_control().


The documentation for this class was generated from the following files:
Generated on Wed Jun 2 12:43:29 2010 for LAR Atlas by  doxygen 1.6.3