Fawkes API  Fawkes Development Version
firevision::CameraControlImage Class Referenceabstract

#include <>>

Inheritance diagram for firevision::CameraControlImage:

Public Member Functions

virtual ~CameraControlImage ()
 Empty virtual destructor. 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 ()=0
 
virtual unsigned int height ()=0
 
virtual void size (unsigned int &width, unsigned int &height)
 Get the current image size. More...
 
virtual void set_size (unsigned int width, unsigned int height)=0
 
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 mirror (bool &horiz, bool &vert)
 Get information about current camera image mirroring. 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 void set_mirror (bool horiz, bool vert)
 Set whether the camera should mirror images. More...
 
virtual unsigned int fps ()
 Get the number of frames per second the camera tries to deliver. 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 lens_corr (unsigned int &x_corr, unsigned int &y_corr)
 Get current lens 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 void set_lens_corr (unsigned int x_corr, unsigned int y_corr)
 Set lens correction. More...
 
- Public Member Functions inherited from firevision::CameraControl
virtual ~CameraControl ()
 Virtual empty destructor. More...
 

Detailed Description

Camera image control interface. Some cameras feature adjustable image controls like size, format or mirroring.

This interface shall be implemented by such cameras.

Author
Tobias Kellner
Tim Niemueller

Definition at line 39 of file image.h.

Constructor & Destructor Documentation

◆ ~CameraControlImage()

firevision::CameraControlImage::~CameraControlImage ( )
virtual

Empty virtual destructor.

Definition at line 65 of file image.cpp.

Member Function Documentation

◆ format()

const char * firevision::CameraControlImage::format ( )
virtual

Get the image format the camera currently uses.

Check implementation documentation for details on the format.

Returns
a string describing the image format
Exceptions
NotImplementedExceptionNot implemented by this control

Reimplemented in firevision::V4L2Camera, and firevision::DummyCameraControl.

Definition at line 75 of file image.cpp.

◆ fps()

unsigned int firevision::CameraControlImage::fps ( )
virtual

Get the number of frames per second the camera tries to deliver.

Returns
the current fps
Exceptions
NotImplementedExceptionNot implemented by this control

Reimplemented in firevision::DummyCameraControl, and firevision::V4L2Camera.

Definition at line 171 of file image.cpp.

◆ height()

unsigned int firevision::CameraControlImage::height ( )
pure virtual

Get the current height of the image.

Returns
height in pixels

Implemented in firevision::V4L2Camera, and firevision::DummyCameraControl.

Referenced by set_format().

◆ horiz_mirror()

bool firevision::CameraControlImage::horiz_mirror ( )
virtual

Return whether the camera image is horizontally mirrored.

Returns
true if the image is horizontally mirrored
Exceptions
NotImplementedExceptionNot implemented by this control

Reimplemented in firevision::DummyCameraControl, and firevision::V4L2Camera.

Definition at line 107 of file image.cpp.

Referenced by vert_mirror().

◆ lens_corr()

void firevision::CameraControlImage::lens_corr ( unsigned int &  x_corr,
unsigned int &  y_corr 
)
virtual

Get current lens correction.

Parameters
[out]x_corrwhere the current lens x correction will be stored
[out]y_corrwhere the current lens y correction will be stored
Exceptions
NotImplementedExceptionNot implemented by this control

Reimplemented in firevision::DummyCameraControl.

Definition at line 212 of file image.cpp.

◆ lens_x_corr()

unsigned int firevision::CameraControlImage::lens_x_corr ( )
virtual

Get current lens x correction.

Returns
current lens x correction
Exceptions
NotImplementedExceptionNot implemented by this control

Reimplemented in firevision::DummyCameraControl, and firevision::V4L2Camera.

Definition at line 191 of file image.cpp.

Referenced by lens_y_corr().

◆ lens_y_corr()

unsigned int firevision::CameraControlImage::lens_y_corr ( )
virtual

Get current lens y correction.

Returns
current lens y correction
Exceptions
NotImplementedExceptionNot implemented by this control

Reimplemented in firevision::DummyCameraControl, and firevision::V4L2Camera.

Definition at line 201 of file image.cpp.

References lens_x_corr().

◆ mirror()

void firevision::CameraControlImage::mirror ( bool &  horiz,
bool &  vert 
)
virtual

Get information about current camera image mirroring.

Parameters
[out]horizupon return contains flag if horizontal mirroring is enabled
[out]vertupon return contains flag if vertical mirroring is enabled
Exceptions
NotImplementedExceptionNot implemented by this control

Reimplemented in firevision::DummyCameraControl.

Definition at line 128 of file image.cpp.

◆ set_format()

void firevision::CameraControlImage::set_format ( const char *  format)
virtual

Set the image format the camera should use.

Check implementation documentation for details on the format.

