求图片识别DEMO,大牛来出出招吧!

水向东流时光怎么偷 2013-05-06 09:44:21
...全文
147 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
if OpenDialog1.FileName = 'D:\1.tif' then
    begin
    ShowMessage('please select a tiff image file first!');
    exit;
    end;
    doc := CreateOleObject('MODI.Document');
    doc.Create(OpenDialog1.FileName);
    // miLANG_CHINESE_TRADITIONAL = 1028
    // miLANG_CHINESE_SIMPLIFIED = 2052
    // miLANG_SYSDEFAULT = 2048
    Screen.Cursor := crHourGlass;
    doc.OCR(1028);
    doc.Language:='ocrb';
    Screen.Cursor := crDefault;
    for i:=0 to doc.Images.Count - 1 do
    begin
    str := str + doc.Images.Item[i].Layout.Text;
    end;
    Memo1.Lines.Text := str;

    ShowMessage('Finished!');

    doc.Close;
    doc := UnAssigned
调用代码!
  • 打赏
  • 举报
回复
[quote=引用 7 楼 sololie 的回复:] 你没有装打印机吗,Microsoft Office Document Imaging 不是装了OFFICE就带的嘛,没有就下载个装一装。 俺也没做过图片识别,也不会,只当google机器帮大爷您搜索。[/quote 已经安装成功,手工运行,识别正确,DELPHI调用提示OCR: bad language.
sololie 2013-05-06
  • 打赏
  • 举报
回复
你没有装打印机吗,Microsoft Office Document Imaging 不是装了OFFICE就带的嘛,没有就下载个装一装。 俺也没做过图片识别,也不会,只当google机器帮大爷您搜索。
  • 打赏
  • 举报
回复
--------------------------- Project2 --------------------------- OCR: bad language. --------------------------- 确定 --------------------------- 用Microsoft Office Document Imaging 11.0 Type Library 提示这个是没有装语言包吗?
sololie 2013-05-06
  • 打赏
  • 举报
回复
codeproject的那个是c#的,这个可以了吧。。。 语言没差别,你仔细一瞧其实都是能瞧明吧的嘛
  • 打赏
  • 举报
回复
引用 2 楼 sololie 的回复:
http://download.csdn.net/detail/GOTO3000/688872 http://download.csdn.net/detail/djhell/1755925 http://download.csdn.net/detail/sdkddlutdu/1628496
你太看得起我了哥哥,不是C,就是C++ 玩不动啊!也没有环境
sololie 2013-05-06
  • 打赏
  • 举报
回复

1,183

社区成员

发帖
与我相关
我的任务
社区描述
Delphi GAME,图形处理/多媒体
社区管理员
  • GAME,图形处理/多媒体社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