Fawkes API  Fawkes Development Version
image.h
1 
2 /***************************************************************************
3  * image.h - Abstract class defining a camera image controller
4  *
5  * Created: Wed Apr 22 11:32:56 CEST 2009
6  * Copyright 2009 Tobias Kellner
7  * 2005-2009 Tim Niemueller [www.niemueller.de]
8  *
9  ****************************************************************************/
10 
11 /* This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version. A runtime exception applies to
15  * this software (see LICENSE.GPL_WRE file mentioned below for details).
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Library General Public License for more details.
21  *
22  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
23  */
24 
25 #ifndef __FIREVISION_CAMS_CONTROL_IMAGE_H_
26 #define __FIREVISION_CAMS_CONTROL_IMAGE_H_
27 
28 #include <fvcams/control/control.h>
29 
30 namespace firevision {
31 #if 0 /* just to make Emacs auto-indent happy */
32 }
33 #endif
34 
35 class CameraControlImage : virtual public CameraControl
36 {
37  public:
38  virtual ~CameraControlImage();
39 
40  virtual const char * format();
41  virtual void set_format(const char *format);
42  virtual unsigned int width() = 0;
43  virtual unsigned int height() = 0;
44  virtual void size(unsigned int &width, unsigned int &height);
45  virtual void set_size(unsigned int width,
46  unsigned int height) = 0;
47  virtual bool horiz_mirror();
48  virtual bool vert_mirror();
49  virtual void mirror(bool &horiz, bool &vert);
50  virtual void set_horiz_mirror(bool enabled);
51  virtual void set_vert_mirror(bool enabled);
52  virtual void set_mirror(bool horiz, bool vert);
53 
54  virtual unsigned int fps();
55  virtual void set_fps(unsigned int fps);
56 
57  virtual unsigned int lens_x_corr();
58  virtual unsigned int lens_y_corr();
59  virtual void lens_corr(unsigned int &x_corr, unsigned int &y_corr);
60  virtual void set_lens_x_corr(unsigned int x_corr);
61  virtual void set_lens_y_corr(unsigned int y_corr);
62  virtual void set_lens_corr(unsigned int x_corr, unsigned int y_corr);
63 };
64 
65 } // end namespace firevision
66 
67 #endif // __FIREVISION_CAMS_CONTROL_IMAGE_H_
virtual bool vert_mirror()
Return whether the camera image is vertically mirrored.
Definition: image.cpp:118
virtual void set_lens_y_corr(unsigned int y_corr)
Set lens y correction.
Definition: image.cpp:245
virtual unsigned int lens_y_corr()
Get current lens y correction.
Definition: image.cpp:210
virtual void set_format(const char *format)
Set the image format the camera should use.
Definition: image.cpp:85
virtual ~CameraControlImage()
Empty virtual destructor.
Definition: image.cpp:62
virtual void lens_corr(unsigned int &x_corr, unsigned int &y_corr)
Get current lens correction.
Definition: image.cpp:222
Camera image control interface.
Definition: image.h:35
virtual void set_vert_mirror(bool enabled)
Set whether the camera should mirror images vertically.
Definition: image.cpp:153
virtual void set_lens_x_corr(unsigned int x_corr)
Set lens x correction.
Definition: image.cpp:234
Camera control interface base class.
Definition: control.h:33
virtual void set_size(unsigned int width, unsigned int height)=0
Set the image size the camera should use.
virtual void mirror(bool &horiz, bool &vert)
Get information about current camera image mirroring.
Definition: image.cpp:130
virtual void set_mirror(bool horiz, bool vert)
Set whether the camera should mirror images.
Definition: image.cpp:165
virtual const char * format()
Get the image format the camera currently uses.
Definition: image.cpp:73
virtual void size(unsigned int &width, unsigned int &height)
Get the current image size.
Definition: image.cpp:96
virtual bool horiz_mirror()
Return whether the camera image is horizontally mirrored.
Definition: image.cpp:107
virtual unsigned int height()=0
Get the current height of the image.
virtual unsigned int fps()
Get the number of frames per second the camera tries to deliver.
Definition: image.cpp:177
virtual void set_fps(unsigned int fps)
Set the number of frames per second the camera tries to deliver.
Definition: image.cpp:188
virtual void set_lens_corr(unsigned int x_corr, unsigned int y_corr)
Set lens correction.
Definition: image.cpp:257
virtual unsigned int width()=0
Get the current width of the image.
virtual unsigned int lens_x_corr()
Get current lens x correction.
Definition: image.cpp:199
virtual void set_horiz_mirror(bool enabled)
Set whether the camera should mirror images horizontally.
Definition: image.cpp:142