车牌识别练习
By
admin
at 2019-07-04 • 0人收藏 • 1867人看过
放弃测试了, 本来考虑这个dll的试用版应该也就是试用时间的限制,但是,测试发现 [获取识别结果] 的函数都不能用, 那么就没啥测试的意义了.
等有项目的时候, 买个正版加密狗再继续测试了.
车牌识别测试:
import win.ui; /*DSG{{*/ mainForm = win.form(text="aardio工程35";right=775;bottom=527) mainForm.add( button={cls="button";text="Button";left=0;top=83;right=164;bottom=157;z=1}; button2={cls="button";text="Button";left=0;top=174;right=164;bottom=248;z=3}; button3={cls="button";text="Button";left=0;top=289;right=164;bottom=363;z=4}; picturebox={cls="picturebox";left=193;top=0;right=776;bottom=528;z=2} ) /*}}*/ import console console.open() var dll = ..raw.loadDll("\res\LRLprCar.dll"); dspGetVersion = dll.api("dspGetVersion","int(int type,string& ver,int bufSize)" ) dspCreate = dll.api("dspCreate","pointer(string GuiName)" ) dspResetImageDisplayWindow = dll.api("dspResetImageDisplayWindow","int(pointer hdsp,int hwnd)" ) dspDestroy = dll.api("dspDestroy","int(pointer hdsp)" ) dspSetSyncEventCallback = dll.api("dspSetSyncEventCallback","int(pointer hdsp,pointer pObj,pointer proc)" ) dspRecogParamDlg = dll.api("dspRecogParamDlg","int(pointer hdsp)" ) dspRecogStartWithFile = dll.api("dspRecogStartWithFile","int(pointer hdsp,ustring path,int params)" ) dspGetPlateNumber = dll.api("dspGetPlateNumber","int(pointer hdsp,pointer& name,int num)" ) var str = raw.buffer(128) var ret,ver = dspGetVersion(1,str,128) console.log( ret,ver,"===" ) var HDSP = dspCreate(); console.log( HDSP ); console.log( dspResetImageDisplayWindow(HDSP,mainForm.picturebox.hwnd) ); mainForm.onClose = function(hwnd,message,wParam,lParam){ dspDestroy(HDSP) } mainForm.button.oncommand = function(id,event){ dspRecogParamDlg(HDSP); } mainForm.button2.oncommand = function(id,event){ var ret = dspRecogStartWithFile(HDSP,"C:\Users\popdes\Desktop\车牌识别测试\测试文件\图片\2.jpg",0x04); console.log(ret) } mainForm.button3.oncommand = function(id,event){ var str = raw.buffer(128); var ret,name = dspGetPlateNumber(HDSP,str,128); console.log(ret,name,str) console.log(raw.tostring(name)) console.log(raw.tostring(str)) } mainForm.show(); return win.loopMessage();
2 个回复 | 最后更新于 2019-07-04
登录后方可回帖
dll?