• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

include/FCam/N900/Flash.h

Go to the documentation of this file.
00001 #ifndef FCAM_N900_FLASH_H
00002 #define FCAM_N900_FLASH_H
00003 
00007 #include "../Flash.h"
00008 #include "../CircularBuffer.h"
00009 #include "../Time.h"
00010 #include <vector>
00011 
00012 namespace FCam { 
00013     namespace N900 {
00014 
00027         class Flash : public FCam::Flash {
00028           public:
00029             Flash();
00030             ~Flash();
00031 
00034             int minDuration() {return 55600;}
00035 
00037             int maxDuration() {return 492400;}
00038         
00048             float minBrightness() {return 2.0f;}
00049 
00052             float maxBrightness() {return 19.0f;}
00053 
00054             /* fire the flash for a given brightness and duration. The
00055              * brightness and duration will be clamped to the values
00056              * specified above. */
00057             void fire(float brightness, int duration);
00058 
00062             int fireLatency() {return 3450;}            
00063 
00068             float getBrightness(Time);
00069 
00072             void tagFrame(FCam::Frame);
00073 
00074           private:
00075 
00076             void setDuration(int);
00077             void setBrightness(float);
00078 
00079             struct FlashState {
00080                 // Assume the flash state is piecewise constant. This
00081                 // struct indicates a period of a constant brightness
00082                 // starting at the given time.
00083                 Time time;
00084                 float brightness;
00085             };
00086             
00087             CircularBuffer<FlashState> flashHistory; 
00088         };
00089     }
00090 }
00091 
00092 
00093 #endif

Generated on Mon Aug 16 2010 14:25:45 for FCam by  doxygen 1.7.1