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

void Impala::Core::Tracking::Classifier::MeanFromSamples ( Array::Array2dScalarReal64 *&  mean,
const Array::Array2dScalarReal64 samples 
) [inline, private]

Todo:
should move to Core/Matrix

Definition at line 267 of file Classifier.h.

References Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CH(), Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CPB(), and Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CW().

Referenced by SetBackground(), and UpdateBackGroundModel().

00269     {
00270         double* dst = mean->CPB();
00271         int i;
00272         for(i=0 ; i<samples->CW() ; i++)
00273             dst[i] = 0;
00274         for(i=0 ; i<samples->CH() ; i++)
00275         {
00276             const double* src = samples->CPB(0, i);
00277             for(int j=0 ; j<samples->CW() ; j++)
00278                 dst[j] += src[j];
00279         }
00280         for(i=0 ; i<samples->CW() ; i++)
00281             dst[i] /= samples->CH();
00282     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:21:02 2011 for ImpalaSrc by  doxygen 1.5.1