YAGF - graphical front-end for cuneiform and tesseract
YAGF is a graphical interface for cuneiform and tesseract text recognition tools on the Linux platform. With YAGF you can scan images via XSane, import pages from PDF documents, perform images preprocessing and recognize texts using cuneiform from a single command centre. YAGF also makes it easy to scan and recognize several images sequentially.
System Requirements
Manual
Download YAGF
Digitizing text with YAGF consists of several stages: images acquisition, images preprocessing (if necessary), the recognition itself, and saving the results.
You can recognize text from the images stored on your hard drive, or you can scan new images and pass them to YAGF directly. Use File/Open Image... command to load an image from your hard drive (you can load several image files at once). You can also drop image files on the dark side bar on the left side of the program's main window (or simply on the program's icon if the program is not running yet). YAGF supports all major raster graphics formats (JPEG, PNG, BMP, TIFF, GIF, PNM, PPM, PBM). If the loaded file's name is in the form nameXXX.ext, where XXX is some number, you can move between previous/next file in series with the navigation buttons. For example, if you have loaded the file named MyPage06.jpg, the "Move to next image" button will try to open the next file, that is, MyPage07.jpg. All the opened images will be displayed on the image bar.
If your system's clipboard contains an image, you can paste it to YAGF using an appropriate command.
You can acquire images directly from a scanner using XSane. While in YAGF, choose File/Scan command. XSane program will be started. Set up the scanning options with XSane and press XSane's "Scan" button. When the scanning is done the scanned image is opened in the YAGF image viewing window. If you want to scan several pages, you can repeat these operation several times. Each time the last scanned image will be shown in the YAGF image viewing window. You can move to previous images using navigation buttons. You can keep XSane window open while working with YAGF. When you exit YAGF this window will be closed automatically. In order to navigate between scanned images use navigation buttons as it was described above. All acquired images are shown as thumbnails on the image bar. You can save these images into a separate directory using Save button on the image bar.
You can also acquire pages from unencripted PDF files. Use "File|Import from PDF..." command. You will be propted for a PDF document name and the number of pages you want to import (the whole document or some range of pages). Then you will be prompted to select an empty directory to save imported pages. You may create one in the process.
There are several preprocessing options available in YAGF. You can rotate loaded images if they are not positioned correctly. Images may be rotated by 90 degrees (counter-) clockwise and by 180 degrees. There are special buttons for this at the top of the image-viewing window. If you don't want to recognize an entire page but rather some part of it, you can select a rectangular block for recognition (more than one block may be selected). The block is selected in the image-viewing window with mouse. Simply hold the left mouse button down and start dragging. Release the button when you are done. Repeate the operation to select another block (keep in mind that blocks cannot overlap). If you click with the left mouse button at come block its color chages to pink and it becomes resizable. You can resize it by dragging mouse pointer on its edge. If you click the image with the right mouse button, the context menu will appear. In this menu you can select one of several options to clear all blocks, to delete the block you clicked on or to recognize the text in the block you clicked.
If the scanned image is skewed, you can deskew it by pressing the Correct skew button. The image will be rotated so that text lines go in parallel with the window boundaries. This will make it easier to select text blocks and recognize text. You can also use a selected block of text as a pattern for deskewing. Select the text block you want to be deskewed (the bigger the block the better), right-click on it and select the Deskew Block command from the context menu.
You can also split the scanned text image into blocks automatically. Press the "Split text into blocks" button or select the command of the same name from the context menu. The blocks will be added to the image selecting text columns and paragraphs. Sometimes you have to deskew the image before splitting text into blocks but if the scanned page lies straight you can split it without additional deskewing. Note that when you call automatic text splitting, all blocks added before will be removed.
There is a "prepare for recgnition button" button that combines several page-prepaation tasks (page skew elimination, block-splitting) into a single step.
Now you can select the OCR tool to use (cuneiform or tesseract). This is done with the menu "Settings|OCR Settings" command. The tesseract OCR engine allows recognition in some languages not supported by cuneiform (Greek, Turkish, Hebrew, Finnish and so on). The list of available languages in the language selection box depends on the OCR engine chosen.
Before recognizing text you should select the recognition language (or a language paire if the document to be recognized is written in several languages).
Each newly recognized text fragment is added to the recognized text editor window at the end of the already recognized text as a new paragraph.annot find a dictionary for the selected recognition language. Turn spell-checking off if you don't want to see these warnings.
If you have several images opened in your Image bar, you can use batch recognition to recognize text from all the images in a sequence. Click "Recognize All Pages" button. If the are blocks selected on the pages, only the text in the blocks will be recognized during the batch recognition. If the pages loaded into YAGF have diffrent scale or orientation or different blocks selected on them, YAGF will remember this information until the program is running. The images will be automatically loaded and recognized one after another and the progress dialog will appear. You can stop the recognition process by clicking the progress dialog's Abort button.
You can save all acquiored pages, their modifications and selected blocks as a project for the later work. Go to File menu and select the Save Project command. New dialog box will appear prompting you to select the directory where the project will be saved. The directory for a new should be empty. You can also reate a new directory from the dialog box. After ou have selected the directory all the open images and project settings will be saved there. To load previously saved project go to the File menu and select the Load project command. Oce agan the dialog box will appear where you will be able to select the project's directory. You can also save the reopened project using the same command that you use to save a new project. Currently recognised text is not saved with the projects. It should be saved separately.
The recognized text may be saved to disc as a text or html file in UTF-8 encoding or copied to the clipboard. The "Copy to Clipboard" btton copies either a selected text fragment or the whole text if no fragment is selected.
Source Code (requires CMake to build):
yagf-0.9.2.tar.gz
The project SVN repository and bug tracker are available at http://code.google.com/p/yagf
Contact me: anb@symmetrica.net
If you like this page, please press the button: