Witam. Potrzebne mi jest rozpoznawanie tekstu (OCR) w Delphi. Znalazłem coś w activex:
1) Click menu "Component" > "Import ActiveX control".
2) Select the "Microsoft Office Document Imaging 11.0 Type Library"
3) Click "Create unit".
After doing so, the component will be in the ActiveX component page.
Add "ComObj, MODI_TLB" to the uses clause.
Drop "MiDocView" to the form.
procedure TForm.Button1Click(Sender: TObject);
Var
doc :IDocument;
Img :IImage;
Layout :ILayout;
begin
doc := IDispatch(CreateOleObject('MODI.Document')) as IDocument;
doc.create(c:\test.bmp);
doc.ocr(miLANG_ENGLISH,true,true);
Img := IDispatch(doc.Images[0]) as IImage;
Layout := IDispatch(Img.Layout) as ILayout;
Memo1.Lines.Add(Layout.Text);
MiDocView1.Document := doc;
doc.Close(false);
Img := nil;
Layout := nil;
end;
Problem w tym, że mam wersję Office'a 2007 a nie 2003 i jak robię to "Component" > "Import ActiveX control" to tam nie mam pozycji "Microsoft Office Document Imaging 11.0 Type Library".
Da się to jakoś obejść? Jakieś DLLki załadować? Proszę o pomoc, nie znam zasady działania tych kontrolek ;p