detectstring=function(hwnd,x1,x2,y1,y2){
import string.ocrLite;
import string.ocrLite.defaultModels;
import soImage;
import soImage.directX;
var sodx = soImage.directX();
var so=soImage();
win.setForeground(hwnd);
win.delay(20);
sodx.captureWindowToImage(so,hwnd);
sodx.close()
so.crop(x1,x2,y1,y2)
so.grayScale()
mainForm.picturebox.image=so.getBytes()
var ocr = string.ocrLite(,true,true);
var ocrResult=ocr.detectBuffer(so.getBytes());
so.delete()
if ocrResult {
return ocrResult.text
}else{
return "";
}
}
str=detectstring(hwnd,139,623,310,669)
mainForm.edit.print(str)
aardio进行ocr文字识别(别的大神代码,复制过来备用)
相关推荐
- 上网时chrome慢的不行,左下角显示正在解析代理服务器,怎么办?
- 二个小时完成了DNSDUN批量域名解析软件,休息
- Windows环境下使用apache,php安全漏洞怎么搞
- nginx报警:nginx: [warn] could not build optimal server_names_hash, you should increase either server_names_hash_max_size: 512 or server_names_hash_bucket_size: 64; ignoring server_names_hash_bucket_size
- aardio之数组table随机打乱顺序
- JS-判断元素是否在可视窗口可见
- 在线生成文字图案--生成由文字组成的图案(蛮不错)
发表评论