【问题标题】:Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 31489 Tess-two致命信号 11 (SIGSEGV),代码 1,tid 31489 中的故障地址 0x0 Tess-two
【发布时间】:2017-12-26 20:26:52
【问题描述】:

这段代码有这个错误

  public MyTessOCR(Context context)
  {
    this.context = context ;

    //initialize Tesseract API
    String language = "eng";
    datapath = this.context.getFilesDir()+ "/tesseract/";
    mTess = new TessBaseAPI();

    checkFile(new File(datapath + "tessdata/"));
    mTess.setDebug(true);

    mTess.init(datapath, language); // it crashes here 

    Log.d("OK","OK");

}

我已尝试更改 eng.traineddata 但仍然?

奇怪的是,当我创建一个新项目并运行完全相同的代码时,它可以工作。它不起作用的项目有点旧(2岁)。 也许有更新要做?

它在这里失败了:

       boolean success = nativeInitOem(datapath, language, ocrEngineMode); //ocrEngineMode = 3 

【问题讨论】:

标签: android tess-two


【解决方案1】:

最后,问题出在 eng.traineddata 上。 我仍在使用旧的,为什么如果文件夹中有一个,我的函数不会复制它。旧的还在文件夹里。

【讨论】:

  • 那么我们是否应该更改checkFile 方法来覆盖traindata 文件?
猜你喜欢
  • 2016-05-17
  • 2021-11-01
  • 1970-01-01
  • 2017-01-05
  • 2017-11-05
  • 2018-03-29
  • 2021-10-16
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多