00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef HxNgbNormCorrelation_h
00012 #define HxNgbNormCorrelation_h
00013
00014
00028 template <class ArithT, class ResultT>
00029 class HxNgbNormCorrelation
00030 {
00031 public:
00032
00034 typedef HxNgbLoopTag IteratorCategory;
00035
00037 typedef HxNgb2PhaseTag PhaseCategory;
00038
00040 typedef HxNgbTransInVarTag TransVarianceCategory;
00041
00042 HxNgbNormCorrelation(HxTagList& tags);
00043 ~HxNgbNormCorrelation();
00044
00045 HxSizes size();
00046
00047 void init();
00048 void next(int x, int y, ArithT pixV, ArithT maskV);
00049 void init2();
00050 void next2(int x, int y, ArithT pixV, ArithT maskV);
00051
00052 ResultT result();
00053
00055 static HxString className();
00056
00057 private:
00058 int _num;
00059 ResultT _fBar;
00060 ResultT _wBar;
00061 ResultT _sumFW;
00062 ResultT _sumFSqr;
00063 ResultT _sumWSqr;
00064
00065 HxSizes _ngbSize;
00066 };
00067
00068 #ifdef INC_TEMPLATE_SRC
00069 #include "HxNgbNormCorrelation.c"
00070 #endif
00071
00072 #endif