-
Notifications
You must be signed in to change notification settings - Fork 29
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
Where does TesseditWriteImages output go? #56
Comments
Looking at tesseract's source code, I see this I suspect this isn't called indirectly by any method we currently expose as it requires a filename. Probably the only way to make We don't currently support it here, but it is exposed in the sys crate (unsafe). You could call it from Rust using that. If it's just for some debugging, it may be easier to use the command line version of tesseract. Sorry it's not the most helpful answer, Chris |
Ah.. Thank you for that, I have no experience in C++ so it is a little bit troublesome to go through that codebase. I assume I will have to ditch the LepTess crate and go with the sys crates. Speaking of them, can I work in between them or should I be using leptess::capi instead?
I need this for user debugging as well as for my own immediate feedback on certain things, but thank you.
No no, it's very helpful. I appreciate the quick response too! By the way, how come thresholding_method and others are not exposed in the sys crate? Or do I need to use tesseract_sys::TessBaseAPISetVariable or similar? |
I'm not sure how much you'll be able to mix and match. By the time you're using the sys crate the higher level abstraction may not be that useful to you.
I'm also not familiar with c++ 😅 We mostly only take functions and constants defined in tesseract's c-api. I believe it is possible to use a c++ API from rust, but it uses different techniques. We do import some constants from the C++ API, and could maybe import more. It looks like the |
Fair do's, I'll just go with the capi then.
Ah, of course.. I should have picked that up. I did actually try to use bindgen & other crates to be able to call Tesseract functions from Rust before I found LepTess. Safe to say I took a lot of water over my head on that one. 😅 I definitely believe the capi is more than enough for most cases, but it would be nice to have near to full control at some point. My only real concern at this moment is that it seems that Tesseract still uses the legacy otsu threshold by default. However, I guess it isn't really an issue at the end of the day if I just feed in images that have already been through binarization. |
Hi there!
I'm trying to get the preprocessed image from Tesseract by setting TesseditWriteImages to true like so;
I believe this is correct.
Now the issue is that I do not know exactly where the image goes.. It seems like it should be the current directory from what I've gathered from the Tesseract GitHub repo, but nothing shows up.
I'm using
tessapi.get_utf8_text().unwrap()
and I have also triedtessapi.recognize()
to see if it pops up then, but so far no success.Cheers!
The text was updated successfully, but these errors were encountered: