InftyReader: API and Command Line Functionality

1.0 Command Line Application

Also see: Processing images (TIFF/GIF/PNG) through the use of the command line
http://www.inftyreader.org/?p=766

Infty.exe is a command line application option of InftyReader.

It takes binary images of TIF, TIFF(CCITT-3/CCITT-4/LZW), GIF or PNG format with resolution 600DPI (will work much more effectively) or 400DPI as inputs, and returns the recognition result in various formats (KML, IML, HTML, MathML, LaTeX, HRTeX) as outputs.

1.1 Definitions of File Types:

  • IML: ChattyInfty/InftyEditor file for editing. The proprietary format describes the recognition results to these applications.
  • KML: a format that additionally includes character rectangle coordinates and “recognition candidates” information to the IML format.
  • MathML: a standard format worked by W3C (http://www.w3.org/Math/).
  • HRTeX (Human readable TeX) is an output format (*.txt) for visually impaired individuals.

You can control the LaTeX output style editing the “LaTeXOutputSetting.cfg” that is included in the package.

1.2 Licensing:

Infty.exe can be used under the same license agreement as InftyReader. Please see the file License_E.txt/AboutEnterprisePackage_E.txt included in the package.

1.3 Synopsis:

  • Infty -help
  • Infty folderName [fileName1] [fileName2]… [option]…
  • Infty recognizes images specified by `fileName1′, `fileName2′, … in the folder `folderName’.
  • Please be aware that folderName cannot be omitted, and you need to input “Space” after the folderName (not the key “\”).
  • When no file names are specified, all files with the extension .tiff and .tif in the `folderName’ are recognized.
  • The output file is saved in the same folder as the input image files.
  • The default output format is IML.
  • When the number of input files is one, the output file name is the same name as the input file.
  • When the number of input files is more than one, the output file name is the same name as the `foldername’.

1.4 Examples:

  • Infty C:\Data\Images
  • Infty “C:\Document and Settings\user\images” image1.tif
  • Infty C:\Data\Images sample1.tif sample2.tif
  • Infty C:\Data\Images -n test -o C:\OutPut -f kml -f iml
  • Note: The folder name should not be omitted.
  • Note: The folder name should begin with the drive name “C:\….”, “D:\….”.

1.5 Options:

  • -r (400 | 600)
  • specifies the resolution of input images (default 600 dpi). Only 600/400 dpi are acceptable. The resolution is set to 600 dpi when any other value is specified. e.g.) Infty C:\Data\Images sample1.tif -r 400
  • -l (Japanese, English)
  • specifies the language of the texts of input images (default “english”).
  • -f ( iml | kml | tex | html | mathml | hrtex )
  • specifies output formats (default iml). One can get several result files in various formats by specifying several options. e.g.) Inftyr C:\Data\Images sample1.tif -f iml -f kml
  • -fo ( iml | kml | tex | html | mathml | hrtex )
  • specifies output formats (default iml), and open the results by associated applications. e.g.) Infty C:\Data\Images sample1.tif -f iml -f kml
  • -o outputFolderName
  • changes the output folder name where the output file is produced. e.g.) InftyReader C:\Data\Images -o C:\Data\OutPut
  • -n outputFileName
  • changes the output file name. The extension of the file is the output format specified by the option -f. e.g.) Infty C:\Data\Images -n test
  • -imagePDF
  • Set this option if the imput file is PDF created from scanned image.
  • -preamble preambleFile
  • specifies the preamble file used in TeX format output. When no preamble file is specified, “defaultpreamble.tex” in the same folder as “Infty.exe” will be used. In case the preamble tex file is not found, the preamble will be empty in the TeX output. e.g.) InftyReader C:\Data\Images -f tex -preamble C:\Data\preamble.tex
  • -nopreamble
  • Output LaTeX source without preamble. The commands “\begn{document}” and “\end{document}” will also be ommited.
  • -utf8
  • use UTF-8 in TeX format output. In case you select languages other than Japanese and English, the option “-utf8″ is recommended.
  • -saveLIF
  • Save the layout analysis result into LIF file, which can be edited by InftyLayoutViewer.
  • -useLIF
  • Use the layout information (LIF file) edited by InftyLayoutViewer.
  • -useMIF
  • Use the Math/Text segmentation results edited by InftyLayoutViewer.
  • -rect left top right bottom
  • Specify the rectangular area to recognize. Valid only the case of one page recognition. Possible to specify several rects as follows: e.g.) Infty C:\Data\Images sample1.tif -rect 100 100 200 200 -rect 300 100 500 200 -rect 100 300 200 400 …
  • -areatype math
  • Run the recognition considering that the target imaeg of the rects specified include(s) only math expressions.
  • -areatype textOnly
  • Run the recognition considering that the target imaeg of the rects specified do(es) not include math expressions.
  • -schoolmath
  • Run the recognition considering that the math expressions included in the target imaeg of the rects are of the hightschool level.

1.6 Usage samples:

  • Infty C:\Data\Images
  • Infty “C:\Document and Settings\user\images” image1.tif
  • Infty C:\Data\Images sample1.tif sample2.tif
  • Infty C:\Data\Images -n test -o C:\OutPut -f kml -f iml
  • Infty C:\Data\Images RussianTest.tif -l Russian -utf8 -f iml -f tex -preamble C:\Data\preamble.tex

2.0 API Comments:

There are no plans to provide an InftyReader API for JAVA.

If you need to call InftyReader functions from JAVA software, it might be possible to use InftyReader’s command-line functionality, please see:

An API for Visual C++ could be provided with the InftyReader Enterprise version. An overview of the functionality appears below.

Important: Anything done with InftyReader Enterprise must adhere to the licensing restrictions. Here they are, in addition to the costs:

InftyReader Enterprise Version License:

The InftyReader Enterprise license is for business and/or professional use in support of recognizing large volumes of documents. There is no limit imposed on the number of pages per month. The license granted provides permission to deliver InftyReader network services to users on a physical campus or within one company/organization. This license version expressly limits the use of the Software to licensee’s fulltime employees who: 1) are physically located at, and work from within, licensee buildings; and, 2) are using Licensee-owned computers that are permanently connected to a Licensee server (one server only) located within the Licensee’s corporate infrastructure OR grants Licensee permission to integrate the functionality of InftyReader into the licensee’s software and/or services that are being used for internal purposes only. Licensee is prohibited from integrating functionality of InftyReader into software and/or services that are being sold, rented, leased, given away for free, or otherwise provided in any manner to any other individuals, entities, organizations, or companies under any circumstances. $2,500 USD + $40 Shipping and Handling (Secure Transaction Fee)

InftyReader Enterprise Version Maintenance for Second and Beyond Years, Per Year

Maintenance covers the use of InftyReader Enterprise on one server (only) that can serve an unlimited number of computers within the licensed Domain/Infrastructure only
$1,000 USD + $40 Shipping and Handling (Secure Transaction Fee)

Share