Definition at line 835 of file KfrMotionExtractor.h. References m_EnergyMap, m_TPLMax, m_TPLMean, m_TPLMin, m_Weight, max, min, and Normalization(). Referenced by ComputeEnergy(). 00836 { 00837 double Energy = 0; 00838 for (int i = 0; i < bWidth * bHeight; i ++) 00839 Energy += m_EnergyMap[i] * m_Weight[indexOfTPL][i]; 00840 00841 if (bNormalized){ 00842 //normalize the energy between [0,1] 00843 double min = m_TPLMin[indexOfTPL]*bWidth*bHeight; 00844 double max = m_TPLMax[indexOfTPL]*bWidth*bHeight; 00845 Energy = Normalization(Energy,min,max); 00846 00847 } else { 00848 // Note: this case is OK only if all the video files are with the same size. 00849 // Or, videos with different (bWidth,bHeight)s can NOT be compared each other. 00850 // 00851 // only adjust according to the mean of the template 00852 Energy = Energy - m_TPLMean[indexOfTPL]; 00853 } 00854 return Energy; 00855 }
Here is the call graph for this function:
|