00001 /** 00002 * @file LightingChangeTester.h 00003 * Declaration of class LightingChangeTester. 00004 * 00005 * @author <A href=mailto:juengel@informatik.hu-berlin.de>Matthias Jüngel</A> 00006 */ 00007 00008 #include "Tools/RingBufferWithSum.h" 00009 00010 #ifndef _LightingChangeTester_h_ 00011 #define _LightingChangeTester_h_ 00012 00013 /** 00014 * @class LightingChangeTester 00015 * 00016 * The LightingChangeTester checks if the lighting has changed. 00017 * To know this can be important for a color calibration system. 00018 * The calibration system has to extract green pixels from the image. 00019 * Each such pixel must be added using the method addColor. 00020 * If a new image is processed startImage has to be called. 00021 * The method lightingHasChanged returns true, if the lighting has changed. 00022 * 00023 * 00024 * @author <A href=mailto:juengel@informatik.hu-berlin.de>Matthias Jüngel</A> 00025 */ 00026 00027 class LightingChangeTester 00028 { 00029 public: 00030 /** Constructor */ 00031 LightingChangeTester(); 00032 00033 /** Destructor */ 00034 ~LightingChangeTester(); 00035 00036 void init(); 00037 void startImage(); 00038 void addColor(int channel1, int channel2, int channel3); 00039 bool lightingHasChanged(); 00040 00041 private: 00042 int numberOfImages; 00043 int numberOfMeasurementsInImage; 00044 int accumulatedValueInImage[3]; 00045 00046 RingBufferWithSum<10> valuesOfLastImages[3]; 00047 }; 00048 00049 #endif // _LightingChangeTester_h_ 00050 00051 /* 00052 * Change log : 00053 * 00054 * $Log: LightingChangeTester.h,v $ 00055 * Revision 1.1.1.1 2004/05/22 17:19:51 cvsadm 00056 * created new repository GT2004_WM 00057 * 00058 * Revision 1.2 2003/12/04 17:35:24 juengel 00059 * comment added 00060 * 00061 * Revision 1.1 2003/12/01 16:16:54 juengel 00062 * Added lighting change tester. 00063 * 00064 */