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

void Impala::Core::Feature::Color64::NormalizeVector ( float *  pf,
int  nLen 
) [inline]

Definition at line 481 of file Color64.h.

Referenced by ExtractCorrelogram50(), ExtractCorrelogramTextureMoment(), and ExtractTextureMoment().

00482     {
00483         if (pf != NULL && nLen > 0)
00484         {
00485             float f = 0;
00486                     for (int i = 0; i < nLen; i ++)
00487             {
00488                 f += pf[i] * pf[i];
00489             }
00490             f = sqrt(f);
00491             if (f < 1e-4f)
00492             {
00493                 f = 1e-4f;
00494             }
00495             for (int i = 0; i < nLen; i ++)
00496             {
00497                 pf[i] /= (float)f;
00498             }
00499         }
00500     }


Generated on Thu Jan 13 09:19:07 2011 for ImpalaSrc by  doxygen 1.5.1