template<class T>
Definition at line 94 of file HistogramExtractor.h. References ILOG_WARN. Referenced by Impala::Core::VideoSet::RgbHistExtractor::ComputeHistogram(), Impala::Core::VideoSet::LabHistExtractor::ComputeHistogram(), and Impala::Core::VideoSet::LabHist3dExtractor::ComputeHistogram(). 00095 { 00096 const int bin = (nrBins * (val - low)) / (high - low); 00097 if (bin >= 0 && bin < nrBins) 00098 return bin; 00099 00100 if (val == high) 00101 return nrBins - 1; 00102 00103 ILOG_WARN("Unexpected value: " << val << 00104 " is not in range [" << low << ", " << high << "]"); 00105 return (bin < 0) ? 0 : nrBins-1; 00106 }
|