VietOCR is een Java GUI frontend voor Tesseract OCR engine, het programma levert ondersteuning voor karakterherkenning bij gangbare afbeelding formaten en meerdere pagina afbeeldingen. Het programma heeft nabewerking opties, dat helpt veelvoorkomende fouten in het OCR proces corrigeren, dit zorgt voor betere accuratie op het resultaat. Het programma functioneert ook in command line interface.
Het verwerken van grotere partijen data word nu ondersteund. Het programma controleert de controlemap op nieuwe bestanden en verwerkt deze automatisch via de OCR engine. Het resultaat komt na de letterherkenning in de uitvoer map terecht.
Java Runtime Environment 8 of nieuwer.
Tesseract 3.05 Windows uitvoerbestand word meegeleverd met dit programma. Je kunt als aanvulling nog extra taaldata pakketten voor Tesseract downloaden. Alle bestanden die starten met de code; ISO639-3 kun je plaatsen in de submap tessdata
.
Voor Linux zijn Tesseract en de taaldata pakketten ook verkrijgbaar in de grafische (universele) repository. Je kunt ze installeren via Synaptic of door het volgende commando:
sudo apt-get install tesseract-ocr tesseract-ocr-eng tesseract-ocr-nld
De bestanden zullen in /usr/bin
en /usr/share/tesseract-ocr/tessdata
geplaatst worden. Tenzij tesseract is gebouwd en geïnstalleerd vanaf de source, zullen ze geplaatst worden in /usr/local/bin
en /usr/local/share/tessdata
. Je moet wel de map waarin het Tesseract uitvoerbestand zich bevind opgeven in het VietOCR Instellingen
menu. Als de data op een niet standaard locatie staat zal een softlink naar tessdata
vereist zijn. Je kunt de locatie van tessdata
ook opgeven via de environment variabel TESSDATA_PREFIX
:
export TESSDATA_PREFIX=/usr/local/share/
Voor andere platformen, zie de Tesseract Wiki pagina.
VietOCR ondersteund ook het downloaden en installeren van taaldata pakketten via het Download taaldata menu. Afhankelijk van de locatie van de tessdata
map, kan het nodig zijn om het programma als root of admin uit te voeren om de gedownloade data te installeren. Zoals in de /usr
map in Linux of de C:\Program Files
map in Windows.
Scanning support on Windows is provided via the Windows Image Acquisition Library
v2.0, which requires Windows XP Service Pack 1 (SP1) or later. The library comes
standard with Windows Vista and 7. To install the WIA Library on Windows XP, copy
the wiaaut.dll
file to your System32
directory (usually located
at C:\Windows\System32
) and run from the command line:
regsvr32 C:\Windows\System32\wiaaut.dll
Om gebruik te maken van de scanfunctionaliteit zijn de volgende SANE pakketten vereist op Linux systemen:
sudo apt-get install libsane sane sane-utils libsane-extras xsane
PDF support is possible via GPL
Ghostscript. After installation of the library, please ensure the shared
library object (gsdll32.dll
or libgs.so
) is in the search path
by setting the appropriate environment variable. On Windows, append the following
to Path
value (accessible through Control Panel > System > Advanced
tab > Environment Variables) for GS version 9.20:
Op Linux:
;C:\Program Files\gs\gs9.20\bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
where in /usr/lib
, libgs.so
link to libgs.so.9.20
is located.
Spellcheck functionality is available through Hunspell, whose
dictionary files (.aff
, .dic
) should be placed in dict
folder of VietOCR. user.dic
is an UTF-8-encoded file which contains a list
of custom words, one word per line.
Op linux, kunnen Hunspell en bijbehorende woordenlijsten worden geïnstalleerd door Synaptic of apt
op de volgende manier:
sudo apt-get install hunspell hunspell-en-us
Voer het volgende commando uit om het programma te starten:
java -jar VietOCR.jar
Opmerking: Als u geheugen problemen ervaart kunt u beter het script ocr
gebruiken in plaats van het JAR bestand.
The Vietnamese language data were generated for Times New Roman, Arial, Verdana, and Courier New fonts. Therefore, the recognition would have better success rate for images having similar font glyphs. OCRing images that have font glyphs look different from the supported fonts generally will require training Tesseract to create another language data pack specifically for those typefaces. Language data for some VNI and TCVN3 (ABC) fonts have also been bundled in latest versions.
Images to be OCRed should be scanned at resolution from at least 200 DPI (dot per inch) to 400 DPI in monochrome (black&white) or grayscale. Scanning at higher resolutions will not necessarily result in better recognition accuracy, which currently can be higher than 97% for Vietnamese, and the next release of Tesseract may improve it even further. Even so, the actual rates still depend greatly on the quality of the scanned image. The typical settings for scanning are 300 DPI and 1 bpp (bit per pixel) black&white or 8 bpp grayscale uncompressed TIFF or PNG format.
De schermafbeelding modus zorgt voor betere herkenning bij afbeeldingen met een lage resolutie zoals schermafbeeldingen. In Schermafbeelding modus worden afbeeldingen geschaald naar 300 DPI.
In addition to the built-in text postprocessing algorithm, you can add your own
custom text replacement scheme via a UTF-8-encoded tab-delimited text file named x.DangAmbigs.txt
,
where x is the ISO639-3 language code. Both plain and Regex text replacements are supported.
You can put init-only and non-init control parameters in tessdata/configs/tess_configs
and tess_configvars
files, respectively, to modify Tesseract's
behaviour.
Some built-in tools are provided to merge several images or PDF files into a single one for convenient OCR operations, or to split a TIFF or PDF file into smaller ones if it contains too many pages, which can cause out-of-memory exceptions.
The recognition errors can generally be classified into three categories. Many of the errors are related to the letter cases — for example: hOa, nhắC — which can be easily corrected by popular Unicode text editors. Many other errors are a result of the OCR process, such as missing diacritical marks, wrong letters with similar shape, etc. — huu – hưu, mang – marg, h0a – hoa, la – 1a, uhìu - nhìn. These can also be easily fixed by spell checker programs. The built-in Postprocessing function can help correct many of the aforementioned errors.
The last category of errors is the most difficult to detect because they are semantic errors, which means that the words are valid entries in the dictionary but are wrong in the context — e.g., tinh – tình, vân – vấn. These errors require the editor to read though and manually correct them according to the original image.
Hieronder instructies over hoe de OCR fouten uit de eerste twee categorieën te corrigeren zijn, met behulp van de ingebouwde functionaliteit:
Through the above process, most of common errors can be eliminated. The remaining, semantic errors are few, but it requires a human editor to read though and make necessary edits to make the document like the original scanned document, and error-free if desired.
Voor vragen kunt u een bericht achter laten op het VietOCR Forum.