Home || Visual Search || Applications || Architecture || 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 1198 of file KfrMotionExtractor.h.

References ILOG_WARN.

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

01199     {
01200         const int bin = (nrBins * (val - low)) / (high - low);
01201         if (bin >= 0 && bin < nrBins)
01202             return bin;
01203 
01204         if (val == high)
01205             return nrBins - 1;
01206 
01207         ILOG_WARN("Unexpected value: " << val << 
01208             " is not in range [" << low << ", " << high << "]");
01209         return (bin < 0) ? 0 : nrBins-1;
01210     }


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