Parameters
formatthe new image format
Exceptions
NotImplementedExceptionNot implemented by this control

Reimplemented in firevision::V4L2Camera, and firevision::DummyCameraControl.

Definition at line 86 of file image.cpp.

References height(), and width().

◆ set_fps()

void firevision::CameraControlImage::set_fps ( unsigned int  fps)
virtual

Set the number of frames per second the camera tries to deliver.

Parameters
fpsthe new fps
Exceptions
NotImplementedExceptionNot implemented by this control

Reimplemented in firevision::DummyCameraControl, and firevision::V4L2Camera.

Definition at line 181 of file image.cpp.

◆ set_horiz_mirror()

void firevision::CameraControlImage::set_horiz_mirror ( bool  enabled)
virtual

Set whether the camera should mirror images horizontally.

Parameters
enabledif true, images should be mirrored horizontally
Exceptions
NotImplementedExceptionNot implemented by this control

Reimplemented in firevision::DummyCameraControl, and firevision::V4L2Camera.

Definition at line 139 of file image.cpp.

Referenced by set_vert_mirror().

◆ set_lens_corr()

void firevision::CameraControlImage::set_lens_corr ( unsigned int  x_corr,
unsigned int  y_corr 
)
virtual

Set lens correction.

Parameters
x_corrnew lens x correction
y_corrnew lens y correction
Exceptions
NotImplementedExceptionNot implemented by this control

Reimplemented in firevision::DummyCameraControl.

Definition at line 244 of file image.cpp.

◆ set_lens_x_corr()

void firevision::CameraControlImage::set_lens_x_corr ( unsigned int  x_corr)
virtual

Set lens x correction.

Parameters
x_corrnew lens x correction
Exceptions
NotImplementedExceptionNot implemented by this control

Reimplemented in firevision::DummyCameraControl, and firevision::V4L2Camera.

Definition at line 223 of file image.cpp.

Referenced by set_lens_y_corr().

◆ set_lens_y_corr()

void firevision::CameraControlImage::set_lens_y_corr ( unsigned int  y_corr)
virtual

Set lens y correction.

Parameters
y_corrnew lens y correction
Exceptions
NotImplementedExceptionNot implemented by this control

Reimplemented in firevision::DummyCameraControl, and firevision::V4L2Camera.

Definition at line 233 of file image.cpp.

References set_lens_x_corr().

◆ set_mirror()

void firevision::CameraControlImage::set_mirror ( bool  horiz,
bool  vert 
)
virtual

Set whether the camera should mirror images.

Parameters
horiztrue to mirror images horizontally, false to disable mirroring
verttrue to mirror images vertically, false to disable mirroring
Exceptions
NotImplementedExceptionNot implemented by this control

Reimplemented in firevision::DummyCameraControl.

Definition at line 160 of file image.cpp.

◆ set_size()

void firevision::CameraControlImage::set_size ( unsigned int  width,
unsigned int  height 
)
pure virtual

Set the image size the camera should use.

Parameters
widthnew width of the image
heightnew height of the image
Exceptions
Exceptionthrown for instance if size setting at run-time is not supported

Implemented in firevision::DummyCameraControl, and firevision::V4L2Camera.

◆ set_vert_mirror()

void firevision::CameraControlImage::set_vert_mirror ( bool  enabled)
virtual

Set whether the camera should mirror images vertically.

Parameters
enabledif true, images should be mirrored vertically
Exceptions
NotImplementedExceptionNot implemented by this control

Reimplemented in firevision::DummyCameraControl, and firevision::V4L2Camera.

Definition at line 149 of file image.cpp.

References set_horiz_mirror().

◆ size()

void firevision::CameraControlImage::size ( unsigned int &  width,
unsigned int &  height 
)
virtual

Get the current image size.

Parameters
[out]widthupon return contains the width of the image
[out]heightupon return contains the height of the image

Reimplemented in firevision::DummyCameraControl.

Definition at line 96 of file image.cpp.

Referenced by firevision::V4L2Camera::buffer_size(), firevision::V4L2Camera::capture(), firevision::V4L2Camera::close(), and firevision::V4L2Camera::V4L2Camera().

◆ vert_mirror()

bool firevision::CameraControlImage::vert_mirror ( )
virtual

Return whether the camera image is vertically mirrored.

Returns
true if the image is vertically mirrored
Exceptions
NotImplementedExceptionNot implemented by this control

Reimplemented in firevision::DummyCameraControl, and firevision::V4L2Camera.

Definition at line 117 of file image.cpp.

References horiz_mirror().

◆ width()

unsigned int firevision::CameraControlImage::width ( )
pure virtual

Get the current width of the image.

Returns
width in pixels

Implemented in firevision::V4L2Camera, and firevision::DummyCameraControl.

Referenced by set_format().


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