-
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
[Feature Request] Provide examples: preprocessing with leptonica / capi #59
Comments
Hello, I'm looking into this, and will try and get the test added after a few modifications. It's quite early here, so please forgive any mistakes. The first hurdle is that I'll continue this later. |
No reason not to and it makes them consistent with the others. Plus I need it for Pix in order to call scale on it: houqp/leptess#59 Remove the unsafe from pix_get_data. Getting a pointer isn't unsafe (but dereferencing it will be).
As suggested here https://doc.rust-lang.org/std/convert/trait.AsRef.html#reflexivity Required for houqp/leptess#59
It needed support to be able to get the mut pointer from leptonica-plumbing ccouzens/leptonica-plumbing@4a721e7 And for leptonica-plumbing pix to self reference ccouzens/leptonica-plumbing@545708c It uses this so that methods can take AsRef<LeptonicaPlumbing::Pix> which both leptess and leptonica-plumbing satisfy. Addresses #59
Yeah, I don't think it was possible when you raised this issue. I had to make 2 changes in leptonica-plumbing and am making the following change here: |
Yeah I was suspecting as much. Thank you! |
Hi, this is both question and request for more documentation:
How do I actually use leptonica to preprocess the image?
In none of the examples, and in none of the projects dependency-linked by GitHub did I manage to find any actual usage of leptonica / capi functions. The only leptonica function i found in use is the pix_read wrapper function.
I'm struggling to understand how one is supposed to use the capi together with the leptess api.
This is mainly due to the different Pix types
Here is a simple example to demonstrate what I am confused about:
Running this simple example results in mismatched types error:
Please excuse me for any oversights on my part if there are any.
Regardless, I think it would be valuable to add examples on how to use the capi properly.
The text was updated successfully, but these errors were encountered: