template<class T>
Definition at line 96 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(). 00097 { 00098 const int bin = (nrBins * (val - low)) / (high - low); 00099 if (bin >= 0 && bin < nrBins) 00100 return bin; 00101 00102 if (val == high) 00103 return nrBins - 1; 00104 00105 ILOG_WARN("Unexpected value: " << val << 00106 " is not in range [" << low << ", " << high << "]"); 00107 return (bin < 0) ? 0 : nrBins-1; 00108 }
|