camera_interface
ExposureController.h
Go to the documentation of this file.
1 #ifndef EXPOSURECONTROLLER_H
2 
3 #define EXPOSURECONTROLLER_H
4 
5 /*
6  * Controller for the exposure time of video cameras
7  * The Controller assumes that the camera detector hat a linear relationship between exposure time and brightness of the picture.
8  */
10  private:
11  int tolerance, min, max;
12  int lastExp;
13  int calcNewValue(int measuredValue, int target);
14  public:
15  /*
16  * Constructor
17  * @param _min Minimum Exposure time
18  * @param _max Maximum Exposure time
19  * @param _tolerance No new exposure time will be calculated if distance to target value is below this value
20  * @param _currentExp The current exposure time of the camera
21  */
22  ExposureController(int _min, int _max, int _tolerance, int _currentExp) : tolerance(_tolerance), min(_min), max(_max), lastExp(_currentExp) {}
23 
24  /*
25  * Call this method to calculate a new exposure time for your camera.
26  * @param measuredValue The measured brightness of the current frame
27  * @param target The target brightness value for the next frames
28  * @return The new exposure time for the next frames
29  */
30  int update(int measuredValue, int target);
31 };
32 
33 #endif /* end of include guard: EXPOSURECONTROLLER_H */
ExposureController(int _min, int _max, int _tolerance, int _currentExp)
Definition: ExposureController.h:22
Definition: ExposureController.h:9
int update(int measuredValue, int target)
Definition: ExposureController.cpp:20