指纹图象的显示(100分)

  • 主题发起人 主题发起人 南山孤雁
  • 开始时间 开始时间

南山孤雁

Unregistered / Unconfirmed
GUEST, unregistred user!
请问谁用过 sensor获取指纹,或用过Veridicom公司的SDK?
how to display it in Delphi program?
 
如果可以在c中显示就可以在delphi中显示:-)
 
比较新的问题,关注。
 
如果是非实时性显示,可以考虑
先临时格式转换,生成DELPHI默认
支持的格式,再显示。
不只是否可行?
 
是的。关键是格式的问题。如果
格式可以解决的话,在DELPHI里面显示就不是问题拉
呵呵
 
格式没什么关系。以前做过那种不过是利用一个DLL,它提供一函数直接返回一bitmap handle。
 
该结束了吧.
 
呵呵,没什么可@@的.
用过几种都是提供一组function,声明后直接调用就行了,买指纹机时一般是有的,不
过现在多数的编程接口都得花钱买.
 
This is very easy, read the paper of verdicom sdk.
use getimage to get 256 gray picture, the show it in a bitmap;
 
寄给你算了。
unit vfp;

interface

uses
Windows, SysUtils , Classes, Graphics, Dialogs ,StdCtrls ,ExtCtrls;
type
TDoublePChar=array [1..300] of PChar;

const
UsbPara=False; //if USB Interface then True else False
DLLPATH='';
VFPS_STANDARD=2;
VFPS_IMAGEPLUS=4;
VFPS_NOCALIBRATE=32;
VFPS_MASK_DFX_ERRORS=1024;

VFPS_AUTO_MAX=0;
VFPS_NO_DMA=16;
VFPS_NO_ECP=32;
VFPS_FORCE=64;

V_USB_TYPE=0;
V_PPORT_TYPE=1;
var
FingerPosition:integer;
BitMap : TBitMap;
fpreadimg,fpwriteimg:array[1..90000]of char;
fpsearchminu,fpenrollminu:array[1..256*20]of char;
fpCompressedMinu,fpReadCompressedMinu:array[1..256*4]of Char;

pstr,pstr2,cpstr2,ImageShow:PChar;
pstr1,pstr3:TDoublePChar;

fpnumminus:longint;
fprows,fpcols,fpmode,fpflags:integer;

doopensensor,doclosesensor,doresetdevice:longint;
dosetdevicemode,dogetdevicemode:longint;
dovfpsinitialize:longint;
dovfpsgetimage,dovfpsclose:integer;
dofpfltrinit,dofpfltr:longint;
domatchprints,doinitmatcher:longint;
doreaduncompressedminufile,dowriteuncompressedminufile:Longint;

Stream : TStringStream;
ImageIn : string;
process : longint;
k : Char;
//ImageShow: PByteArray;

function VFPSinit(sensorid:integer; var numrows: integer;var numcolumns:integer;
var mode:integer;configure:PChar;flags:integer):longint;
stdcall;external DLLPATH+'vfpsimg.dll';
function VFPSselectSensor(sensorType,overrides:Longint):Longint;
stdcall;external DLLPATH+'vfpsimg.dll';

function VFPSinitialize(sensorid:integer; var numrows: integer;var numcolumns:integer;
var mode:integer; configure:PChar; flags: integer):longint;
stdcall;external DLLPATH+'vfpsimg.dll';
function VFPSgetImage(handle:longint;mode:integer;imagedata:PChar;flags:integer):integer;
stdcall;external DLLPATH+'vfpsimg.dll';
function VFPSclose(fhandle:longint;flags:integer):integer;
stdcall;external DLLPATH+'vfpsimg.dll';

function fpfltrinit(configfile:PChar):longint;
stdcall;external DLLPATH+'fpfltr5';
function fpfltr(imagein:TDoublePChar;height,width:longint;minutiae:PChar;
var nminutiae:longint; imageout:TDoublePChar;dflag:integer):longint;
stdcall;external DLLPATH+'fpfltr5.dll';
function fpProcess(imagein:PChar; height,width:longint; minutiae: PChar;
var nminutiae: longint; imageShow: PChar; dflag: longint; compressFlag : longint):longint;
stdcall;external DLLPATH+'fpfltr5.dll';

