Go to the documentation of this file.00001
00026 #ifndef _GET_HAMMING_DISTANCE_H_
00027 #define _GET_HAMMING_DISTANCE_H_
00028
00029 #include "MatchingTemplate.h"
00030
00037 class GetHammingDistance
00038 {
00039 public:
00040 GetHammingDistance();
00041 virtual ~GetHammingDistance();
00042
00053 double computeHDX(const MatchingTemplate*,
00054 const MatchingTemplate*,
00055 int);
00066 double computeHDY(const MatchingTemplate*,
00067 const MatchingTemplate*,
00068 int);
00069
00080 double computeHDXorY(const MatchingTemplate*,
00081 const MatchingTemplate*,
00082 int);
00083
00094 double computeHDXandY(const MatchingTemplate*,
00095 const MatchingTemplate*,
00096 int);
00097
00098 private:
00099
00100 int width;
00101 int height;
00102 int maxShiftX;
00103 int maxShiftY;
00104
00105 int *template1s;
00106 int *mask1s;
00107 int *template2s;
00108 int *mask2s;
00109
00110 int *mask;
00111 int *C;
00112
00119 void initializeTemplates(const MatchingTemplate*,
00120 const MatchingTemplate*);
00121
00134 double calcHD(int* tTemplate, int* tMask, int* qTemplate, int* qMask,
00135 int* newTemplate, int* newMask);
00136
00151 void X_Shiftbits(int *templates, int width, int height,
00152 int noshifts, int nscales, int *templatenew);
00153
00167 void Y_Shiftbits(int *templates, int width, int height,
00168 int noshifts,int nscales, int *templatenew);
00169
00170 };
00171
00172 #endif // !_GET_HAMMING_DISTANCE_H_