You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, thank you for the work put into TTesseractOCR4 for delphi, that helps a lot!
Actually working on Delphi 11.3.
I just discovered after some testing and debugging, that the record field alignement is important for the dll to work correctly.
For about a day I was trying to implement Tesseract into my project without success, using the same dlls and trained data files as your project examples, I wasn't able to make mine working (always crashing on the recognize call to the api with an adress error), but the example worked just fine with exactly the same data (images etc.).
After comparing the project settings, I found out that mine had the option "Record field alignment" (Project > Options > Delphi Compiler > Compiling > Code Generation Options) set to Bytes and that your example had it set to "Quad words".
This option cannot be change in my project, but putting the compiler directives {$A+}{$A8} at the beginning of the tesseractocr.capi file solved the issue for me even when keeping the options set to Bytes in delphi project.
Maybe it should be added by default in the source for it to work independently from the project settings? At least it's a good solution at the moment for me (maybe not the best).
The text was updated successfully, but these errors were encountered:
First, thank you for the work put into TTesseractOCR4 for delphi, that helps a lot!
Actually working on Delphi 11.3.
I just discovered after some testing and debugging, that the record field alignement is important for the dll to work correctly.
For about a day I was trying to implement Tesseract into my project without success, using the same dlls and trained data files as your project examples, I wasn't able to make mine working (always crashing on the recognize call to the api with an adress error), but the example worked just fine with exactly the same data (images etc.).
After comparing the project settings, I found out that mine had the option "Record field alignment" (Project > Options > Delphi Compiler > Compiling > Code Generation Options) set to Bytes and that your example had it set to "Quad words".
This option cannot be change in my project, but putting the compiler directives {$A+}{$A8} at the beginning of the tesseractocr.capi file solved the issue for me even when keeping the options set to Bytes in delphi project.
Maybe it should be added by default in the source for it to work independently from the project settings? At least it's a good solution at the moment for me (maybe not the best).
The text was updated successfully, but these errors were encountered: