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

template<class T>
int Impala::Core::VideoSet::KfrMotionExtractor::ComputeBin ( const T  val,
const T  low,
const T  high,
const int  nrBins 
) const [inline, protected]

Definition at line 1191 of file KfrMotionExtractor.h.

References ILOG_WARN.

Referenced by Impala::Core::VideoSet::KfrDiffExtractor::ComputeHistogram().

01192     {
01193         const int bin = (nrBins * (val - low)) / (high - low);
01194         if (bin >= 0 && bin < nrBins)
01195             return bin;
01196 
01197         if (val == high)
01198             return nrBins - 1;
01199 
01200         ILOG_WARN("Unexpected value: " << val << 
01201             " is not in range [" << low << ", " << high << "]");
01202         return (bin < 0) ? 0 : nrBins-1;
01203     }


Generated on Fri Mar 19 11:30:23 2010 for ImpalaSrc by  doxygen 1.5.1