資源簡介
修改自《深入理解OpenCV》第八章,我改成了MFC的形式,完成了主要功能,包括人臉檢測,模型訓練,人臉識別等功能,開發工具Visula Studio 2013+OpenCV2.4.9,里面有編譯好的可執行文件和源程序,資源分3分是不是有點小貴呢,我自己沒什么分了呀,所以請大家體諒一下~

代碼片段和文件信息
//?FaceDetector.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“FaceDetector.h“
#include?“FaceDetectorDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#endif
//?CFaceDetectorApp
BEGIN_MESSAGE_MAP(CFaceDetectorApp?CWinApp)
ON_COMMAND(ID_HELP?&CWinApp::onhelp)
END_MESSAGE_MAP()
//?CFaceDetectorApp?construction
CFaceDetectorApp::CFaceDetectorApp()
{
//?support?Restart?Manager
m_dwRestartManagerSupportFlags?=?AFX_RESTART_MANAGER_SUPPORT_RESTART;
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
//?The?one?and?only?CFaceDetectorApp?object
CFaceDetectorApp?theApp;
//?CFaceDetectorApp?initialization
BOOL?CFaceDetectorApp::InitInstance()
{
//?InitCommonControlsEx()?is?required?on?Windows?XP?if?an?application
//?manifest?specifies?use?of?ComCtl32.dll?version?6?or?later?to?enable
//?visual?styles.??Otherwise?any?window?creation?will?fail.
INITCOMMONCONTROLSEX?InitCtrls;
InitCtrls.dwSize?=?sizeof(InitCtrls);
//?Set?this?to?include?all?the?common?control?classes?you?want?to?use
//?in?your?application.
InitCtrls.dwICC?=?ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);
CWinApp::InitInstance();
AfxEnableControlContainer();
//?Create?the?shell?manager?in?case?the?dialog?contains
//?any?shell?tree?view?or?shell?list?view?controls.
CShellManager?*pShellManager?=?new?CShellManager;
//?Activate?“Windows?Native“?visual?manager?for?enabling?themes?in?MFC?controls
CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));
//?Standard?initialization
//?If?you?are?not?using?these?features?and?wish?to?reduce?the?size
//?of?your?final?executable?you?should?remove?from?the?following
//?the?specific?initialization?routines?you?do?not?need
//?Change?the?registry?key?under?which?our?settings?are?stored
//?TODO:?You?should?modify?this?string?to?be?something?appropriate
//?such?as?the?name?of?your?company?or?organization
SetRegistryKey(_T(“Local?AppWizard-Generated?Applications“));
CFaceDetectorDlg?dlg;
m_pMainWnd?=?&dlg;
INT_PTR?nResponse?=?dlg.DoModal();
if?(nResponse?==?IDOK)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?OK
}
else?if?(nResponse?==?IDCANCEL)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?Cancel
}
else?if?(nResponse?==?-1)
{
TRACE(traceAppMsg?0?“Warning:?dialog?creation?failed?so?application?is?terminating?unexpectedly.\n“);
TRACE(traceAppMsg?0?“Warning:?if?you?are?using?MFC?controls?on?the?dialog?you?cannot?#define?_AFX_NO_MFC_CONTROLS_IN_DIALOGS.\n“);
}
//?Delete?the?shell?manager?created?above.
if?(pShellManager?!=?NULL)
{
delete?pShellManager;
}
//?Since?the?dialog?has?been?closed?return?FALSE?so?that?we?exit?the
//??application?rather?than?start?the?application‘s?message?pump.
return?FALSE;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-07-18?23:48??FaceDetector\
?????目錄???????????0??2015-07-18?23:42??FaceDetector\FaceDetector免安裝版\
?????文件????10650112??2015-07-18?23:43??FaceDetector\FaceDetector免安裝版\FaceDetector.exe
?????文件??????777721??2013-11-13?17:44??FaceDetector\FaceDetector免安裝版\haarcascade_mcs_lefteye.xm
?????文件?????1383113??2013-11-13?17:44??FaceDetector\FaceDetector免安裝版\haarcascade_mcs_righteye.xm
?????文件???????51856??2013-11-13?17:44??FaceDetector\FaceDetector免安裝版\lbpcascade_frontalface.xm
?????文件??????815272??2013-10-05?02:38??FaceDetector\FaceDetector免安裝版\msvcp120d.dll
?????文件?????1824424??2013-10-05?02:38??FaceDetector\FaceDetector免安裝版\msvcr120d.dll
?????文件?????1506304??2014-04-15?17:19??FaceDetector\FaceDetector免安裝版\opencv_calib3d249d.dll
?????文件?????2360320??2014-04-15?17:20??FaceDetector\FaceDetector免安裝版\opencv_contrib249d.dll
?????文件?????3515392??2014-04-15?17:18??FaceDetector\FaceDetector免安裝版\opencv_core249d.dll
?????文件?????1464832??2014-04-15?17:19??FaceDetector\FaceDetector免安裝版\opencv_features2d249d.dll
?????文件?????1163264??2014-04-15?17:18??FaceDetector\FaceDetector免安裝版\opencv_flann249d.dll
?????文件?????3697152??2014-04-15?17:19??FaceDetector\FaceDetector免安裝版\opencv_highgui249d.dll
?????文件?????3144192??2014-04-15?17:18??FaceDetector\FaceDetector免安裝版\opencv_imgproc249d.dll
?????文件?????1048064??2014-04-15?17:18??FaceDetector\FaceDetector免安裝版\opencv_ml249d.dll
?????文件?????1432576??2014-04-15?17:19??FaceDetector\FaceDetector免安裝版\opencv_objdetect249d.dll
?????文件??????692736??2014-04-15?17:18??FaceDetector\FaceDetector免安裝版\opencv_video249d.dll
?????文件??????772784??2013-10-05?02:38??FaceDetector\FaceDetector免安裝版\vccorlib120d.dll
?????目錄???????????0??2015-07-18?23:45??FaceDetector\FaceDetector源程序\
?????目錄???????????0??2015-07-18?23:44??FaceDetector\FaceDetector源程序\FaceDetector\
?????文件?????1033352??2015-07-18?22:06??FaceDetector\FaceDetector源程序\FaceDetector\FaceDetector.aps
?????文件????????2993??2015-07-17?17:32??FaceDetector\FaceDetector源程序\FaceDetector\FaceDetector.cpp
?????文件?????????541??2015-07-17?17:32??FaceDetector\FaceDetector源程序\FaceDetector\FaceDetector.h
?????文件???????16708??2015-07-18?22:06??FaceDetector\FaceDetector源程序\FaceDetector\FaceDetector.rc
?????文件????????6463??2015-07-18?22:42??FaceDetector\FaceDetector源程序\FaceDetector\FaceDetector.vcxproj
?????文件????????2609??2015-07-18?21:33??FaceDetector\FaceDetector源程序\FaceDetector\FaceDetector.vcxproj.filters
?????文件???????23534??2015-07-18?23:42??FaceDetector\FaceDetector源程序\FaceDetector\FaceDetectorDlg.cpp
?????文件????????2880??2015-07-18?21:59??FaceDetector\FaceDetector源程序\FaceDetector\FaceDetectorDlg.h
?????文件????????2212??2015-05-21?12:59??FaceDetector\FaceDetector源程序\FaceDetector\ImageCenterDib.h
?????文件???????16992??2015-05-21?13:01??FaceDetector\FaceDetector源程序\FaceDetector\ImgCenterDib.cpp
............此處省略19個文件信息
- 上一篇:c++面向對象圖書管理系統
- 下一篇:ini文件讀寫操作類C++版
評論
共有 條評論