Fawkes API
Fawkes Development Version
|
Video4Linux 2 camera with Nao-specific extensions. More...
#include <>>
Public Member Functions | |
NaoCamera (const CameraArgumentParser *cap) | |
Constructor. More... | |
virtual unsigned char | source () |
Return which cam is currently being used. More... | |
virtual void | set_source (unsigned char source) |
Switch currently used camera. More... | |
virtual bool | exposure_auto () |
Return whether auto exposure is enabled. More... | |
virtual void | set_exposure_auto (bool enabled) |
Enable/disable auto exposure. More... | |
![]() | |
V4L2Camera (const char *device_name="/dev/video0") | |
Constructor. More... | |
V4L2Camera (const CameraArgumentParser *cap) | |
Constructor. More... | |
virtual | ~V4L2Camera () |
Destructor. More... | |
virtual void | open () |
Open the camera. More... | |
virtual void | start () |
Start image transfer from the camera. More... | |
virtual void | stop () |
Stop image transfer from the camera. More... | |
virtual void | close () |
Close camera. More... | |
virtual void | flush () |
Flush image queue. More... | |
virtual void | capture () |
Capture an image. More... | |
virtual void | print_info () |
Print out camera information. More... | |
virtual bool | ready () |
Camera is ready for taking pictures. More... | |
virtual unsigned char * | buffer () |
Get access to current image buffer. More... | |
virtual unsigned int | buffer_size () |
Size of buffer. More... | |
virtual void | dispose_buffer () |
Dispose current buffer. More... | |
virtual unsigned int | pixel_width () |
Width of image in pixels. More... | |
virtual unsigned int | pixel_height () |
Height of image in pixels. More... | |
virtual colorspace_t | colorspace () |
Colorspace of returned image. More... | |
virtual fawkes::Time * | capture_time () |
Get the Time of the last successfully captured image. More... | |
virtual void | set_image_number (unsigned int n) |
Set image number to retrieve. More... | |
virtual bool | auto_gain () |
Return whether auto gain is enabled. More... | |
virtual void | set_auto_gain (bool enabled) |
Enable/disable auto gain. More... | |
virtual bool | auto_white_balance () |
Return whether auto white balance is enabled. More... | |
virtual void | set_auto_white_balance (bool enabled) |
Enable/disable auto white balance. More... | |
virtual void | set_exposure_auto (unsigned int exposure_auto) |
Enable/disable auto exposure. More... | |
virtual int | red_balance () |
Get current red balance. More... | |
virtual void | set_red_balance (int red_balance) |
Set red balance. More... | |
virtual int | blue_balance () |
Get current blue balance. More... | |
virtual void | set_blue_balance (int blue_balance) |
Set blue balance. More... | |
virtual int | u_balance () |
Get current u balance. More... | |
virtual void | set_u_balance (int u_balance) |
Set u balance. More... | |
virtual int | v_balance () |
Get current v balance. More... | |
virtual void | set_v_balance (int v_balance) |
Set v balance. More... | |
virtual unsigned int | brightness () |
Get current brightness. More... | |
virtual void | set_brightness (unsigned int brightness) |
Set new brightness. More... | |
virtual unsigned int | contrast () |
Get current contrast. More... | |
virtual void | set_contrast (unsigned int contrast) |
Set new contrast. More... | |
virtual unsigned int | saturation () |
Get current saturation. More... | |
virtual void | set_saturation (unsigned int saturation) |
Set new saturation. More... | |
virtual int | hue () |
Get current hue. More... | |
virtual void | set_hue (int hue) |
Set new hue. More... | |
virtual unsigned int | exposure () |
Get current exposure. More... | |
virtual void | set_exposure (unsigned int exposure) |
Set new exposure. More... | |
virtual unsigned int | gain () |
Get current gain. More... | |
virtual void | set_gain (unsigned int gain) |
Set new gain. More... | |
virtual const char * | format () |
Get the image format the camera currently uses. More... | |
virtual void | set_format (const char *format) |
Set the image format the camera should use. More... | |
virtual unsigned int | width () |
Get the current width of the image. More... | |
virtual unsigned int | height () |
Get the current height of the image. More... | |
virtual void | set_size (unsigned int width, unsigned int height) |
Set the image size the camera should use. More... | |
virtual bool | horiz_mirror () |
Return whether the camera image is horizontally mirrored. More... | |
virtual bool | vert_mirror () |
Return whether the camera image is vertically mirrored. More... | |
virtual void | set_horiz_mirror (bool enabled) |
Set whether the camera should mirror images horizontally. More... | |
virtual void | set_vert_mirror (bool enabled) |
Set whether the camera should mirror images vertically. More... | |
virtual unsigned int | fps () |
Get the number of frames per second that have been requested from the camera. More... | |
virtual void | set_fps (unsigned int fps) |
Set the number of frames per second the camera tries to deliver. More... | |
virtual unsigned int | lens_x_corr () |
Get current lens x correction. More... | |
virtual unsigned int | lens_y_corr () |
Get current lens y correction. More... | |
virtual void | set_lens_x_corr (unsigned int x_corr) |
Set lens x correction. More... | |
virtual void | set_lens_y_corr (unsigned int y_corr) |
Set lens y correction. More... | |
virtual bool | exposure_auto_priority () |
Get exposure_auto_priority V4L2 control. More... | |
virtual void | set_exposure_auto_priority (bool enabled) |
Set exposure_auto_priority V4L2 control. More... | |
virtual unsigned int | white_balance_temperature () |
Get absolute white balance setting. More... | |
virtual void | set_white_balance_temperature (unsigned int white_balance_temperature) |
Set white balance. More... | |
virtual unsigned int | exposure_absolute () |
Get absolute exposure time. More... | |
virtual void | set_exposure_absolute (unsigned int exposure_absolute) |
set absolute exposure time (1/s) More... | |
virtual unsigned int | sharpness () |
Get sharpness value. More... | |
virtual void | set_sharpness (unsigned int sharpness) |
Set sharpness. More... | |
![]() | |
virtual | ~Camera () |
Virtual empty destructor. More... | |
![]() | |
virtual | ~CameraControlColor () |
Empty virtual destructor. More... | |
virtual void | set_auto_all (bool enabled) |
Enable/disable all automatic settings. More... | |
![]() | |
virtual | ~CameraControl () |
Virtual empty destructor. More... | |
![]() | |
virtual | ~CameraControlImage () |
Empty virtual destructor. More... | |
virtual void | size (unsigned int &width, unsigned int &height) |
Get the current image size. More... | |
virtual void | mirror (bool &horiz, bool &vert) |
Get information about current camera image mirroring. More... | |
virtual void | set_mirror (bool horiz, bool vert) |
Set whether the camera should mirror images. More... | |
virtual void | lens_corr (unsigned int &x_corr, unsigned int &y_corr) |
Get current lens correction. More... | |
virtual void | set_lens_corr (unsigned int x_corr, unsigned int y_corr) |
Set lens correction. More... | |
![]() | |
virtual | ~CameraControlSource () |
Empty virtual destructor. More... | |
Additional Inherited Members | |
![]() | |
V4L2Camera (const char *device_name, int dev) | |
Protected Constructor. More... | |
virtual void | set_one_control (const char *ctrl, unsigned int id, int value) |
Set one Camera control value. More... | |
virtual int | get_one_control (const char *ctrl, unsigned int id) |
Get one Camera control value. More... | |
![]() | |
char * | _device_name |
Device name. More... | |
firevision::NaoCamera::NaoCamera | ( | const CameraArgumentParser * | cap | ) |
Constructor.
Initialize camera with parameters from camera argument parser. Supported arguments (additionally to V4L2Camera arguments): *Required:
cap | camera argument parser |
Definition at line 117 of file nao.cpp.
References firevision::V4L2Camera::_device_name, firevision::V4L2Camera::close(), firevision::CameraArgumentParser::get(), firevision::CameraArgumentParser::has(), firevision::V4L2Camera::open(), and firevision::CameraControlImage::size().
|
virtual |
Return whether auto exposure is enabled.
Reimplemented from firevision::V4L2Camera.
Definition at line 282 of file nao.cpp.
References firevision::V4L2Camera::get_one_control().
|
virtual |
Enable/disable auto exposure.
enabled | whether auto exposure should be enabled |
Definition at line 291 of file nao.cpp.
References firevision::V4L2Camera::set_one_control().
|
virtual |
Switch currently used camera.
Valid arguments: 1: brow-cam 2: mouth-cam
source | ID of the camera to use |
Implements firevision::CameraControlSource.
Definition at line 264 of file nao.cpp.
References firevision::V4L2Camera::_device_name.
|
virtual |
Return which cam is currently being used.
1: brow-cam 2: mouth-cam
Implements firevision::CameraControlSource.