AiPacino / tesseract-ocr

Automatically exported from code.google.com/p/tesseract-ocr
Other
2 stars 0 forks source link

Delphi wrapper for tessdll.dll ?? #88

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm trying to use tessdll.dll from delphi but I can't get success.

I follow all steps from testdll.exe project but nothing... Someone use 
tessdll.dll from delphi? 

Best regards from Spain.

Original issue reported on code.google.com by dad...@gmail.com on 26 Dec 2007 at 5:53

GoogleCodeExporter commented 9 years ago

you need to change the __cdecl modifier in the tessdll.h to __stdcall then 
ricompile 
after that use  DEpendencyWalker.exe to get the exact names of exported 
function..
for example _TessDllRelease@0 for TessDllRelease...

on Delphi side write  a unit like that, (only TessDllRelease in the  example 
but you
can add the others)

//delphi unit 
unit TessDll;

interface
uses 
    Windows;
type
  TTessDllRelease   = procedure ;stdcall;
var
  hlib:HMODULE;
  TessDllRelease:TTessDllRelease;

implementation

initialization
    hlib:=LoadLibrary('Tessdll.dll');   
    @TessDllRelease:=GetProcAddress(hlib,'_TessDllRelease@0');

end.
//end delphi unit 
now you can call it by something like

procedure TFormOCR.Button4Click(Sender: TObject);
begin
    TessDllRelease;
end;

btw : i have not used all the functions in tessdll.dll but i have defined my 
own one
that's why i dont report it in the code above 
hope this help

Original comment by lr1...@gmail.com on 12 Jan 2008 at 8:21

GoogleCodeExporter commented 9 years ago
Hi

I have no C compiler. If you rebuilt the dll successly please send me with mail 
or 
place anywhere and give link please.

mrmcop@gmail.com

Sincerely yours..

Original comment by mrm...@gmail.com on 15 Jan 2009 at 9:59

GoogleCodeExporter commented 9 years ago

Original comment by theraysm...@gmail.com on 21 May 2010 at 8:32

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
My application in Delphi is aborting when execute "GetAllWords".

Original comment by rogerios...@gmail.com on 5 Jun 2011 at 12:22

Attachments:

GoogleCodeExporter commented 9 years ago
rogerios...
finally, you resolved the problem (of aborting when "GetAllWords" is called)?

Original comment by alles...@gmail.com on 7 Jul 2011 at 7:20

GoogleCodeExporter commented 9 years ago
I have the same trouble mrm had, I don't have C compiler, someone can recompile 
and send Delphi version for me please ?

Original comment by marcosde...@gmail.com on 13 Nov 2011 at 3:25

GoogleCodeExporter commented 9 years ago
Has anyone been successful creating a Delphi 5 or Delphi 2010 project for 
Tesseract 3.01 ?

I tried to compile above project in Delphi 5 Enterprise and fatal error

[Fatal Error] uPrincipal.pas(6): File not found: 'Variants.dcu'

Original comment by nine.ele...@gmail.com on 21 Jun 2012 at 8:56

GoogleCodeExporter commented 9 years ago
where to get dll for delphi? can someone help me?

edmilsongrilo@hotmail.com

Original comment by edmilson...@gmail.com on 7 Nov 2012 at 7:40

GoogleCodeExporter commented 9 years ago
have a look at project ocrivist - it looks like they have wrapper around 
(older?) version of tesseract. Maybe encourage/help them to upgrade to the 
recent version...

http://code.google.com/p/ocrivist/source/browse/#svn%2Ftessintf

Original comment by zde...@gmail.com on 8 Nov 2012 at 7:34

GoogleCodeExporter commented 9 years ago
Reference to this issue was posted in FAQ

Original comment by zde...@gmail.com on 2 Jan 2013 at 12:44