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

template<class ElemT>
void Impala::Core::Histogram::Histogram1dTem< ElemT >::Normalize (  )  [inline]

Definition at line 123 of file Histogram1dTem.h.

References Impala::Core::Histogram::Histogram1dTem< ElemT >::mOutliers, Impala::Core::Vector::VectorTem< ElemT >::Size(), and Impala::Core::Histogram::Histogram1dTem< ElemT >::TotalWeight().

Referenced by Impala::Core::VideoSet::LbpEval::HandleNewFrame(), and Impala::Core::VideoSet::ShotSegmenter::UpdateHistograms().

00124     {
00125         ElemT tot = TotalWeight();
00126         /* fix for NaN when normalizing an empty histogram */
00127         if(abs(tot) < 0.0000001) tot = 1;
00128         for(int i=0 ; i<this->Size() ; i++)
00129             this->Elem(i) /= tot;
00130             
00131         if(*mOutliers != 0){
00132                 *mOutliers = *mOutliers / tot;
00133         }
00134     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:12:29 2010 for ImpalaSrc by  doxygen 1.5.1