• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ LTKReturnError函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中LTKReturnError函数的典型用法代码示例。如果您正苦于以下问题:C++ LTKReturnError函数的具体用法?C++ LTKReturnError怎么用?C++ LTKReturnError使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了LTKReturnError函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: LOG

/******************************************************************************
* AUTHOR		: Nidhi sharma
* DATE			: 08-Feb-2007
* NAME			: LTKLipiEngineModule::validateProfile
* DESCRIPTION	: 
* ARGUMENTS		: 
* RETURNS		: 
* NOTES			:
* CHANGE HISTROY
* Author			Date				Description of change
* 
******************************************************************************/
int LTKLipiEngineModule::validateProfile(const string& strProjectName, 
										 const string& strProfileName, 
	 									 const string& projectType, 
										 string& outRecognizerString)
{
	LOG( LTKLogger::LTK_LOGLEVEL_DEBUG) << 
        "Entering: LTKLipiEngineModule::validateProfile()"<<endl;
	
	int errorCode; 
	string profileCfgPath = m_strLipiRootPath + PROJECTS_PATH_STRING + 
						strProjectName + PROFILE_PATH_STRING + strProfileName 
						+ SEPARATOR + PROFILE_CFG_STRING;

	LTKConfigFileReader* profileConfigReader = NULL;
	
	try
	{
		profileConfigReader = new LTKConfigFileReader(profileCfgPath);
	}
	catch(LTKException e)
	{
		LOG( LTKLogger::LTK_LOGLEVEL_ERR) << 
            "Error: "<< getErrorMessage(e.getErrorCode()) << profileCfgPath <<
    		" LTKLipiEngineModule::validateProfile()"<<endl;

		LTKReturnError(e.getErrorCode());
	}

	errorCode = profileConfigReader->getConfigValue(projectType, 
													outRecognizerString);
	
	if(errorCode != SUCCESS)
	{
		/* No recognizer specified. */
		if (projectType == SHAPE_RECOGNIZER_STRING )
		{
			errorCode = ENO_SHAPE_RECOGNIZER;
		}
		else
		{
			errorCode = ENO_WORD_RECOGNIZER;
		}

		LOG( LTKLogger::LTK_LOGLEVEL_ERR) << 
            "Error: "<< getErrorMessage(errorCode) << profileCfgPath <<
    		" LTKLipiEngineModule::validateProfile()"<<endl;
	
		delete profileConfigReader;		

		LTKReturnError(errorCode); 
	}

	delete profileConfigReader;

	LOG( LTKLogger::LTK_LOGLEVEL_DEBUG) << 
        "Exiting: LTKLipiEngineModule::validateProfile()"<<endl;
	
	return SUCCESS;
}
开发者ID:AnXi-TieGuanYin-Tea,项目名称:HandWritingNativeLIbrary,代码行数:71,代码来源:LipiEngineModule.cpp


示例2: LOG

/******************************************************************************
 * AUTHOR		: Nidhi sharma
 * DATE			: 22-02-2007
 * NAME			: getShapeSampleFromInkFile
 * DESCRIPTION	: This method will get the ShapeSample by giving the ink
 *				  file path as input
 * ARGUMENTS	:
 * RETURNS		: SUCCESS
 * NOTES		:
 * CHANGE HISTROY
 * Author			Date				Description
 ******************************************************************************/
