#126 Ocropus no longer in OCR selection

closed
nobody
None
5
2012-02-23
2012-02-12
Jeff Winner
No

Update to 1.0.1 from 1.0 disables Ocropus with this message from debug

WARN - Found ocroscript, but not its scripts. Disabling.

Version 1.0 is ok with this debug message

INFO - Using ocroscript with recognize.

Discussion

  • Jeffrey Ratcliffe

    Which version of ocropus do you have?

    What does

    echo $OCROSCRIPTS
    which ocroscript
    ls /usr/share/ocropus/scripts /usr/local/share/ocropus/scripts

    give?

     
  • Jeff Winner

    Jeff Winner - 2012-02-14

    ocropus version is 0.3.1-2

    office@office:~$ echo $OCROSCRIPTS

    office@office:~$ which ocroscript
    /usr/bin/ocroscript
    office@office:~$ ls /usr/share/ocropus/scripts /usr/local/share/ocropus/scripts
    ls: cannot access /usr/local/share/ocropus/scripts: No such file or directory
    /usr/share/ocropus/scripts:
    align-lines-wordwise.lua rec-bpnet.lua
    align.lua rec-guided.lua
    align-transcription.lua rec-line.lua
    build-ngram-model.lua rec-ltess.lua
    check-train-valid-bpnet-feature.lua rec-minimal.lua
    degrade.lua recognize.lua
    deskew.lua rec-tess-complete.lua
    editdist.lua reflow.lua
    erode3.lua sauvola.lua
    eval-bpnet-on-words.lua segment-line.lua
    eval-editdist-layout.lua show.lua
    eval-on-word-list.lua showseg.lua
    hocr-to-text.lua strict.lua
    lib text-to-hocr.lua
    line-clean.lua train-bpnet-isolated.lua
    matra-clipping.lua train-bpnet-lines.lua
    rec-bpnet-isolated.lua

     
  • Jeffrey Ratcliffe

    What about:

    [[ -n ${OCROSCRIPTS} ]] && echo "variable is set and not blank"

    ?

     
  • Jeff Winner

    Jeff Winner - 2012-02-17

    [[ -n ${OCROSCRIPTS} ]] && echo "variable is set and not blank"

    returns nothing...

     
  • f_noel

    f_noel - 2012-02-18

    I had the same problem...
    Try changing line 20 in this file:

    /gscan2pdf-1.0.1/lib/Gscan2pdf/Ocropus.pm

    from:
    local $ENV{OCROSCRIPTS} = "$_/share/ocropus/scripts"
    to:
    $ENV{OCROSCRIPTS} = "$_/share/ocropus/scripts"

    That got it working for me.

     
  • Jeffrey Ratcliffe

    Patch

     
  • Jeffrey Ratcliffe

    Thanks for the suggestion. Please test the attached patch, which should fix the problem without changing the environment.

     
  • f_noel

    f_noel - 2012-02-22

    Applied your patch and then copied the new file over to its place in /root. It seems to work okay for me now.

    However Ocropus wont work with a simple binary gif file. A binary G4 tiff (US Patent Office image) and a grayscale png work okay. The black and white gif file creates this in the logfile:

    INFO - Found tesseract language eng
    INFO - Using ocroscript with recognize.
    INFO - tesslanguage=eng ocroscript recognize /tmp/Mx7NMOWh67.png
    ocroscript: /usr/share/ocropus/scripts//lib/hocr.lua:28: rectangle parsing error
    INFO - tesslanguage=eng ocroscript recognize /tmp/WpXZBl1pYA.png
    ocroscript: /usr/share/ocropus/scripts//lib/hocr.lua:28: rectangle parsing error
    INFO - tesslanguage=eng ocroscript recognize /tmp/w46jhcRY9Z.png
    ocroscript: /usr/share/ocropus/scripts//lib/hocr.lua:28: rectangle parsing error

    I switched to GOCR right after that and it worked okay, well it did the best it could with it...

    Not sure but I think that problem may be related to something else which I'll file in a different report.

    Thanks for all your hard work and the patch!

     
  • Jeff Winner

    Jeff Winner - 2012-02-23

    Ok, rebuilt from scratch with patch and it was fixed as expected. Thanks for the great job on this

     
  • Jeffrey Ratcliffe

    • status: open --> closed
     
  • f_noel

    f_noel - 2012-02-23

    Ignore this suggested problem from earlier post:

    > However Ocropus wont work with a simple binary gif file...

    The problem is in Ocropus, it doesn't like something about the contents in the gif file I used for testing this.

    But, you already knew that...

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks