source: flair-src/trunk/lib/FlairSensorActuator/src/V4LCamera.h @ 157

Last change on this file since 157 was 137, checked in by Sanahuja Guillaume, 5 years ago

singleton manager

File size: 2.6 KB
RevLine 
[3]1// %flair:license{
[15]2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
[3]4// %flair:license}
5/*!
6 * \file V4LCamera.h
7 * \brief Base class for V4l camera
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2014/07/17
10 * \version 4.0
11 */
12
13#ifndef V4LCamera_H
14#define V4LCamera_H
15
16#include <Thread.h>
17#include "Camera.h"
18#include <highgui.h>
19
[15]20namespace flair {
21namespace core {
22class cvimage;
[3]23}
[15]24namespace gui {
25class DoubleSpinBox;
26class CheckBox;
27class Label;
28}
29}
[3]30
[15]31namespace flair {
32namespace sensor {
33/*! \class V4LCamera
34*
35* \brief Base class for V4l camera
36*/
37class V4LCamera : public core::Thread, public Camera {
38public:
39  /*!
40  * \brief Constructor
41  *
42  * Construct a Camera.
[137]43        * It will be child of the FrameworkManager.
[15]44  *
45  * \param name name
46  * \param camera_index camera index
47  * \param width width
48  * \param height height
49  * \param format image format
50  * \param priority priority of the Thread
51  */
[137]52  V4LCamera(std::string name,
[15]53            uint8_t camera_index, uint16_t width, uint16_t height,
54            core::cvimage::Type::Format format, uint8_t priority);
[3]55
[15]56  /*!
57  * \brief Destructor
58  *
59  */
60  ~V4LCamera();
[3]61
[15]62protected:
63  /*!
64  * \brief Set Gain
65  *
66  * \param value value between 0 and 1
67  */
68  virtual void SetGain(float value);
[3]69
[15]70  /*!
71  * \brief Set Auto Gain
72  *
73  * \param value value
74  */
75  virtual void SetAutoGain(bool value);
[3]76
[15]77  /*!
78  * \brief Set Exposure
79  *
80  * \param value value between 0 and 1
81  */
82  virtual void SetExposure(float value);
[3]83
[15]84  /*!
85  * \brief Set Auto Exposure
86  *
87  * \param value value
88  */
89  virtual void SetAutoExposure(bool value);
[3]90
[15]91  /*!
92  * \brief Set Brightness
93  *
94  * \param value value between 0 and 1
95  */
96  virtual void SetBrightness(float value);
[3]97
[15]98  /*!
99  * \brief Set Saturation
100  *
101  * \param value value between 0 and 1
102  */
103  virtual void SetSaturation(float value);
[3]104
[15]105  /*!
106  * \brief Set Hue
107  *
108  * \param value value between 0 and 1
109  */
110  virtual void SetHue(float value);
[3]111
[15]112  /*!
113  * \brief Set Contrast
114  *
115  * \param value value between 0 and 1
116  */
117  virtual void SetContrast(float value);
[3]118
[15]119private:
120  /*!
121  * \brief Update using provided datas
122  *
123  * Reimplemented from IODevice.
124  *
125  * \param data data from the parent to process
126  */
127  void UpdateFrom(const core::io_data *data){};
[3]128
[15]129  /*!
130  * \brief Run function
131  *
132  * Reimplemented from Thread.
133  *
134  */
135  void Run(void);
[3]136
[15]137  CvCapture *capture;
[3]138
[15]139  gui::Tab *sensor_tab;
140  gui::DoubleSpinBox *bright, *exposure, *gain, *contrast, *hue, *sharpness,
141      *sat;
142  gui::CheckBox *autogain, *awb, *autoexposure;
143  gui::Label *fps;
144};
[3]145} // end namespace sensor
146} // end namespace flair
147#endif // V4LCamera_H
Note: See TracBrowser for help on using the repository browser.