function initMatcher(configfile:PChar):longint;
stdcall;external DLLPATH+'vmatcher.dll';
function matchprints(serachminu:Pchar;nsearchminu:longint;fileminu:pchar;nfileminu:longint):longint;
stdcall;external DLLPATH+'vmatcher.dll';
function setMatcherSecurity(securityLevel:LongInt):LongInt;
stdcall;external 'vmatcher.dll';
function readUncompressedMinuFile(minufile:pchar;minudata:pchar):integer;
stdcall;external DLLPATH+'minulib.dll';
function writeUncompressedMinuFile(minufile:PChar;minudata:Pchar;numMinu:integer):integer;
stdcall;external DLLPATH+'minulib.dll';
function compressMinutiae(uncompressedMinutiae:PChar;nMinutiae:LongInt;
CompressedMinutiae:PChar):Integer;
stdcall;external 'minulib.dll';
function uncompressMinutiae(compressedMinutiae:PChar;nMinutiae:LongInt;
uncompressedMinutiae:PChar):Integer;
stdcall;external 'minulib.dll';

function initQuality(configFile:PChar):longint;
stdcall;external DLLPATH+'kyqual.dll';
function Quality(inImage:PChar;height:longint;width:longint):integer;
stdcall;external DLLPATH+'kyqual.dll';


function vfpinit:boolean;
procedure vfpclose;
procedure vfpgrasp (sImage1: TImage);


implementation

//uses finger;

procedure vfpclose;
begin

dovfpsclose:=VFPSclose(dovfpsinitialize,fpflags);

end;

function vfpinit:boolean;
begin

fpflags:=VFPS_IMAGEPLUS;
VFPSselectSensor(V_PPORT_TYPE,1);
dovfpsinitialize:= VFPSinitialize(0, fprows, fpcols, fpmode, 'fpsimg.cfg',fpflags);
dofpfltrinit:=fpfltrinit(DLLPATH+'fpfltr.cfg');

if (dovfpsinitialize >= 0) and ( dofpfltrinit = 0 ) then
vfpinit:=True
else
begin
vfpinit:=False;
Exit;
end;
//initQuality(DLLPATH+'quality.cfg');

end;

procedure vfpgrasp (sImage1: TImage);
var
x,y : integer;
P : PByteArray;
// pstr1,pstr3:TDoublePChar;
begin
// MainForm.ErrorBar.Caption:='';
pstr:=@fpreadimg;
// imageShow := @fpwriteimg;
fpflags:=VFPS_IMAGEPLUS;
fpmode:=0;
dovfpsgetimage:= VFPSgetImage(dovfpsinitialize,fpmode,pstr,fpflags );

// FingerPosition:=Quality(pstr,fprows,fpcols);
// process := fpProcess(pstr, 300,300, pstr2,fpnumMinus,ImageShow,0,0);
if dovfpsgetimage < 0 then
begin
Exit;
end;
try



for x:=1 to 300 do
begin
pstr1[x]:=@fpreadimg[(x-1)*300+1];
pstr3[x]:=@fpwriteimg[(x-1)*300+1];
end;
pstr2:=@fpsearchMinu;
dofpfltr:=fpfltr(pstr1, 300, 300, pstr2, fpnumMinus, pstr3, 0);




BitMap := TBitMap.create;
BitMap.LoadFromFile('xw.bmp');
for y := 50 to BitMap.height -1 + 50 do
begin
P := BitMap.ScanLine[y-50];
for x := 50 to BitMap.width -1 + 50 do
P[x-50] := 255 - Ord(fpreadimg[y*300+x+1]);
end;

sImage1.canvas.draw(0,0,BitMap);


{ for y := 0 to 300 -1 do
for x := 0 to 300 -1 do
begin k := ImageShow[y * 300 + x];
// SImage1.Canvas.Pixels[y,x] := TColor(RGB(k,k,k));
sImage1.Canvas.Pixels[x,y] := TColor(RGB(ord(k),ord(k),ord(k)));
end;
}
finally
end;
cpstr2:=@fpCompressedMinu;
compressMinutiae(pstr2,fpnumMinus,cpstr2);
end;


end.
 
请继续讨论或结束问题
 
多人接受答案了。
 
那位能提供U.are.U或其他指纹机的开发包(dll及头文件),我也想要。skygui@371.net
 
后退
顶部