I am working on exactly the same project, I came to post how to ask to static link dll into class file that is the result of a javac run.
I have a great number of resources already in place and am working deep in the issue this morning. I have some code up at "member's home page" link on the drop-down list .... there is partial interest in doing OCR from Java but a great depth of issues needs to be carefully reviewed in detail - no end in sight just yet but I welcome any effort you may be able to do.
dosadi has provided non-trivial assitance, but reports that there is not traffic enough on the issue to provide basis for significant effort. I posted there under EZTwain and as well at twain dot org under
:: View topic - From Java with user interface Twain
( url tags are not working )
EZTwain is a simplified call header for twain.
There is also something called tesseract ( which is something from the 90's that has laid unused at hp ) at which issue #93 is to provide a Java wrapper for tesseract. Their approach stuck on passing native buffer locations without getting into insistence on wrapping the data as numerics in the compiler.
I have an hp all-in-one that we can use for proto and test during development - right at this moment the issues are endianess and reading DIB's returned by the calls: ( such as )
|
Code:
|
HANDLE EZTAPI TWAIN_AcquireNative(HWND hwndApp, unsigned wPixTypes); |
What I am working on right now is doing the calls into the jvm correctly using
|
Code:
|
/*
* Class: ocr_zarf
* Method: zarf_AcquireNative
* Signature: ()[B
*/
__declspec(dllexport) jbyteArray __stdcall Java_ocr_zarf_zarf_1AcquireNative (JNIEnv * JEnvironmentPointer, jobject jayObject){} |
If you can work on anything anywhere in this, please let me know at fa8298b8 {ampersand} g - mail .....