AtmoCalculations.h

Go to the documentation of this file.
00001 /*
00002  * AtmoCalculations.h: see calculations.h of the linux version... one to one copy
00003  * calculations.h: calculations needed by the input devices
00004  *
00005  * See the README.txt file for copyright information and how to reach the author(s).
00006  *
00007  * $Id: a8b97f05503025908219552ee5648b04913e1992 $
00008  */
00009 
00010 #ifndef _AtmoCalculations_h_
00011 #define _AtmoCalculations_h_
00012 
00013 #include "AtmoDefs.h"
00014 #include "AtmoConfig.h"
00015 
00016 #define Weight(zone, pixel_nummer) m_Weight[((zone) * (IMAGE_SIZE)) + (pixel_nummer)]
00017 
00018 class CAtmoColorCalculator
00019 {
00020 protected:
00021    CAtmoConfig *m_pAtmoConfig;
00022 
00023   // Flip instead having a array with (64x48) entries of values for each channel
00024   // I have x arrays of 64x48 so each channel has its own array...
00025   // (or gradient which is use to judge about the pixels)
00026   int *m_Weight;
00027   int **m_Zone_Weights;
00028 
00029   long int *m_hue_hist;
00030   long int *m_windowed_hue_hist;
00031   int *m_most_used_hue_last;
00032   int *m_most_used_hue;
00033 
00034   long int *m_sat_hist;
00035   long int *m_windowed_sat_hist;
00036   int *m_most_used_sat;
00037 
00038   long int *m_average_v;
00039   int *m_average_counter;
00040 
00041 protected:
00042   int m_LastEdgeWeighting;
00043   int m_LastWidescreenMode;
00044   int m_LastLayout_TopCount;
00045   int m_LastLayout_BottomCount;
00046   int m_LastLayout_LRCount;
00047   int m_LastNumZones;
00048 
00049 
00050 protected:
00051     void FindMostUsed(int AtmoSetup_NumZones,int *most_used,long int *windowed_hist);
00052 
00053 public:
00054     CAtmoColorCalculator(CAtmoConfig *pAtmoConfig);
00055     ~CAtmoColorCalculator(void);
00056 
00057     pColorPacket AnalyzeHSV(tHSVColor *HSV_Img);
00058 
00059     void UpdateParameters();
00060 };
00061 
00062 
00063 tHSVColor RGB2HSV(tRGBColor color);
00064 tRGBColor HSV2RGB(tHSVColor color);
00065 
00066 #endif

Generated on Tue May 25 08:04:59 2010 for VLC by  doxygen 1.5.6