ehmmobj.cpp

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

CPP
66
字号
#include "EHMMObj.h"

using std::string;

//Standard extension to the user file
static const string EXTENSION = ".ehmm";

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

EHMMObj::EHMMObj( )
{
}

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

EHMMObj::~EHMMObj( )
{
}

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

void EHMMObj::Create( const string &userName, int *noStates, 
					  int *noMix, int vecSize )
{
	assert( _name == "" );

	Obj::Create( userName );

	//Create the ehmm for the object
	_ehmm.Create( noStates, noMix, vecSize );
}

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

void EHMMObj::Load( const string &userName, const string &path )
{
	const string EHMM_FILE = path + userName + EXTENSION;

	assert( _name == "" );

	Obj::Create( userName );

	//Load the ehmm for each of the users
	_ehmm.Load( EHMM_FILE );
}

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

void EHMMObj::Save( const string &path )
{
	const string EHMM_FILE = path + _name + EXTENSION;

	assert( _name != "" );

	//Save the ehmm for the object
	_ehmm.Save( EHMM_FILE );
}

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

EHMM& EHMMObj::GetEHMM( )
{
	return _ehmm;
}

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

⌨️ 快捷键说明

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