int featurefilewriter::getShapeFeatureFromInkFile(const string& inkFilePath,
        vector<LTKShapeFeaturePtr>& shapeFeatureVec)
{

    LOG(LTKLogger::LTK_LOGLEVEL_DEBUG) << "Entering " <<
        "featurefilewriter::getShapeFeatureFromInkFile()" << endl;

    if ( inkFilePath.empty() )
        return FAILURE;

    LTKCaptureDevice captureDevice;
    LTKScreenContext screenContext;

    LTKTraceGroup inTraceGroup, preprocessedTraceGroup;
    inTraceGroup.emptyAllTraces();

    int returnVal = m_shapeRecUtil.readInkFromFile(inkFilePath,
            m_lipiRootPath, inTraceGroup,
            captureDevice, screenContext);

    if (returnVal!= SUCCESS)
    {
        LOG(LTKLogger::LTK_LOGLEVEL_ERR)<<"Error: "<<returnVal<<
            " featurefilewriter::getShapeFeatureFromInkFile()" << endl;
        LTKReturnError(returnVal);
    }

    m_ptrPreproc->setCaptureDevice(captureDevice);
    m_ptrPreproc->setScreenContext(screenContext);

    preprocessedTraceGroup.emptyAllTraces();

    //Preprocessing to be done for the trace group that was read
	int errorCode = preprocess(inTraceGroup, preprocessedTraceGroup);
    if(  errorCode != SUCCESS )
    {
        LOG(LTKLogger::LTK_LOGLEVEL_ERR)<<"Error: "<< errorCode << " " <<
            " featurefilewriter::getShapeFeatureFromInkFile()" << endl;
		LTKReturnError(errorCode);
    }

    errorCode = m_ptrFeatureExtractor->extractFeatures(preprocessedTraceGroup,
            shapeFeatureVec);

    if (errorCode != SUCCESS)
    {
        LOG(LTKLogger::LTK_LOGLEVEL_ERR)<<"Error: "<< errorCode << " " <<
            " featurefilewriter::getShapeFeatureFromInkFile()" << endl;
        LTKReturnError(errorCode);
    }

    LOG(LTKLogger::LTK_LOGLEVEL_DEBUG) << "Exiting " <<
        "featurefilewriter::getShapeFeatureFromInkFile()" << endl;

    return SUCCESS;
}
开发者ID:LouisRenWeiWei,项目名称:Android-Math-Notebook,代码行数:68,代码来源:featurefilewriter.cpp


示例3: LOG

/**********************************************************************************
* AUTHOR		: Deepu V.
* DATE			: 22-AUG-2005
* NAME			: recognize
* DESCRIPTION	: This method reset the recognizer
* ARGUMENTS		: resetParam - This parameter could specify what to reset
* RETURNS		: SUCCESS/FAILURE
* NOTES			:
* CHANGE HISTROY
* Author			Date				Description of
*************************************************************************************/
 int BoxedFieldRecognizer::unloadModelData()
{

	LOG(LTKLogger::LTK_LOGLEVEL_DEBUG)
	    <<"Entering: BoxedFieldRecognizer::unloadModelData"
	    <<endl;

	 //clear the recognition state
	clearRecognizerState();

	int errorCode=FAILURE;

	//unload the model data and
	//delete the shape recognizer
	if( m_shapeRecognizer  && (m_module_deleteShapeRecognizer != NULL) )
	{

	   if((errorCode = m_shapeRecognizer->unloadModelData()) != SUCCESS)
	   {
			LOG(LTKLogger::LTK_LOGLEVEL_ERR)
            	<<"Error: BoxedFieldRecognizer::unloadModelData"<<endl;


		   LTKReturnError(errorCode);
	   }

	   if((errorCode = m_module_deleteShapeRecognizer(m_shapeRecognizer)) != SUCCESS)
	   {
			LOG(LTKLogger::LTK_LOGLEVEL_ERR)
            	<<"Error: BoxedFieldRecognizer::unloadModelData"<<endl;


		   LTKReturnError(errorCode);
	   }

	   m_shapeRecognizer = NULL;
	}

	//Freeing the shape recognition library
	if(m_hAlgoDLLHandle)
	{
		m_OSUtilPtr->unloadSharedLib(m_hAlgoDLLHandle);
		m_hAlgoDLLHandle = NULL;
	}

	LOG(LTKLogger::LTK_LOGLEVEL_DEBUG)
		<<"Exiting: BoxedFieldRecognizer::unloadModelData"
		<<endl;

	return SUCCESS;
}
开发者ID:LouisRenWeiWei,项目名称:Android-Math-Notebook,代码行数:62,代码来源:BoxFieldRecognizer.cpp


示例4: LTKGetDLLFunc

