Menu

OCR in NAP2, how to make sure I am using latest OCR engine?

2020-11-02
2021-01-31
  • Erick Arturo Perez

    Hi,
    is there a way to update or otherwise make sure NAP2 is using the latest OCR engine?

     
  • Janos Kreis

    Janos Kreis - 2020-11-10

    Hi Erick. This is exactly what i want to achieve too. NAPS2 is using Tesseract OCR Engine. It is implemented in v6.1.2 as 4.0.0-beta3. But there is a more performant and stable release. v5.0.0-alpha. Can be found at https://github.com/UB-Mannheim/tesseract/wiki. But these are installers only and until now, I didn't find any reference in the files of NAPS2 where the path is pointing to. The original path for tesseract with the installation of NAPS2 is C:\Users\%USERNAME%\AppData\Roaming\NAPS2\components\tesseract-4.0.0b4\w64 . There is a 4 MB tesseract.exe located. But in the v5.0.0 of tesseract, it can only be found as a 1 MB file. Maybe we can unite our forces for find a hack until the new version with updated tesseract engine is released through NAPS2.... Looking forward to hear from you.

     
  • gappi

    gappi - 2021-01-31

    Hi,
    I had a similar requirement and did the following:

    The most easiest approach to build Tesseract yourself is to do the following:

    • Download and install Microsoft Visual Studio Express 2017 on Windows 64 bit
    • Download and Install git Client (64 bit)
    • Setup vcpkg with the following commands
    git clone https://github.com/microsoft/vcpkg
    .\vcpkg\bootstrap-vcpkg.bat
    
    • Build Tesseract with static linking with the following commands:
    vcpkg install tesseract:x64-windows-static
    vcpkg install tesseract:x86-windows-static
    
    • Create the following directory structure under the NAPS2 program files installation directory and put the Tesseract binaries you just built in the appropriate "w32" and "w64" directories and the training files (can be downloaded from NAPS or Tesseract site) in the "best" and "fast" directories.
    components
       tesseract-4.0.0b4
          best
          fast
          w32
          w64
    
    • Change the following line within the NAPS "appsettings.xml"
      <ComponentsPath>%PROGRAMFILES(X86)%\NAPS 2\components</ComponentsPath>
    

    Done.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.