資源簡介
人民郵電出版社,指紋模式識別系統(tǒng)算法與實現(xiàn)(2)!!!!!!!!!
代碼片段和文件信息
//?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
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????5804??2008-10-22?15:56??第三篇\SampleDemo\FPA.H
?????文件???????3651??2008-10-22?15:56??第三篇\SampleDemo\ReadMe.txt
?????文件??????23432??2010-09-14?10:27??第三篇\SampleDemo\SampleDemo.aps
?????文件???????2086??2010-09-14?10:28??第三篇\SampleDemo\SampleDemo.clw
?????文件???????2119??2008-10-22?15:56??第三篇\SampleDemo\SampleDemo.cpp
?????文件???????4264??2008-10-22?15:56??第三篇\SampleDemo\SampleDemo.dsp
?????文件????????545??2008-10-22?15:56??第三篇\SampleDemo\SampleDemo.dsw
?????文件???????1368??2008-10-22?15:56??第三篇\SampleDemo\SampleDemo.h
?????文件??????99328??2010-09-14?10:28??第三篇\SampleDemo\SampleDemo.ncb
?????文件???????1258??2008-10-22?15:56??第三篇\SampleDemo\SampleDemo.plg
?????文件???????7528??2008-10-22?15:56??第三篇\SampleDemo\SampleDemo.rc
?????文件??????13965??2008-10-22?15:56??第三篇\SampleDemo\SampleDemoDlg.cpp
?????文件???????2095??2008-10-22?15:56??第三篇\SampleDemo\SampleDemoDlg.h
?????文件????????212??2008-10-22?15:56??第三篇\SampleDemo\StdAfx.cpp
?????文件???????1054??2008-10-22?15:56??第三篇\SampleDemo\StdAfx.h
?????文件???????1378??2008-10-22?15:56??第三篇\SampleDemo\resource.h
?????文件???????1078??2008-10-22?15:56??第三篇\SampleDemo\res\SampleDemo.ico
?????文件????????402??2008-10-22?15:56??第三篇\SampleDemo\res\SampleDemo.rc2
?????文件?????282685??2008-10-22?15:56??第三篇\SampleDemo\Debug\CamEngine.dll
?????文件?????143425??2008-10-22?15:56??第三篇\SampleDemo\Debug\FP.dll
?????文件??????11366??2008-10-22?15:56??第三篇\SampleDemo\Debug\FP.lib
?????文件?????307259??2008-10-22?15:56??第三篇\SampleDemo\Debug\FPEngine.dll
?????文件????5366784??2008-10-22?15:56??第三篇\SampleDemo\Debug\SampleDemo.bsc
?????文件?????118918??2008-10-22?15:56??第三篇\SampleDemo\Debug\SampleDemo.exe
?????文件?????247840??2008-10-22?15:56??第三篇\SampleDemo\Debug\SampleDemo.ilk
?????文件??????14438??2008-10-22?15:56??第三篇\SampleDemo\Debug\SampleDemo.obj
?????文件????6893024??2008-10-22?15:56??第三篇\SampleDemo\Debug\SampleDemo.pch
?????文件?????312320??2008-10-22?15:56??第三篇\SampleDemo\Debug\SampleDemo.pdb
?????文件???????4420??2008-10-22?15:56??第三篇\SampleDemo\Debug\SampleDemo.res
?????文件??????????0??2008-10-22?15:56??第三篇\SampleDemo\Debug\SampleDemo.sbr
............此處省略347個文件信息
評論
共有 條評論