int BCCShapeRecognizer::mapPCAAndHolisticModuleFunctions()
{
	module_createShapeRecognizerPCA = NULL;
	module_createShapeRecognizerPCA = (FN_PTR_CREATESHAPERECOGNIZER) LTKGetDLLFunc(m_hPCA, CREATESHAPERECOGNIZER_FUNC_NAME);
	if(module_createShapeRecognizerPCA == NULL)
	{
		LOG( LTKLogger::LTK_LOGLEVEL_ERR) << 
            "Exported function not found in module : createShapeRecognizer"  << endl;

		//LTKReturnError(EDLL_FUNC_ADDRESS_ERR);
		LTKReturnError(EDLL_FUNC_ADDRESS);
	}

	module_deleteShapeRecognizerPCA = (FN_PTR_DELETESHAPERECOGNIZER) LTKGetDLLFunc(m_hPCA, DELETESHAPERECOGNIZER_FUNC_NAME);
	if(module_deleteShapeRecognizerPCA == NULL)
	{
		LOG( LTKLogger::LTK_LOGLEVEL_ERR) << "Exported function not found in module: deleteShapeRecognizer" << endl;

	//LTKReturnError(EDLL_FUNC_ADDRESS_ERR);
		LTKReturnError(EDLL_FUNC_ADDRESS);
		// ERROR: Unable to link with deleteShapeRecognizer function in module */

	}

	module_createShapeRecognizerHolistic = NULL;
	module_createShapeRecognizerHolistic = (FN_PTR_CREATESHAPERECOGNIZER) LTKGetDLLFunc(m_hHolistic, CREATESHAPERECOGNIZER_FUNC_NAME);
	if(module_createShapeRecognizerHolistic == NULL)
	{
		LOG( LTKLogger::LTK_LOGLEVEL_ERR) << 
            "Exported function not found in module : createShapeRecognizer"  << endl;

		//LTKReturnError(EDLL_FUNC_ADDRESS_ERR);
		LTKReturnError(EDLL_FUNC_ADDRESS);
	}

	module_deleteShapeRecognizerHolistic = (FN_PTR_DELETESHAPERECOGNIZER) LTKGetDLLFunc(m_hHolistic, DELETESHAPERECOGNIZER_FUNC_NAME);
	if(module_deleteShapeRecognizerHolistic == NULL)
	{
		LOG( LTKLogger::LTK_LOGLEVEL_ERR) << 
            "Exported function not found in module : deleteShapeRecognizer"  << endl;

		//LTKReturnError(EDLL_FUNC_ADDRESS_ERR);
		LTKReturnError(EDLL_FUNC_ADDRESS);
		// ERROR: Unable to link with deleteShapeRecognizer function in module */

	}

	return SUCCESS;
}
开发者ID:amitdo,项目名称:Lipitk,代码行数:49,代码来源:BCCShapeRecognizer.cpp


示例5: setLipiLogFileName

/******************************************************************************
* AUTHOR			: Nidhi Sharma 
* DATE				: 07-May-2007
* NAME				: configureLogger
* DESCRIPTION		: Configures the logger
* ARGUMENTS			: None
* RETURNS			: Nothing
* NOTES 				:
* CHANGE HISTROY
* Author            Date                Description of change
******************************************************************************/
int LTKLipiEngineModule::configureLogger()
{
	// No log messages as this function is used to configure logger
    string valueFromCFG = "";
    int errorCode ;
    
	if ( m_LipiEngineConfigEntries != NULL )
	{
		// Read the log file name from lipiengine.cfg
		errorCode = m_LipiEngineConfigEntries->getConfigValue(LOG_FILE_NAME,
															  valueFromCFG);

		if(errorCode ==SUCCESS)
		{
			setLipiLogFileName(valueFromCFG);
		}
        else if (errorCode == EKEY_NOT_FOUND )
        {
			 // Set default log file
        }
		else
		{
			LTKReturnError(ECREATE_LOGGER);
		}

		// Read the log level
		valueFromCFG = "";
		
		errorCode = m_LipiEngineConfigEntries->getConfigValue(LOG_LEVEL, valueFromCFG);

		if(errorCode == SUCCESS)
		{
			setLipiLogLevel(valueFromCFG);
		}
		else if (errorCode == EKEY_NOT_FOUND )
        {
            // Set default log file
        }
		else
		{
			LTKReturnError(ECREATE_LOGGER);
		}
	}

    LTKLoggerUtil::createLogger(m_strLipiRootPath);
    LTKLoggerUtil::configureLogger(m_logFileName, m_logLevel);
    
	return SUCCESS;
}
开发者ID:AnXi-TieGuanYin-Tea,项目名称:HandWritingNativeLIbrary,代码行数:60,代码来源:LipiEngineModule.cpp


示例6: LTKReturnError

/******************************************************************************
* AUTHOR			: Nidhi Sharma 
* DATE				: 07-May-2007
* NAME				: setLipiLogLevel
* DESCRIPTION		: To set the value of m_logLevel
* ARGUMENTS			: String
* RETURNS			: Nothing
* NOTES 				:
* CHANGE HISTROY
* Author            Date                Description of change
******************************************************************************/
int LTKLipiEngineModule::setLipiLogLevel(const string& appLogLevel)
{

	// No log messages as this function is used to configure logger
	string strLogLevel = "";
    
	if ( appLogLevel.length() != 0 )
	{
		strLogLevel= appLogLevel;
	}
	else
	{
		LTKReturnError(EINVALID_LOG_LEVEL); 
	}

	const char * strLogLevelPtr = strLogLevel.c_str();
	// mapping m_LogLevel to Logger log levels

	if(LTKSTRCMP(strLogLevelPtr, LOG_LEVEL_DEBUG) == 0)
	{
		m_logLevel = LTKLogger::LTK_LOGLEVEL_DEBUG;
	}
	else if(LTKSTRCMP(strLogLevelPtr, LOG_LEVEL_ALL) == 0)
	{
		m_logLevel = LTKLogger::LTK_LOGLEVEL_ALL;
	}
	else if(LTKSTRCMP(strLogLevelPtr, LOG_LEVEL_VERBOSE) == 0)
	{
		m_logLevel = LTKLogger::LTK_LOGLEVEL_VERBOSE;
	}
	else if(LTKSTRCMP(strLogLevelPtr, LOG_LEVEL_ERROR) == 0)
	{
		m_logLevel = LTKLogger::LTK_LOGLEVEL_ERR;
	}
	else if(LTKSTRCMP(strLogLevelPtr, LOG_LEVEL_OFF) == 0)
	{
		m_logLevel = LTKLogger::LTK_LOGLEVEL_OFF;
	}
	else if(LTKSTRCMP(strLogLevelPtr, LOG_LEVEL_INFO) == 0)
	{
		m_logLevel = LTKLogger::LTK_LOGLEVEL_INFO;
	}
	else
	{
		LTKReturnError(EINVALID_LOG_LEVEL); 
	}

	return SUCCESS;
}
开发者ID:AnXi-TieGuanYin-Tea,项目名称:HandWritingNativeLIbrary,代码行数:60,代码来源:LipiEngineModule.cpp


示例7: LTKReturnError

/*****************************************************************************
* AUTHOR		: Nidhi Sharma
* DATE			: 
* NAME			: getAddressLoggerFunctions
* DESCRIPTION	: 
* ARGUMENTS		: 
* RETURNS		: 
* NOTES			:
* CHANGE HISTROY
* Author			Date				Description of change
*****************************************************************************/
int LTKLoggerUtil::getAddressLoggerFunctions()
{
    void* functionHandle = NULL; 
    int returnVal = SUCCESS;


    //start log


    if (module_startLogger == NULL )
    {
        returnVal = m_ptrOSUtil->getFunctionAddress(m_libHandleLogger,
                                                    "startLogger", 
                                                    &functionHandle);

        if(returnVal != SUCCESS)
    	{
    	    LTKReturnError(returnVal);
    	}

        module_startLogger = (FN_PTR_STARTLOG)functionHandle;

    	functionHandle = NULL;
    }

    module_startLogger();

    // map Log message
    if (module_logMessage == NULL)
    {
        returnVal = m_ptrOSUtil->getFunctionAddress(m_libHandleLogger,
                                                    "logMessage", 
                                                    &functionHandle);

        if(returnVal != SUCCESS)
    	{
    	    LTKReturnError(returnVal);
    	}

        module_logMessage = (FN_PTR_LOGMESSAGE)functionHandle;

    	functionHandle = NULL;    
    
    }
    
	
	return SUCCESS;
	
}
开发者ID:LouisRenWeiWei,项目名称:Android-Math-Notebook,代码行数:60,代码来源:LTKLoggerUtil.cpp


示例8: LOG

int NPenShapeFeatureExtractor::readConfig(const string& cfgFilePath)
{
    LOG(LTKLogger::LTK_LOGLEVEL_DEBUG) << "Entering " <<
        "NPenShapeFeatureExtractor::readConfig()" << endl;
    
	LTKConfigFileReader* configurableProperties = NULL;
    string tempStringVar = "";

	try
    {
        configurableProperties = new LTKConfigFileReader(cfgFilePath);
        
		int errorCode = configurableProperties->getConfigValue(NPEN_WINDOW_SIZE, tempStringVar);
		
		if( errorCode == SUCCESS)
        {
            if (setWindowSize(atoi((tempStringVar).c_str())) != SUCCESS)
            {
                LOG(LTKLogger::LTK_LOGLEVEL_ERR) << "Error: " << 
                    ECONFIG_FILE_RANGE << " : " << 
                    getErrorMessage(ECONFIG_FILE_RANGE) <<
                    " NPenShapeFeatureExtractor::readConfig" <<endl;
                
                throw LTKReturnError(ECONFIG_FILE_RANGE);
            }
        }
	}

	catch(LTKException e)
    {
        delete configurableProperties;

        int eCode = e.getErrorCode();
        
        LOG(LTKLogger::LTK_LOGLEVEL_ERR) << "Error: " << eCode << 
            " : " << getErrorMessage(eCode) <<
            " NPenShapeFeatureExtractor::readConfig" <<endl;
        
        LTKReturnError(eCode);
    }
	delete configurableProperties;

    LOG(LTKLogger::LTK_LOGLEVEL_DEBUG) << "Exiting " <<
        "NPenShapeFeatureExtractor::readConfig()" << endl;
    
	return SUCCESS;

}
开发者ID:amitdo,项目名称:Lipitk,代码行数:48,代码来源:NPenShapeFeatureExtractor.cpp


示例9: LOG

int LTKStrEncoding::tamilCharToUnicode(const unsigned short& shapeID,  vector<unsigned short>& unicodeString)
{

	LOG( LTKLogger::LTK_LOGLEVEL_DEBUG) << 
	  " Entering: LTKStrEncoding::tamilCharToUnicode()" << endl;


		if(shapeID < 35)
		{
			if(shapeID == 34)
			{
				unicodeString.push_back(0x0b95);
				unicodeString.push_back(0x0bcd);
				unicodeString.push_back(0x0bb7);
			}
			else
			{
				unicodeString.push_back(tamilIsoCharMap[shapeID]);
			}
		}
		else
		{
			LOG(LTKLogger::LTK_LOGLEVEL_ERR)
                  <<"Error : "<< EINVALID_SHAPEID <<":"<< getErrorMessage(EINVALID_SHAPEID)
                  <<"LTKStrEncoding::tamilCharToUnicode()" <<endl;

			LTKReturnError(EINVALID_SHAPEID);
		}
		LOG( LTKLogger::LTK_LOGLEVEL_DEBUG) << 
		  " Exiting: LTKStrEncoding::tamilCharToUnicode()" << endl;

	return SUCCESS;
}
开发者ID:AnXi-TieGuanYin-Tea,项目名称:HandWritingNativeLIbrary,代码行数:33,代码来源:LTKStrEncoding.cpp


示例10: LOG

int PointFloatShapeFeatureExtractor::readConfig(const string& cfgFilePath)
{
    LOG( LTKLogger::LTK_LOGLEVEL_DEBUG) << "Entering " <<
        "PointFloatShapeFeatureExtractor::readConfig()" << endl;
    
	LTKConfigFileReader* configurableProperties = NULL;
	string tempStringVar = "";

	try
	{
		configurableProperties = new LTKConfigFileReader(cfgFilePath);
	}

	catch(LTKException e)
	{
		delete configurableProperties;

        int eCode = e.getErrorCode();

        LOG( LTKLogger::LTK_LOGLEVEL_ERR) << "Error: " << eCode << 
            " : " << getErrorMessage(eCode) <<
            " PointFloatShapeFeatureExtractor::readConfig" <<endl;
        
		LTKReturnError(eCode);
	}
    
	delete configurableProperties;

    LOG( LTKLogger::LTK_LOGLEVEL_DEBUG) << "Exiting " <<
        "PointFloatShapeFeatureExtractor::readConfig()" << endl;
	return SUCCESS;

}
开发者ID:amitdo,项目名称:Lipitk,代码行数:33,代码来源:PointFloatShapeFeatureExtractor.cpp


示例11: LOG

/**
* This function is used to reset the different components of recognition context
* @param resetParam : parameter that identifies the component to be reset
* @return SUCCESS/FAILURE
*/
int LTKRecognitionContext::reset (int resetParam) 
{
	LOG( LTKLogger::LTK_LOGLEVEL_DEBUG) << 
        " Entering: LTKRecognitionContext::reset()" << endl;

	if(resetParam & LTK_RST_INK)
    {
	   m_fieldInk.clear();
    }

	if(resetParam & LTK_RST_RECOGNIZER)
	{
		int errorCode=0;
		
		if((errorCode=m_wordRecPtr->reset(resetParam))!=SUCCESS)
		{
			LOG(LTKLogger::LTK_LOGLEVEL_ERR)
		        <<"Error: LTKRecognitionContext::reset()"<<endl;

			LTKReturnError(errorCode);
		}
	}

	LOG( LTKLogger::LTK_LOGLEVEL_DEBUG) << 
        " Exiting: LTKRecognitionContext::reset()" << endl;
 
	return SUCCESS;
}
开发者ID:LouisRenWeiWei,项目名称:Android-Math-Notebook,代码行数:33,代码来源:LTKRecognitionContext.cpp


示例12: LTKReturnError

/**********************************************************************************
* AUTHOR		: Nidhi Sharma
* DATE			: 11-Dec-2007
* NAME			: getFeatureExtractorInst
* DESCRIPTION	: 
* ARGUMENTS		:
* RETURNS		: 
* NOTES			:
* CHANGE HISTROY
* Author			Date				Description of LTKFeatureExtractor
*************************************************************************************/
int LTKShapeFeatureExtractorFactory::getFeatureExtractorInst(
                                 const string& lipiRootPath,
                                 const string& feName,
                                 void** m_libHandlerFE,
                                 const LTKControlInfo& controlInfo,
                                 LTKShapeFeatureExtractor** outFeatureExtractor)
{
	FN_PTR_CREATE_SHAPE_FEATURE_EXTRACTOR createFeatureExtractorPtr;
    void *functionHandle = NULL;

    LTKOSUtil* utilPtr = LTKOSUtilFactory::getInstance();

    int returnVal = utilPtr->loadSharedLib(lipiRootPath, feName, m_libHandlerFE);

    
	if(returnVal != SUCCESS)
	{
	    LTKReturnError(ELOAD_FEATEXT_DLL);
	}

    returnVal = utilPtr->getFunctionAddress(*m_libHandlerFE, 
                                            CREATE_SHAPE_FEATURE_EXTRACTOR, 
                                            &functionHandle);

	if(returnVal != SUCCESS)
	{
	    utilPtr->unloadSharedLib(m_libHandlerFE);
        *m_libHandlerFE = NULL;

		LTKReturnError(EDLL_FUNC_ADDRESS_CREATE_FEATEXT);
	}

    createFeatureExtractorPtr = (FN_PTR_CREATE_SHAPE_FEATURE_EXTRACTOR)functionHandle;

    int errorCode = createFeatureExtractorPtr(controlInfo, outFeatureExtractor);

    if (errorCode != SUCCESS)
    {
		LTKReturnError(errorCode);
    }

    delete utilPtr;
	return SUCCESS;

}
开发者ID:gotomypc,项目名称:lipi-core-toolkit-3,代码行数:56,代码来源:LTKShapeFeatureExtractorFactory.cpp


示例13: LOG

