2 * AtmoCalculations.h: see calculations.h of the linux version... one to one copy
3 * calculations.h: calculations needed by the input devices
5 * See the README.txt file for copyright information and how to reach the author(s).
10 #ifndef _AtmoCalculations_h_
11 #define _AtmoCalculations_h_
14 #include "AtmoConfig.h"
16 #define Weight(zone, pixel_nummer) m_Weight[((zone) * (IMAGE_SIZE)) + (pixel_nummer)]
18 class CAtmoColorCalculator
21 CAtmoConfig *m_pAtmoConfig;
23 // Flip instead having a array with (64x48) entries of values for each channel
24 // I have x arrays of 64x48 so each channel has its own array...
25 // (or gradient which is use to judge about the pixels)
30 long int *m_windowed_hue_hist;
31 int *m_most_used_hue_last;
35 long int *m_windowed_sat_hist;
38 long int *m_average_v;
39 int *m_average_counter;
42 int m_LastEdgeWeighting;
43 int m_LastWidescreenMode;
44 int m_LastLayout_TopCount;
45 int m_LastLayout_BottomCount;
46 int m_LastLayout_LRCount;
51 void FindMostUsed(int AtmoSetup_NumZones,int *most_used,long int *windowed_hist);
54 CAtmoColorCalculator(CAtmoConfig *pAtmoConfig);
55 ~CAtmoColorCalculator(void);
57 pColorPacket AnalyzeHSV(tHSVColor *HSV_Img);
59 void UpdateParameters();
63 tHSVColor RGB2HSV(tRGBColor color);
64 tRGBColor HSV2RGB(tHSVColor color);