-
Notifications
You must be signed in to change notification settings - Fork 744
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
Set Init Only Variables #70
Comments
Sorry at the moment this is not possible since I haven't exposed this part of the api. Which do you think would be more suitable overloading the TesseractEngine constructor to take a dictionary of name/value pairs or a list of properties (Name + Value)? |
Yeah, I think something like an IDictionary would be simple and straightforward for users.
In which case I would say the parameters class would be awesome. I they would all be in a single place and you wouldn't have to dig through documentation to figure them out. |
No I meant something like this:
However I think a simple IDictionary<string, object> would be better. |
I agree. Dictionary is easy and everyone already knows how to use it! Thanks Sent from my Windows Phone From: Charles Weldmailto:notifications@github.com No I meant something like this: public class TesseractProperty
} // Tesseract constructor However I think a simple IDictionary would be better. — |
Quick update in that I've had a look into implementing this. Unfortunately I believe tesseract doesn't expose the functions necessary to do this currently through their C API. I've posted a message on their forum, https://groups.google.com/forum/#!topic/tesseract-ocr/4n876ZNaUrg, to see if we can come up with a potential solution but for now it looks like this is a no go. |
Opps I got the wrong forum, the discussion can be found here: https://groups.google.com/forum/#!topic/tesseract-dev/1YEXPaQVR4E |
Ok, thanks to Zdenko we've made the required changes to the CAPI and can now pass in parameters on init as of commit 4cfa996. Please note as this required changes to the tesseract library this will have to wait till 3.03 is officially released. However if you need this functionality now you can the dev_3.03 branch and build it yourself. |
Awesome! Thanks for looking into this and adding it so quickly! |
This is something I could use as well, so hopefully 3.03 isn't too far off. I see it's in RC, but given that it looks like 3.01 was released in Oct 2011 and 3.02 was released in Oct 2012, we may be in for a wait. In looking at the tesseract API, it looks like the C++ api supports setting INIT variables. Is the C api second class and would it be worthwhile to switch to the C++ api? Good work on this lib though, it's been a big help. |
Yes tesseract does have a fairly long release cycle and their C++ api is On the plus side I've been considering making a 3.03 based release anyway
|
I can't say I blame you, the C++/CLI stuff sometimes seems like an unholy union. Thanks for providing this library, it was a big help. We are at about 97% accuracy using it to parse what are essential serial numbers and we'd be approaching 100% if we could turn off these settings (load_system_dawg and load_freq_dawg) which help since we aren't parsing words. At least that's my understanding anyways. If you decide to go the prerelease route that incorporates 3.03, I'd be all over that. I do see where they indicate some of the latest distros (Ubuntu 14.04) are shipping 3.03, so apparently it's stable enough for them. Not surprising that it's stable given the slow release cycle. |
Is is possible to set an init only variable before creating a new instance of TesseractEngine?
The examples I'm looking at are load_system_dawg and load_freq_dawg.
https://code.google.com/p/tesseract-ocr/wiki/ControlParams
The text was updated successfully, but these errors were encountered: