Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors with PageSegMode #12

Open
markwilliams1234 opened this issue Jul 25, 2019 · 2 comments
Open

Errors with PageSegMode #12

markwilliams1234 opened this issue Jul 25, 2019 · 2 comments

Comments

@markwilliams1234
Copy link

I am experiencing errors with some of the constants for PageSegMode when running the example apps, although I have not tested all.

PSM_SINGLE_COLUMN, PSM_SINGLE_BLOCK
Access violation at address 040A4769 in module 'pvt.cppan.demo.google.tesseract.libtesseract-master.dll'. Read of address 00000000.

thread $31cc (TTesseractOCR4.TRecognizerThread):
040a4769 +0e9 pvt.cppan.demo.google.tesseract.libtesseract-master.dll ?error@ERRCODE@@QBAXPBDW4TessErrorLogCode@@0zz

When I create my own apps, I can call recognizetext and it works fine in whatever the default setting is, but when I try and change PageSegMode to any of the constants it causes a floating point operation error at runtime. I assume this is something to do with my Project settings, but insure what.

@markwilliams1234
Copy link
Author

Further testing shows that you can also get the floating point error in the example apps (delphi-vcl-image) if before the call to recognize you comment out the SetRectangle call.

Whilst I can get the example apps to work with most PageSegMode constants, I get floating point errors with my own apps unless I user the form that comes with the Delphi-vclimage in my own app. I physically have to copy the form to my new project. If I recreate it from scratch identically it simply won't work. I have even stripped down the example form so that it contains just the open button and an open dialog and with around 20 lines of code. It works fine as the example form and if I copy and paste the firm into my new project folder. But if I try and create even this very basic form from scratch (ie by copying the contents of the .pas file into my main form pas file and then right clicking on the respective forms to access the .dfm and copying and pasting) I still get floating point errors even though the two forms are completely identical. It has had me scratching my head for some time!

@r1me
Copy link
Owner

r1me commented Jul 13, 2023

PageSegMode crashes could be caused by some internal Tesseract bug, while floating point exceptions are now fixed with 6846137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants