⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 str.cpp

📁 face recognition test source code
💻 CPP
字号:
#include "stdafx.h"

/* Useful strings */
char chr_RT1										= '\n';
char chr_RT2										= '\r';
char chr_BTAG										= '[';
char str_BTAG[]									= "[";
char chr_PROJ_COMMENT							= ';';
char str_RET[]										= "\n\r";
char str_TABRT[]									= "\t\n\r";
char str_END[]										= "END]";
char str_DIR[]										= ":";
char chr_DIR										= ':';
char str_EXT_TXT[]								= ".txt";
char str_SAVE_NUM[]								= "%ld char. saved";

/* face file strings */
char str_ERR_FILE_OPEN[]						= "Cannot open the file : %s";
char str_ERR_FILE_READ[]						= "Cannot read the file : %s";
char str_ERR_FILE_WRITE[]						= "Writing problem: only %ld characters written on %ld";
char str_ERR_FILE_READPROB[]					= "File read problem : read %ld characters instead of %ld";
char str_ERR_FILE_LOCATE[]						= "Cannot locate the file %s";
char str_ERR_FILE_EXT[]							= "This file has not the extension PPM or PGM, cannot recognise its format";
char str_ERR_FILE_CLOSE[]						= "Could not close the file : %s";
char str_ERR_ASCIIBIN[]							= "Neither ASCII or Binary graphics file format, cannot load the file";
char str_ERR_FILE_UNEXPECTEDEOF[]			= "Unexpected end of file found, cannot open the file";
char str_ERR_NOT255[]							= "The largest grey level must be 255, it is not, cannot open the file";
char str_LOADED[]									= "Loaded";
char str_LOADING[]								= "Loading : %s";
char str_SAVING[]									= "Saving : %s";
char str_SAVED[]									= "Saved";

/* face database */
char str_ERR_DIMENSION[]						= "The face %s has not the same dimensions as the first face (reference face) : it has (%ld, %ld) instead of (%ld, %ld). The face has been deleted from the data base";

/* project file strings */
char str_TRAINING[]								= "[TRAINING";
char str_RECONSTRUCTION[]						= "[RECONSTRUCTION]";
char str_RECOGNIZE[]								= "[RECOGNIZE]";
char str_MEET[]									= "[MEET]";
char str_LOAD_EIGEN[]							= ".LOAD EIGENVECT";
char str_SAVE_EIGEN_DB[]						= ".SAVE EIGENFACE";
char str_SAVE_EIGEN[]							= ".SAVE EIGENVECT";
char str_SAVE_CMP_MEET[]						= ".SAVE MEET";
char str_SAVE_CMP_RECONSTRUCTION[]			= ".SAVE RECONSTRUCT";
char str_SAVE_CMP_RECOGNIZE[]						= ".SAVE RECOGNIZE";
char str_SAVE_REPORT[]								= ".SAVE REPORT";
char str_EVAL_FILENAME[]							= "EVal";
char str_PROJECT_LOADING[]							= "Loading project file : %s";
char str_PROJECT_TRAINING[]							= "Loading Training Set";
char str_PROJECT_TRAINING_DONE[]					= "Training Set Loaded (%ld Faces)";
char str_PROJECT_RECONSTRUCTION[]					= "Loading Reconstruction Set";
char str_PROJECT_RECONSTRUCTION_DONE[]				= "Reconstruction Set Loaded (%ld Faces)";
char str_PROJECT_RECOGNIZE[]						= "Loading Faces to be recognized";
char str_PROJECT_RECOGNIZE_DONE[]					= "Recognition Set Loaded (%ld Faces)";
char str_PROJECT_MEET[]								= "Meeting some new faces";
char str_PROJECT_MEET_DONE[]						= "Meeting Set Loaded (%ld Faces)";
char str_PROJECT_LOAD_EIGEN[]						= "Load the Eigenvectors";
char str_PROJECT_LOAD_EIGEN_DONE[]					= "%ld Eigenvectors loaded";
char str_PROJECT_SAVE_EIGEN_DB[]					= "Save the EigenFaces";
char str_PROJECT_SAVE_EIGEN_DB_DONE[]				= "%ld EigenFaces saved";
char str_PROJECT_SAVE_EIGEN[]						= "Save the EigenVectors";
char str_PROJECT_SAVE_EIGEN_DONE[]					= "%ld EigenVectors saved";
char str_PROJECT_SAVE_REPORT[]						= "Save the Report";
char str_PROJECT_SAVE_REPORT_DONE[]					= "Report saved";
char str_PROJECT_SAVE_CMP_MEET[]					= "Save the meeting faces' composants";
char str_PROJECT_SAVE_CMP_MEET_DONE[]				= "Meeting faces' composantssaved";
char str_PROJECT_SAVE_CMP_RECONSTRUCTION[]			= "Save the composants of the faces to reconstruct";
char str_PROJECT_SAVE_CMP_RECONSTRUCTION_DONE[]		= "Recontruction's composants saved";
char str_PROJECT_SAVE_CMP_RECOGNITION[]				= "Save the composants of the faces to recognize";
char str_PROJECT_SAVE_CMP_RECOGNITION_DONE[]		= "Recognition's composants saved";
char str_ALREADY_LOAD_EIGEN[]						= "Inconcistency, you have already defined a LOAD EIGEN section and you put : %s !!!";
char str_ALREADY_TRAINING[]							= "Inconcistency, you have already defined a TRAINING section and you put : %s !!!";
char str_NOTYET_EIGEN[]								= "Inconcistency, you didn't define the principal components (vie the [TRAINING] section or .LOAD EIGEN command), and you put : %s !!!";
char str_NOTYET_MEET[]								= "Inconcistency, you didn't define the [MEET] section, and you put : %s !!!";
char str_NOTYET_RECONSTRUCTION[]					= "Inconcistency, you didn't define the [RECONSTRUCTION] section, and you put : %s !!!";
char str_NOTYET_RECOGNITION[]						= "Inconcistency, you didn't define the [RECOGNITION] section, and you put : %s !!!";
char str_ERR_WRONGARG[]								= "Wrong parameter : %s";
char str_ERR_TRAINING[]								= "Could not find the [TRAINING] tag";
char str_ERR_TRAINING_ENDTAG[]						= "Cannot find the training face database section end tag";
char str_ERR_RECONSTRUCTION_ENDTAG[]				= "Cannot find the reconstruction face database section end tag";
char str_ERR_RECOGNIZE_ENDTAG[]						= "Cannot find the recognition face database section end tag";
char str_ERR_MEET_ENDTAG[]							= "Cannot find the meet face database section end tag";
char str_ERR_LOAD_EIGEN_ENDTAG[]					= "Cannot find the load eigen section end tag";
char str_ERR_MISMATCH[]								= "Type mismatch in the project file : %s";
char str_ERR_AAMNOTCREATE[]							= "You must train your memory before : %s";

/* Memory */
char str_ERR_MEM_ALLOCATE[]							= "Error while allocating memory, probably not enough memory";
char str_ERR_MEM_REALLOCATE[]						= "Error while reallocating memory, probably not enough memory";
char str_ERR_MEM_GETPTR[]							= "Null handle passed to CMemory::GetPtr()";

/* Matrix */
char str_TOOITER[]									= "Too many iterations in tqli (computing the eigenvectors)";
char str_ERR_MAT_COPY[]								= "Cannot copy the matrix into a face database object because the diagonal object is smaller than the matrix";
char str_ERR_MAT_LOAD_ROW[]							= "Cannot find the number of rows of the matrix";
char str_ERR_MAT_LOAD_COL[]							= "Cannot find the number of columns of the matrix";
char str_ERR_MAT_LOAD_HDR[]							= "Bad header in the matrix file (it should be <row number>\t<colnumber>\n)";

/* Auto-Associative Memory */
char str_AAM_BUILD_START[]							= "Building the Eigenvectors of the Auto-Associative Memory";
char str_AAM_BUILD_NORMALIZED[]						= "The training vectors are normalized";
char str_AAM_BUILD_INNER[]							= "The inner product of the training vectors is computed";
char str_AAM_BUILD_EIGEN1[]							= "The eigenvectors of the inner product are computed";
char str_AAM_BUILD_SORT[]							= "The eigenvectors are sorted in decreasing order of their eigenvalues";
char str_AAM_BUILD_DONE[]							= "%ld Eigenvectors computed";
char str_AAM_RECONSTRUCTION_START[]					= "Calculating the reconstruction of specified the faces";
char str_AAM_RECONS_NORMALIZED[]					= "The faces to be reconstructed are normalized";
char str_AAM_RECONSTRUCTION_DONE[]					= "%ld faces have been reconstructed";
char str_AAM_RECOGNIZE_START[]						= "Trying to recognize people";
char str_AAM_RECOG_NORMALIZED[]						= "The faces to be recognized are normalized";
char str_AAM_RECOG_CLASS[]							= "The classification process begin...";
char str_AAM_RECOG_CLASS_DONE[]						= "The classification process is completed";
char str_AAM_MEET_NORMALIZED[]						= "The faces to meet are normalized";
char str_AAM_RECOGNIZE_DONE[]						= "The Recognition process has been done on %ld faces";
char str_AAM_RECOGNIZE_PERCENT[]					= "Recognition done, On %ld faces %ld have been correctly recognized (%.4f %%)";
char str_RECOGNITION_RESULT_Y[]						= "Y   %s recognized as %s";
char str_RECOGNITION_RESULT_N[]						= "WRONG RECOGNITION:   %s recognized as %s";
char str_AAM_F2CMP[]								= "The composants have been computed from the original faces";
char str_AAM_CMP2F[]								= "The faces have been reconstructed from their composants";
char str_AAM_COS_DONE[]								= "The cosine between the original set and the memorized set is computed";

/* Messages */
char str_MSG_MORE_H[]								= " done in %dh %dm, %s memory free";
char str_MSG_MORE_M[]								= " done in %dm %ds, %s memory free";
char str_MSG_MORE_S[]								= " done in %ds, %s memory free";

⌨️ 快捷键说明

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