int HolisticRecognizer::initialize(string& strProjectName, string &strProfileName)
{
	LOG( LTKLogger::LTK_LOGLEVEL_DEBUG) << 
        "Entered HolisticShapeRecognizer::Initialize" << endl;

	string LipiRootPath = string(getLipiPath());	
	string tempStr = "";
    string preprocDllPath = "";
	headerInfo[PROJNAME] = strProjectName;
	int returnStatus=0;
	string strNumShapes = "";

	ltkShapeRecPtr = NULL;	

	//path for holistic.cfg
	m_holisticCfgFile = LipiRootPath + PROJECTS_PATH_STRING + strProjectName + PROFILE_PATH_STRING + strProfileName + SEPARATOR + HOLISTIC + CONFIGFILEEXT;

	//path for holistic.mdt
	m_referenceModelFile = LipiRootPath + PROJECTS_PATH_STRING + strProjectName + PROFILE_PATH_STRING + strProfileName + SEPARATOR + HOLISTIC + DATFILEEXT;

	m_confMapFile = LipiRootPath + PROJECTS_PATH_STRING + strProjectName + PROFILE_PATH_STRING + strProfileName + SEPARATOR;
                
	// Read number of shapes from project.cfg
	tempStr = LipiRootPath + PROJECTS_PATH_STRING + strProjectName + PROFILE_PATH_STRING + PROJECT_CFG_STRING;
	try
	{
		//To find whether the project was dynamic or not
		//to read read number of shapes from project.cfg
		m_projectTypeDynamic = shaperecUtilInst->isProjectDynamic(tempStr, m_numShapes, returnStatus, strNumShapes);
		
		headerInfo[NUMSHAPES] = strNumShapes;
		
		preprocDllPath = LipiRootPath + SEPARATOR + "lib" + SEPARATOR + PREPROC + DLL_EXT;

		// initialize preprocessor
		returnStatus = 0;
		ltkShapeRecPtr = shaperecUtilInst->initializePreprocessor(preprocDllPath,
						returnStatus);

	}
	
	catch(LTKException e)
	{
		LOG( LTKLogger::LTK_LOGLEVEL_ERR) << e.getExceptionMessage() << endl;
		LTKReturnError(returnStatus);
	}
	
	//setPreprocMap(); // To add function name and the function address into the mapping variable.

	//Assigning Default Values
	assignDefaultValues();

	//Reading pca configuration file
	returnStatus = readClassifierConfig();

	return returnStatus;
}
开发者ID:amitdo,项目名称:Lipitk,代码行数:57,代码来源:HolisticRecognizer.cpp


示例14: LOG

/***********************************************************************
* AUTHOR		: Nidhi Sharma
* DATE			: 07-FEB-2007
* NAME			: createFeatureExtractor
* DESCRIPTION	: create method of a factory class
* ARGUMENTS		:
* RETURNS		: Pointer to the instance of LTKShapeFeatureExtractor
* NOTES			:
* CHANGE HISTROY
* Author			Date				Description of LTKFeatureExtractor
******************************************************************************/
int LTKShapeFeatureExtractorFactory::createFeatureExtractor(
                                const string& featureExtractorName,
                                const string& lipiRootPath,
                                void** m_libHandlerFE, 
                                const LTKControlInfo& controlInfo,
                                LTKShapeFeatureExtractor** outFeatureExtractor)
{
    LOG(LTKLogger::LTK_LOGLEVEL_DEBUG) << "Entering " << 
        "LTKShapeFeatureExtractorFactory::createFeatureExtractor()" << endl;
    
    string feName = "";
    
	int errorCode = mapFeatureExtractor(featureExtractorName, feName);

    if (errorCode != SUCCESS)
    {
        LOG( LTKLogger::LTK_LOGLEVEL_ERR)
           << getErrorMessage(errorCode)  
           << "LTKShapeFeatureExtractorFactory::createFeatureExtractor:"
           << endl;
        
        LTKReturnError(errorCode);
    }
        
    errorCode = getFeatureExtractorInst(lipiRootPath, feName, m_libHandlerFE, 
			                            controlInfo, outFeatureExtractor);

    if ( errorCode != SUCCESS)
    {
        LOG( LTKLogger::LTK_LOGLEVEL_ERR)
           << getErrorMessage(errorCode) << ":" << feName 
           << "LTKShapeFeatureExtractorFactory::createFeatureExtractor:"
           << endl;
        
        LTKReturnError(errorCode);
    }

    LOG(LTKLogger::LTK_LOGLEVEL_DEBUG) << "Exiting " << 
        "LTKShapeFeatureExtractorFactory::createFeatureExtractor()" << endl;
    
    return SUCCESS;
}
开发者ID:gotomypc,项目名称:lipi-core-toolkit-3,代码行数:53,代码来源:LTKShapeFeatureExtractorFactory.cpp


示例15: createShapeRecognizer

int createShapeRecognizer(const LTKControlInfo& controlInfo,
						  LTKShapeRecognizer** ptrObj )
{
	try
	{
		*ptrObj = new ActiveDTWShapeRecognizer(controlInfo);
		return SUCCESS;
	}
	catch(LTKException e)
	{
		LTKReturnError(e.getErrorCode());
	}
}
开发者ID:LouisRenWeiWei,项目名称:Android-Math-Notebook,代码行数:13,代码来源:ActiveDTW.cpp



注:本文中的LTKReturnError函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ LTRACEF函数代码示例发布时间:2022-05-30
下一篇:
C++ LTIMING函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap