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

Last change on this file since 401 was 352, checked in by Sanahuja Guillaume, 4 years ago

v4lcamera: use pimpl

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
[352]13#ifndef V4LCAMERA_H
14#define V4LCAMERA_H
[3]15
16#include <Thread.h>
17#include "Camera.h"
[350]18
[15]19namespace flair {
[346]20 namespace core {
21 class Image;
22 }
[3]23}
24
[352]25class V4LCamera_impl;
26
[15]27namespace flair {
28namespace sensor {
29/*! \class V4LCamera
30*
31* \brief Base class for V4l camera
32*/
33class V4LCamera : public core::Thread, public Camera {
[352]34 friend class ::V4LCamera_impl;
[15]35public:
36 /*!
37 * \brief Constructor
38 *
39 * Construct a Camera.
[137]40 * It will be child of the FrameworkManager.
[15]41 *
42 * \param name name
43 * \param camera_index camera index
44 * \param width width
45 * \param height height
46 * \param format image format
47 * \param priority priority of the Thread
48 */
[137]49 V4LCamera(std::string name,
[15]50 uint8_t camera_index, uint16_t width, uint16_t height,
[338]51 core::Image::Type::Format format, uint8_t priority);
[3]52
[15]53 /*!
54 * \brief Destructor
55 *
56 */
57 ~V4LCamera();
[165]58
59 //hack for ps3eye in hds uav
60 //TODO: put this in ps3eye class
61 bool HasProblems(void);
[3]62
[15]63protected:
64 /*!
65 * \brief Set Gain
66 *
67 * \param value value between 0 and 1
68 */
69 virtual void SetGain(float value);
[3]70
[15]71 /*!
72 * \brief Set Auto Gain
73 *
74 * \param value value
75 */
76 virtual void SetAutoGain(bool value);
[3]77
[15]78 /*!
79 * \brief Set Exposure
80 *
81 * \param value value between 0 and 1
82 */
83 virtual void SetExposure(float value);
[3]84
[15]85 /*!
86 * \brief Set Auto Exposure
87 *
88 * \param value value
89 */
90 virtual void SetAutoExposure(bool value);
[3]91
[15]92 /*!
93 * \brief Set Brightness
94 *
95 * \param value value between 0 and 1
96 */
97 virtual void SetBrightness(float value);
[3]98
[15]99 /*!
100 * \brief Set Saturation
101 *
102 * \param value value between 0 and 1
103 */
104 virtual void SetSaturation(float value);
[3]105
[15]106 /*!
107 * \brief Set Hue
108 *
109 * \param value value between 0 and 1
110 */
111 virtual void SetHue(float value);
[3]112
[15]113 /*!
114 * \brief Set Contrast
115 *
116 * \param value value between 0 and 1
117 */
118 virtual void SetContrast(float value);
[165]119
[15]120private:
121 /*!
122 * \brief Update using provided datas
123 *
124 * Reimplemented from IODevice.
125 *
126 * \param data data from the parent to process
127 */
128 void UpdateFrom(const core::io_data *data){};
[3]129
[15]130 /*!
131 * \brief Run function
132 *
133 * Reimplemented from Thread.
134 *
135 */
136 void Run(void);
[330]137
[352]138 class V4LCamera_impl *pimpl_;
[15]139};
[3]140} // end namespace sensor
141} // end namespace flair
[352]142#endif // V4LCAMERA_H
Note: See TracBrowser for help on using the repository browser.