#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 |
void base_pgcamera_control::cleanup_and_exit | ( | dc1394camera_t * | camera | ) | [inline, private] |
Referenced by base_pgcamera_control(), GetFrame_dma(), and ~base_pgcamera_control().
int base_pgcamera_control::GetCameraNodes | ( | void | ) |
Gets all the cameras and their nodes in the predefined handlenum.
int base_pgcamera_control::OpenHandle | ( | void | ) |
Opens the raw1394 handle with the num HandleNum.
int base_pgcamera_control::PrintPossibleFrameRates | ( | void | ) |
Prints to shell all the camera possible frame rates.
int base_pgcamera_control::PrintPossibleModes | ( | void | ) |
Prints to shell all the camera possible modes.
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:
If none of this modes is selected the default mode MODE_320x240_YUV422 is selected
cm | Color format reference given by an enum defined in dc1394_control.h |
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:
f | feature to change | |
val | 1 is auto and 0 for manual |
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.
val | 1 for TRUE or 0 for FALSE |
int base_pgcamera_control::SetFlgverbose | ( | unsigned char | val | ) | [inline] |
Sets the flag verbose to val.
If true reports will be written to the shell.
val | 1 for TRUE or 0 for FALSE |
int base_pgcamera_control::SetHandleNum | ( | int | num | ) | [inline] |
Prints to shell all the camera features.
num | Number of the handle |
References handlenum.
int base_pgcamera_control::SetNodeNum | ( | int | num | ) | [inline] |
Sets the flag NodeNum to num.
num | Number of the node |
References nodenum.
int base_pgcamera_control::SetupCapture_dma | ( | void | ) |
Sets up the capture.
int base_pgcamera_control::StartIsoTransmission | ( | void | ) |
Starts iso transmission.
int base_pgcamera_control::TurnOffCamera | ( | void | ) |
Turns off the camera in handle handlenum and node nodenum.
int base_pgcamera_control::TurnOnCamera | ( | void | ) |
Turns on the camera in handle handlenum and node nodenum.
unsigned int base_pgcamera_control::Brightness |
dc1394camera_t* base_pgcamera_control::camera [private] |
struct { ... } base_pgcamera_control::captureparams |
Referenced by base_pgcamera_control(), GetBrightness(), GetExposure(), GetFrame_dma(), GetFrameRate(), GetGain(), GetGamma(), GetHue(), GetIris(), GetSaturation(), GetSharpness(), GetShutter(), SetBrightness(), SetExposure(), SetGain(), SetGamma(), SetHue(), SetSaturation(), SetSharpness(), SetShutter(), and SetWhiteBalance().
unsigned int base_pgcamera_control::channel |
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] |
Referenced by base_pgcamera_control(), GetFrame_dma(), SetBrightness(), SetExposure(), SetFrameRate(), SetGain(), SetGamma(), SetHue(), SetSaturation(), SetSharpness(), SetShutter(), and SetWhiteBalance().
unsigned int base_pgcamera_control::Exposure |
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] |
unsigned int base_pgcamera_control::FrameRate |
Referenced by base_pgcamera_control().
dc1394framerates_t base_pgcamera_control::framerates [private] |
Referenced by base_pgcamera_control().
unsigned int base_pgcamera_control::Gain |
unsigned int base_pgcamera_control::Gamma |
int base_pgcamera_control::handlenum [private] |
Referenced by base_pgcamera_control(), and SetHandleNum().
unsigned char base_pgcamera_control::hashandle |
unsigned int base_pgcamera_control::height |
unsigned int base_pgcamera_control::Hue |
unsigned int base_pgcamera_control::Iris |
dc1394bool_t base_pgcamera_control::is_color [private] |
Referenced by base_pgcamera_control().
dc1394camera_list_t* base_pgcamera_control::list [private] |
int base_pgcamera_control::nodenum [private] |
Referenced by base_pgcamera_control(), and SetNodeNum().
int base_pgcamera_control::numCameras [private] |
int base_pgcamera_control::numNodes [private] |
unsigned int base_pgcamera_control::Saturation |
unsigned int base_pgcamera_control::Sharpness |
unsigned int base_pgcamera_control::Shutter |
unsigned int base_pgcamera_control::speed |
unsigned int base_pgcamera_control::Temperature |
unsigned char base_pgcamera_control::testimgparams |
dc1394feature_mode_t base_pgcamera_control::tmp_mode [private] |
Referenced by SetBrightness(), SetExposure(), SetGain(), SetGamma(), SetHue(), SetSaturation(), SetSharpness(), SetShutter(), and SetWhiteBalance().
unsigned int base_pgcamera_control::u_b_value |
unsigned int base_pgcamera_control::v_r_value |
unsigned char base_pgcamera_control::verbose |
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().
struct { ... } base_pgcamera_control::WhiteBalance |
unsigned int base_pgcamera_control::width |