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

Last change on this file since 102 was 15, checked in by Bayard Gildas, 6 years ago

sources reformatted with flair-format-dir script

File size: 2.7 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;
23class FrameworkManager;
[3]24}
[15]25namespace gui {
26class GridLayout;
27class DoubleSpinBox;
28class CheckBox;
29class Label;
30}
31}
[3]32
[15]33namespace flair {
34namespace sensor {
35/*! \class V4LCamera
36*
37* \brief Base class for V4l camera
38*/
39class V4LCamera : public core::Thread, public Camera {
40public:
41  /*!
42  * \brief Constructor
43  *
44  * Construct a Camera.
45  *
46  * \param parent parent
47  * \param name name
48  * \param camera_index camera index
49  * \param width width
50  * \param height height
51  * \param format image format
52  * \param priority priority of the Thread
53  */
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);
[3]57
[15]58  /*!
59  * \brief Destructor
60  *
61  */
62  ~V4LCamera();
[3]63
[15]64protected:
65  /*!
66  * \brief Set Gain
67  *
68  * \param value value between 0 and 1
69  */
70  virtual void SetGain(float value);
[3]71
[15]72  /*!
73  * \brief Set Auto Gain
74  *
75  * \param value value
76  */
77  virtual void SetAutoGain(bool value);
[3]78
[15]79  /*!
80  * \brief Set Exposure
81  *
82  * \param value value between 0 and 1
83  */
84  virtual void SetExposure(float value);
[3]85
[15]86  /*!
87  * \brief Set Auto Exposure
88  *
89  * \param value value
90  */
91  virtual void SetAutoExposure(bool value);
[3]92
[15]93  /*!
94  * \brief Set Brightness
95  *
96  * \param value value between 0 and 1
97  */
98  virtual void SetBrightness(float value);
[3]99
[15]100  /*!
101  * \brief Set Saturation
102  *
103  * \param value value between 0 and 1
104  */
105  virtual void SetSaturation(float value);
[3]106
[15]107  /*!
108  * \brief Set Hue
109  *
110  * \param value value between 0 and 1
111  */
112  virtual void SetHue(float value);
[3]113
[15]114  /*!
115  * \brief Set Contrast
116  *
117  * \param value value between 0 and 1
118  */
119  virtual void SetContrast(float value);
[3]120
[15]121private:
122  /*!
123  * \brief Update using provided datas
124  *
125  * Reimplemented from IODevice.
126  *
127  * \param data data from the parent to process
128  */
129  void UpdateFrom(const core::io_data *data){};
[3]130
[15]131  /*!
132  * \brief Run function
133  *
134  * Reimplemented from Thread.
135  *
136  */
137  void Run(void);
[3]138
[15]139  CvCapture *capture;
[3]140
[15]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};
[3]147} // end namespace sensor
148} // end namespace flair
149#endif // V4LCamera_H
Note: See TracBrowser for help on using the repository browser.