Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

void Impala::Core::Feature::Color64::ExtractCorrelogram50 ( BYTE *  pbImage,
int  nWidth,
int  nHeight,
float *  pfFeature 
) [inline]

Definition at line 355 of file Color64.h.

References BYTE, and NormalizeVector().

Referenced by ExtractCorrelogramTextureMoment().

00356     {
00357         float afHistogram[50], afCorrelogram[50];
00358         memset(afHistogram, 0, sizeof(afHistogram));
00359         memset(afCorrelogram, 0, sizeof(afCorrelogram));
00360 
00361         for (int y = 1; y < nHeight - 1; y ++)
00362         {
00363             BYTE* pbCurr = pbImage + y * nWidth;
00364             BYTE* pbPrev = pbCurr - nWidth;
00365             BYTE* pbNext = pbCurr + nWidth;
00366 
00367             for (int x = 1; x < nWidth - 1; x ++)
00368             {
00369                 // Note: nIndex = [0,43]
00370                 int nIndex = pbCurr[x];
00371                 int nCount = (pbPrev[x - 1] == nIndex) + (pbPrev[x] == nIndex) + (pbPrev[x + 1] == nIndex)
00372                            + (pbCurr[x - 1] == nIndex) + (pbCurr[x + 1] == nIndex)
00373                            + (pbNext[x - 1] == nIndex) + (pbNext[x] == nIndex) + (pbNext[x + 1] == nIndex);
00374                 afHistogram[nIndex] ++;
00375                 afCorrelogram[nIndex] += nCount;
00376             }
00377         }
00378 
00379         for (int i = 0; i < 50; i ++)
00380         {
00381             if (afHistogram[i] > 0)
00382             {
00383                 pfFeature[i] = afCorrelogram[i] / afHistogram[i];
00384             }
00385         }
00386         NormalizeVector(pfFeature, 50);
00387     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:08:44 2010 for ImpalaSrc by  doxygen 1.5.1