Definition at line 35 of file LbpEval.h. Referenced by Impala::Core::VideoSet::MakeMap(). 00036 { 00037 int base = 1; 00038 int current = c & base; 00039 int current2; 00040 int changes = 0; 00041 for (int i=1;i<bits;i++) 00042 { 00043 base <<= 1; 00044 current2 = (c & base) >> i; 00045 if (current ^ current2) 00046 changes++; 00047 current = current2; 00048 } 00049 return changes; //(changes <= 2)? 1 : 0; 00050 }
|