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

32位平台,使用 tess_model 模型,调用 OcrAuto 报错 #153

Open
jicaiyu opened this issue Sep 16, 2024 · 2 comments
Open

32位平台,使用 tess_model 模型,调用 OcrAuto 报错 #153

jicaiyu opened this issue Sep 16, 2024 · 2 comments

Comments

@jicaiyu
Copy link

jicaiyu commented Sep 16, 2024

Describe the bug
注册 op 插件: 成功
OP 插件创建成功, 版本: 0.4.5.0
OcrWrapper::OcrWrapper()
error: LoadLibraryA false:�Ҳ���ָ����ģ�顣

如果使用 64位时是正常的

环境:
1.8_32 位 JDK
op_x86.dll
image

注册的代码
public class RegisterOp {
private static volatile int result = 0;
// 加载本地库
public interface ToolsLibrary extends Library {
String absolutePath = FileUtils.getAbsolutePath("/op/x32/tools_86.dll");
ToolsLibrary INSTANCE = (ToolsLibrary) Native.load(absolutePath, ToolsLibrary.class);
int setupA(String path, String format);
}

public static void register () {
    if (result == 0) {
        String absolutePath = FileUtils.getAbsolutePath("/op/x32/op_x86.dll");
        result = ToolsLibrary.INSTANCE.setupA(absolutePath, "UTF-16");
        Console.log("注册 op 插件: {}", result == 1? "成功": "失败");
    }
}

}

@WallBreaker2
Copy link
Owner

目录里面是否有对应的tess_engine.dll呢

@r3inbowari
Copy link

遇到这种问题还是建议用 Process Monitor 捕捉加载日志看看是缺了哪个dll

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

3 participants