Home > Back-end >  How to use the MODI to OCR BMP screenshots directly?
How to use the MODI to OCR BMP screenshots directly?

Time:10-05

 
procedure TForm1. Button1Click (Sender: TObject);

Var

Doc: IDocument;

Img: IImage;

Layout: ILayout;

The begin

Doc:=IDispatch (CreateOleObject (' MODI. Document) as the IDocument.

Doc. Create (' C: \ 1. BMP);//just put here the filename of the an image

Doc. OCR (miLANG_ENGLISH, true, true);

Img:=IDispatch (doc. Images [0]) as IImage;

Layout:=IDispatch (Img. Layout) as ILayout;
Memo1. The Clear;

Memo1. Lines. The Add (Layout. The Text);

MiDocView1. Document:=doc;

Doc. Close (false);

Img:=nil;

Layout:=nil;

end;
End.




Above is a use of MODI (Microsoft Office Document Imaging) for an example of OCR, consult everybody, how to manage the OCR screen for BMP images directly, rather than saved in hard disk and then call OCR recognition?

CodePudding user response:

See have no assgin luo, if not, since the interface is such, is not simple method directly estimates, to save the file, typically a yao is no big deal.

CodePudding user response:

The
refer to the original poster upc100 response:
there is a use of MODI (Microsoft Office Document Imaging ) for an example of OCR, consult everybody, how to screen for BMP images directly to OCR , not saved in the hard disk and then call OCR recognition?

Why don't you try the ABBYY Screenshot Reader, can let you above the OCR clipboard bitmap.

http://superuser.com/questions/595660/is-there-a-utility-to-do-ocr-on-images-on-the-windows-clipboard
  • Related