資源簡介
Visual C++指紋模式識別系統算法與實現代碼--第三篇,書本附帶代碼,方便光盤丟失時使用。
代碼片段和文件信息
//?LiveMatch.cpp?:?implementation?file
//
#include?“stdafx.h“
#include?“MyFPSys.h“
#include?“LiveMatch.h“
#include?“FPA.H“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
#define?MAXRECORD?256
/////////////////////////////////////////////////////////////////////////////
//?LiveMatch?dialog
BYTE?*lpLiveData1?=?new?BYTE[92160];
BYTE?*lpFeature1?=?new?BYTE[430];
CString?LiveFilePath;
int?IndexList[MAXRECORD];
int?ListSize;
CString?DatabasePath;
bool?bIdentify?=?false;
LiveMatch::LiveMatch(CWnd*?pParent?/*=NULL*/)
:?CDialog(LiveMatch::IDD?pParent)
{
//{{AFX_DATA_INIT(LiveMatch)
//?NOTE:?the?ClassWizard?will?add?member?initialization?here
//}}AFX_DATA_INIT
}
void?LiveMatch::DoDataExchange(CDataExchange*?pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(LiveMatch)
//?NOTE:?the?ClassWizard?will?add?DDX?and?DDV?calls?here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(LiveMatch?CDialog)
//{{AFX_MSG_MAP(LiveMatch)
ON_BN_CLICKED(IDC_BUTTON_CAP?OnButtonCap)
ON_BN_CLICKED(IDC_BUTTON_CLOSESENSOR?OnButtonClosesensor)
ON_WM_TIMER()
ON_BN_CLICKED(IDC_BUTTON_CREATE?OnButtonCreate)
ON_BN_CLICKED(IDC_BUTTON_LOAD?OnButtonload)
ON_BN_CLICKED(IDC_BUTTON_SAVE?OnButtonSave)
ON_BN_CLICKED(IDC_BUTTON_ADD?OnButtonAdd)
ON_BN_CLICKED(IDC_BUTTON_IDENTIFY?OnButtonIdentify)
ON_BN_CLICKED(IDC_BUTTON_NIDENTIFY?OnButtonNidentify)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?LiveMatch?message?handlers
void?LiveMatch::OnButtonCap()?
{
//?TODO:?Add?your?control?notification?handler?code?here
int?ret?=?FPA_Camera_Init();
TCHAR?tchBuffer[256?];?
LPTSTR?lpszCurDir;
lpszCurDir?=?tchBuffer;?
GetCurrentDirectory(256??lpszCurDir);
CString?showme(lpszCurDir);
LiveFilePath?=?showme?+?“\\live.bmp“;
SetTimer(1?1000?0);
}
void?LiveMatch::OnButtonClosesensor()?
{
//?TODO:?Add?your?control?notification?handler?code?here
KillTimer(1);
FPA_Camera_Exit();
}
void?LiveMatch::OnTimer(UINT?nIDEvent)?
{
//?TODO:?Add?your?message?handler?code?here?and/or?call?default
int?Size;
CString?t;
if?(nIDEvent?==?1)
{
FPA_Camera_Capture_File(LiveFilePath?lpLiveData1?0);
HBITMAP?m_hImage;
m_hImage?=?(HBITMAP)LoadImage(AfxGetInstanceHandle()
LiveFilePath
IMAGE_BITMAP
0
0
LR_LOADFROMFILE|LR_CREATEDIBSECTION);
GetDlgItem(IDC_STATIC_LIVE)->SendMessage(STM_SETIMAGEIMAGE_BITMAP?(LPARAM)m_hImage);
if?(bIdentify)
{
int?ret?=?FPA_AnalyzeFeature_File((LPCSTR)LiveFilePath?lpFeature1?&Size);
if?(ret?==?0)
{
ret?=?FPA_Identify(DatabasePath?IndexList?ListSize?lpFeature1);
if?(ret?!=?-1)
{
int?ID?=?IndexList[ret]?/?10;
int?FingerIndex?=?IndexList[ret]?%?10;
t.Format(“accept!???ID:?%d\t\tFingerIndex:%d“?ID?F
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????93238??2008-10-22?15:57??第三篇\FPSys\back.bmp
?????文件?????282698??2008-10-22?15:57??第三篇\FPSys\CamEngine.dll
?????文件?????????54??2008-10-22?15:57??第三篇\FPSys\config.ini
?????文件?????548864??2008-10-22?15:57??第三篇\FPSys\data\FPDB.mdb
?????文件???????4107??2008-10-22?15:57??第三篇\FPSys\DataEnv.DCA
?????文件???????2662??2008-10-22?15:57??第三篇\FPSys\DataEnv.Dsr
?????文件????????137??2008-10-22?15:57??第三篇\FPSys\DataEnv.dsx
?????文件?????282669??2008-10-22?15:57??第三篇\FPSys\DxCap.dll
?????文件??????49152??2008-10-22?15:57??第三篇\FPSys\DxCap.dll_
?????文件?????159797??2008-10-22?15:57??第三篇\FPSys\FP.dll
?????文件??????11366??2008-10-22?15:57??第三篇\FPSys\FP.lib
?????文件???????5877??2008-10-22?15:57??第三篇\FPSys\FPA.H
?????文件?????340033??2008-10-22?15:57??第三篇\FPSys\FPEngine.dll
?????文件??????98304??2008-10-22?15:57??第三篇\FPSys\fpfltr5.dll
?????文件???????2067??2008-10-22?15:57??第三篇\FPSys\frmfaile.frm
?????文件??????22757??2008-10-22?15:57??第三篇\FPSys\frmfaile.frx
?????文件??????51036??2008-10-22?15:57??第三篇\FPSys\frmfingeridentify.frm
?????文件??????22498??2008-10-22?15:57??第三篇\FPSys\frmfingeridentify.frx
?????文件???????2065??2008-10-22?15:57??第三篇\FPSys\Frminfo.frm
?????文件??????22734??2008-10-22?15:57??第三篇\FPSys\Frminfo.frx
?????文件???????7722??2008-10-22?15:57??第三篇\FPSys\frmmanslist.frm
?????文件??????22519??2008-10-22?15:57??第三篇\FPSys\frmmanslist.frx
?????文件??????82432??2008-10-22?15:57??第三篇\FPSys\Kyqual.dll
?????文件??????22486??2008-10-22?15:57??第三篇\FPSys\logo.ico
?????文件???????8583??2008-10-22?15:57??第三篇\FPSys\midprocess.frm
?????文件??????22498??2008-10-22?15:57??第三篇\FPSys\midprocess.frx
?????文件??????52224??2008-10-22?15:57??第三篇\FPSys\Minulib.dll
?????文件??????13461??2008-10-22?15:57??第三篇\FPSys\ModuleAPI.bas
?????文件???????3764??2008-10-22?15:57??第三篇\FPSys\Moduleconst.bas
?????文件??????12568??2008-10-22?15:57??第三篇\FPSys\ModuleMain.bas
............此處省略349個文件信息
評論
共有 條評論