资源简介
掌纹识别的代码,c/c++编写,能很好的识别出掌纹。
代码片段和文件信息
// dibapi.cpp
//
// Source file for Device-Independent Bitmap (DIB) API. Provides
// the following functions:
//
// PaintDIB() - Painting routine for a DIB
// CreateDIBPalette() - Creates a palette from a DIB
// FindDIBBits() - Returns a pointer to the DIB bits
// DIBWidth() - Gets the width of the DIB
// DIBHeight() - Gets the height of the DIB
// PaletteSize() - Gets the size required to store the DIB‘s palette
// DIBNumColors() - Calculates the number of colors
// in the DIB‘s color table
// CopyHandle() - Makes a copy of the given global memory block
//
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1997 Microsoft Corporation
// All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Foundation Classes Reference and related
// electronic documentation provided with the library.
// See these sources for detailed information regarding the
// Microsoft Foundation Classes product.
#include “stdafx.h“
#include “dibapi.h“
#include
#include
#include
#include “allocmem.h“
#define DIB_HEADER_MARKER ((WORD) (‘M‘ << 8) | ‘B‘)
#ifdef _MAC
#define SWAPWORD(x) MAKEWORD(HIBYTE(x) LOBYTE(x))
#define SWAPLONG(x) MAKELONG(SWAPWORD(HIWORD(x)) SWAPWORD(LOWORD(x)))
void ByteSwapHeader(BITMAPFILEHEADER* bmiHeader);
void ByteSwapInfo(LPSTR lpHeader BOOL fWin30Header);
#endif
#define PI 3.14159
//角度到弧度转化的宏
#define RADIAN(angle) ((angle)*PI/180.0)
/*************************************************************************
*
* PaintDIB()
*
* Parameters:
*
* HDC hDC - DC to do output to
*
* LPRECT lpDCRect - rectangle on DC to do output to
*
* HDIB hDIB - handle to global memory with a DIB spec
* in it followed by the DIB bits
*
* LPRECT lpDIBRect - rectangle of DIB to output into lpDCRect
*
* CPalette* pPal - pointer to CPalette containing DIB‘s palette
*
* Return Value:
*
* BOOL - TRUE if DIB was drawn FALSE otherwise
*
* Description:
* Painting routine for a DIB. Calls StretchDIBits() or
* SetDIBitsToDevice() to paint the DIB. The DIB is
* output to the specified DC at the coordinates given
* in lpDCRect. The area of the DIB to be output is
* given by lpDIBRect.
*
************************************************************************/
void WINAPI decomposition(double* imagedouble* cdouble* dint nint s)
{
int iii;
double* tmp;
tmp = (double *) calloc (n sizeof(double));
for (i = 0; i < n; i++)
tmp[i] = image[i];
for (i = 0; i < n/2; i++)
{
ii = i << 1;
c[i] = (tmp[ii] + tmp[ii+1]) / 2;
d[i] =(tmp[ii] - tmp[ii+1]) / 2;
}
free((char *)tmp);
}
void WINAPI reconstruction(double* x double* cdouble* dint nint s)
{
int i ii;
double *tmp;
tmp = (dou
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1340 2006-12-06 13:56 掌纹识别\allocmem.h
文件 33792 2009-10-15 00:50 掌纹识别\Debug\vc60.idb
文件 48685 2006-12-09 12:22 掌纹识别\dibapi.cpp
文件 2634 2006-12-09 12:22 掌纹识别\dibapi.h
文件 2459 2006-11-30 20:58 掌纹识别\MainFrm.cpp
文件 1466 2006-11-30 20:55 掌纹识别\MainFrm.h
文件 46040 2006-12-09 12:18 掌纹识别\Palm.aps
文件 2929 2006-12-11 23:06 掌纹识别\Palm.clw
文件 4173 2006-11-30 19:20 掌纹识别\Palm.cpp
文件 4701 2006-12-06 14:15 掌纹识别\Palm.dsp
文件 533 2006-11-30 19:35 掌纹识别\Palm.dsw
文件 1334 2006-11-30 19:20 掌纹识别\Palm.h
文件 115712 2006-12-11 23:15 掌纹识别\Palm.ncb
文件 220160 2006-12-11 23:15 掌纹识别\Palm.opt
文件 242 2006-12-11 23:04 掌纹识别\Palm.plg
文件 13795 2006-12-09 12:18 掌纹识别\Palm.rc
文件 5655 2006-12-05 09:04 掌纹识别\PalmDoc.cpp
文件 1710 2006-12-05 09:00 掌纹识别\PalmDoc.h
文件 38139 2006-12-09 12:23 掌纹识别\PalmView.cpp
文件 2737 2006-12-09 12:18 掌纹识别\PalmView.h
文件 4263 2006-11-30 19:20 掌纹识别\ReadMe.txt
目录 0 2006-12-06 13:51 掌纹识别\Release\
文件 1078 2006-11-30 19:20 掌纹识别\res\Palm.ico
文件 396 2006-11-30 19:20 掌纹识别\res\Palm.rc2
文件 1078 2006-11-30 19:20 掌纹识别\res\PalmDoc.ico
文件 1078 2006-11-30 19:20 掌纹识别\res\Toolbar.bmp
文件 2142 2006-12-09 12:18 掌纹识别\resource.h
文件 206 2006-11-30 19:20 掌纹识别\StdAfx.cpp
文件 1075 2006-11-30 20:35 掌纹识别\StdAfx.h
- 上一篇:功能非常全的数字图像处理程序含源代码
- 下一篇:TCP一对多通信_基于MFC多线程
评论
共有 条评论