procedure TForm1.Button1Click(Sender: TObject);
Var
doc :IDocument;
Img :IImage;
Layout :ILayout;
begin
doc := IDispatch(CreateOleObject('MODI.Document')) as IDocument;
doc.create('C:\1.bmp'); // just put here the filename of an image
doc.OCR(miLANG_ENGLISH,true,true);
Img := IDispatch(doc.Images[0]) as IImage;
Layout := IDispatch(Img.Layout) as ILayout;
Memo1.Clear;
Memo1.Lines.Add(Layout.Text);
MiDocView1.Document := doc;
doc.Close(false);
Img := nil;
Layout := nil;
end;
end.
上面是一個使用MODI(Microsoft Office Document Imaging )進行ocr識別的一個例子,請教各位高手,如何將抓屏得到bmp圖片直接進行OCR,而不是保存在硬碟里后再呼叫OCR進行識別?
uj5u.com熱心網友回復:
看有沒assgin 咯,如果沒有,既然介面是這樣,估計也沒直接簡單方法了。要一般情況保存檔案么也不是什么大事。uj5u.com熱心網友回復:
要不你試一下ABBYY Screenshot Reader, 可以讓你ocr 剪切板上面的bitmap.
http://superuser.com/questions/595660/is-there-a-utility-to-do-ocr-on-images-on-the-windows-clipboard
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/114651.html
上一篇:delphi工程師的前景如何
