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