Flair
Framework Libre Air
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties
V4LCamera.h
Go to the documentation of this file.
1 // %flair:license{
2 // This file is part of the Flair framework distributed under the
3 // CECILL-C License, Version 1.0.
4 // %flair:license}
13 #ifndef V4LCamera_H
14 #define V4LCamera_H
15 
16 #include <Thread.h>
17 #include "Camera.h"
18 #include <highgui.h>
19 
20 namespace flair {
21 namespace core {
22 class cvimage;
23 class FrameworkManager;
24 }
25 namespace gui {
26 class GridLayout;
27 class DoubleSpinBox;
28 class CheckBox;
29 class Label;
30 }
31 }
32 
33 namespace flair {
34 namespace sensor {
39 class V4LCamera : public core::Thread, public Camera {
40 public:
54  V4LCamera(const core::FrameworkManager *parent, std::string name,
55  uint8_t camera_index, uint16_t width, uint16_t height,
56  core::cvimage::Type::Format format, uint8_t priority);
57 
62  ~V4LCamera();
63 
64 protected:
70  virtual void SetGain(float value);
71 
77  virtual void SetAutoGain(bool value);
78 
84  virtual void SetExposure(float value);
85 
91  virtual void SetAutoExposure(bool value);
92 
98  virtual void SetBrightness(float value);
99 
105  virtual void SetSaturation(float value);
106 
112  virtual void SetHue(float value);
113 
119  virtual void SetContrast(float value);
120 
121 private:
129  void UpdateFrom(const core::io_data *data){};
130 
137  void Run(void);
138 
139  CvCapture *capture;
140 
141  gui::Tab *sensor_tab;
142  gui::DoubleSpinBox *bright, *exposure, *gain, *contrast, *hue, *sharpness,
143  *sat;
144  gui::CheckBox *autogain, *awb, *autoexposure;
145  gui::Label *fps;
146 };
147 } // end namespace sensor
148 } // end namespace flair
149 #endif // V4LCamera_H
Abstract class for data types.
Definition: io_data.h:77
Base class for Camera.
Definition: Camera.h:39
virtual void SetBrightness(float value)
Set Brightness.
Class displaying a QCheckBox on the ground station.
Definition: CheckBox.h:28
virtual void SetHue(float value)
Set Hue.
virtual void SetContrast(float value)
Set Contrast.
virtual void SetGain(float value)
Set Gain.
~V4LCamera()
Destructor.
Format
Definition: cvimage.h:37
virtual void SetSaturation(float value)
Set Saturation.
Class displaying a QLabel on the ground station.
Definition: Label.h:28
Main class of the Framework library.
Definition: FrameworkManager.h:45
Abstract class for a thread.
virtual void SetAutoGain(bool value)
Set Auto Gain.
Abstract class for a thread.
Definition: Thread.h:38
V4LCamera(const core::FrameworkManager *parent, std::string name, uint8_t camera_index, uint16_t width, uint16_t height, core::cvimage::Type::Format format, uint8_t priority)
Constructor.
Class displaying a QDoubleSpinBox on the ground station.
Definition: DoubleSpinBox.h:28
Base class for Camera.
virtual void SetAutoExposure(bool value)
Set Auto Exposure.
virtual void SetExposure(float value)
Set Exposure.
Class displaying a QTab on the ground station.
Definition: Tab.h:29
Base class for V4l camera.
Definition: V4LCamera.h:39