utils.cpp

来自「face recognition using hmm. first versio」· C++ 代码 · 共 33 行

CPP
33
字号
#include "Utils.h"
#include <memory.h>

//*****************************************************************************

void CountObs( IplROI &roi, int winWidth, int winHeight, int stepX, int stepY, 
			  int &obsX, int &obsY  )                                       
{                                                                                    
   obsX = ( roi.width - winWidth + stepX ) / stepX;  
   obsY = ( roi.height - winHeight + stepY ) / stepY;
}

//*****************************************************************************

/*
*	Used to suppress the first DCT coefficient
*/
void ExtractDCT( float* src, float* dst, int numVec, int dstLen )
{
    float *tmpSrc = src + 1;
    float *tmpDst = dst;
	int i;

    for( i = 0; i < numVec; i++ )
    {
        memcpy( tmpDst, tmpSrc, dstLen * sizeof( float ) );
        tmpSrc += dstLen + 1;
        tmpDst += dstLen;
    }
} 

//*****************************************************************************

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?