Ir al contenido
Otras versiones

Cargando…

Configuring OCR engine

Esta página aún no está disponible en tu idioma.

OpenKM can work with several OCR engines, like Tesseract.

Tesseract is an Open Source OCR engine adopted by Goggle. It works really well. The OCR natively can read TIFF documents and has hight ratio of recognition with images 300 dpi of resolution and converted to lineart (1 bit color).

The supported image formats are:

  • TIFF
  • PNG
  • JPG
  • GIF
OS Description
Ubuntu and Debian bash<br>$ apt-get install tesseract-ocr tesseract-ocr-eng<br>
Depending on your locale you would like to install other language file.
More information at:
- https://github.com/tesseract-ocr
- https://code.google.com/p/tesseract-ocr/
Red Hat and CentOS More information at:
- https://code.google.com/p/tesseract-ocr/wiki/Compiling
- https://code.google.com/p/python-tesseract/wiki/HowToCompileForCentos
- http://www.vicchiam.com/blog/?p=168
Windows Download from https://code.google.com/p/tesseract-ocr/ and follow the installation wizard.

From command line execute ( where image.jpg should be an existing image file ):

Terminal window
$ tesseract image.jpg text

Go to Administration > Configuration parameters and edit the parameter named system.ocr:

OS
Linux /usr/bin/tesseract ${fileIn} ${fileOut}
or
/usr/bin/tesseract ${fileIn} ${fileOut} -l esp
The parameter -l esp indicate must be used the Spanish language support while executing OCR.
To see all tesseract options execute:
bash<br>$ tesseract<br>
Windows c:\Tesseract-ocr-3.0.2\tesseract.exe ${fileIn} ${fileOut}
or
c:\Tesseract-ocr-3.0.2\tesseract.exe ${fileIn} ${fileOut} -l spa
The parameter -l esp indicate must be used the Spanish language support while executing OCR.
To see all tesseract options execute:
bash<br>c:\Tesseract-ocr-3.0.2> tesseract.exe<br>
  • Parameter ${fileIn} will be replaced internally by image document to be processed.
  • Parameter ${fileOut} will be replaced internally by temporal text file.
  • Can set other additional parameters like -l spa parameter in example.

You can also use an OpenOffice.org dictionary to enhance the OCR process. Can find these language specific dictionaries at OpenOffice.org Dictionary Repository.

Go to Administration > Configuration parameters and edit the parameter named system.openoffice.dictionary:

OS
Linux /home/openkm/dictionary/en-GB.zip
Windows c:\tomcat-7.0.61\dictionary\en-GB.zip

There’s a configuration parameter that force document ocr on rotated document.

Go to Administration > Configuration parameters and edit the parameter named system.ocr.rotate: 

Property Description
system.ocr.rotate The parameter is a collection of degrees separated by character “;”
0;90;180;270;