RecAPI
List of RecAPI C samples

This page lists all C samples of RecAPI. Some of these samples are supported on: Windows, see the description of each sample for this information.

Sample 1: INITIALIZATION OF THE ENGINE.

Engine specific parameters.
Inquiry on Version and Serial numbers.
Inquiry on resident status of recognition modules.
Engine Timeout.
Modules of the Engine.
Termination of the Engine.

Sample 2: LOADING A LOW-RESOLUTION 24-BIT COLOR IMAGE FROM AN IMAGE FILE.

Inquiry on attributes of the image.
Convert the image to B/W with Resolution Enhancement option.
Saving the image in PNG format.
Getting textual and supplementary error information.

Sample 3: IMAGE PRE-PROCESSING IN ONE STEP: INVERTING, DESKEWING AND ROTATING.

Loading a B/W image from a one-page image file.
Forcing image inversion, automatic image rotation and deskewing.
Saving the pre-processed image.

Sample 4: IMAGE PREPROCESSING STEPS PERFORMED SEPARATELY.

Loading a noisy B/W image from a one-page image file.
Step 1: Despeckling the image.
Step 2: Rotating the image.
Step 3: Inverting the image.
Step 4: Deskewing the image.
Saving the pre-processed image.

Sample 5: SAVING PART OF AN IMAGE.

Loading a B/W image from a one-page image file.
Saving a portion of the image using a different image file format.

Sample 6: CREATING MULTI-PAGE IMAGE FILES.

Loading B/W images from one-page image files.
Saving the images into a single multi-page image file.
Inquiring the number of pages in a multi-page image file.

Sample 7: DISPLAYING AN IMAGE ON THE SCREEN.

Loading B/W images from one-page image files.
Exporting an image portion for displaying purposes.

Sample 8: RECOGNITION, CODE PAGES AND OUTPUT FORMATS.

Loading a B/W image from a one-page image file.
Enumeration of available code pages and output formats.
Specifying code page, output format and rejection symbol.
Converting a character code to its Unicode value.
Recognition and conversion to the output file specified.

Sample 9: RECOGNITION OF A MULTI-LINGUAL DOCUMENT.

Loading a B/W image from a one-page image file.
Specifying the Language environment (language selection and LanguagesPlus characters)
Recognition.
Conversion to Microsoft Word, retaining formatting information.

Sample 10: RECOGNITION USING CHARACTER SET FILTERING.

Loading a B/W image from a one-page image file.
Specifying the Language environment as the English characters.
Applying filters and the FilterPlus characters.
Saving all settings to a settings file for future use.
Recognition and conversion to the final output document.

Sample 11: RECOGNIZING, RECOGNITION STATISTICS.

Quick-recognizing a B/W one-page image file.
Inquiry and display of recognition statistics.

Sample 12: FORM PROCESSING VIA LFR.

Loading an unfilled, master form. Analyzing its layout and saving it as embedded form-template.
Loading a filled-in form of the same type and applying the saved form template on it.
Recognizing the filled-in form and accessing the recognition results through memory.
Saving the recognition result to an ASCII text file.

Sample 13: RECOGNIZING DOCUMENTS COMPILED FROM SEVERAL ONE-PAGE IMAGE FILES.

Recognizing B/W pages from several one-page image files.
Setting output format and code page. Wordprocessor output (Microsoft Word).

Sample 14: RECOGNIZING FROM MULTI-PAGE IMAGE FILE.

Recognizing all pages from a B/W multi-page image file.
Setting output format and code page.

Sample 15: HANDLING GRAY IMAGES. ADAPTIVE THRESHOLDING WHEN LOADING.

Loading a gray image file with automatic adaptive thresholding.
Recognition.

Sample 16: HANDLING GRAY IMAGES. SPECIFYING THRESHOLD VALUE.

Loading a grayscale image file with a specified threshold value.
Recognition.

Sample 17: WORKING WITH THE SCANNING MODULE.

Supported on: Windows.

Initializing and terminating the scanning module.
Inquiry on scanner characteristics.

Sample 18: SCANNING IN BLACK AND WHITE. ADJUSTING SCANNER SETTINGS.

Supported on: Windows.

Scanning a page in B/W, specifying some scanner parameters (resolution, brightness).
Saving the scanned image.

Sample 19: SCANNING IN BLACK AND WHITE WITH DEFAULT SCANNER SETTINGS.

Supported on: Windows.

Scanning a page in B/W with default scanner settings.
Recognizing the scanned image.

Sample 20: SCANNING IN GRAY. ADJUSTING SCANNER SETTINGS.

Supported on: Windows.

Inquiring and specifying different scanner parameters (resolution, grayscale level, brightness,
contrast, dropout color, scanning area). Scanning the gray image. Saving the image in gray.

Sample 21: SCANNING WITH ADF (Automatic Document Feeder).

Supported on: Windows.

Getting B/W pages from the scanner's ADF one after another with default scanner settings.
Handling missing or empty ADF situations.
Saving the pages into a multiple-page image file.

Sample 22: LINE-BY-LINE IMAGE TRANSFER (EXPORT)

Defining a portion of a B/W image.
Line-by-line transfer of a rectangular part of the image to the application through memory.

Sample 23: HANDLING ZONES. PAGE-LAYOUT ANALYSIS (AUTO-ZONING).

Loading a B/W image, auto-zoning.
Saving the zones to a zone file, loading another zone file, then recognizing the image.

Sample 24: AUTO-ZONING. ZONE PROPERTY DISPLAY.

Loading a B/W image, auto-zoning.
Retrieving and displaying zone properties.

Sample 25: INSERTING, UPDATING AND DELETING ZONES.

Loading a B/W image, auto-zoning.
Inserting a new zone, updating (modifying) an existing one and deleting a zone.

Sample 26: RECOGNIZING WITH CHECKING. SPELL CHECKING ENGLISH TEXT.

Setting the parameters of the checker to recognize and check English text.
Quick-recognizing a B/W image from a one-page image file and saving it.

Sample 27: SETTING TRADE-OFF. RECOGNIZING WITH CHECKING. SPELL CHECKING GERMAN TEXT.

Setting the parameters of the checker to recognize and check German text.
Specifying recognition trade-off.
Quick-recognizing a B/W image from a one-page image file.

Sample 28: LIST-TYPE ATTRIBUTES OF THE CAPTURE SDK.

Listing modules of the Engine, selectable languages,
code pages, installed language dictionaries, available output formats.

Sample 29: LOW LEVEL CUSTOM FORMATTING.

Recognizing an image into the memory.
Accessing low level recognition information (LETTER structures), manipulating it.
Custom converting the text into a file.

Sample 30: HANDWRITTEN NUMERAL RECOGNITION.

Supported on: Windows.

Defining a page-sized zone for handwritten numeral recognition.
Defining a local filter to validate digits only, excluding the plus and minus signs, the comma and the period.
Recognizing handwritten numbers from a B/W image.

Sample 31: HANDWRITTEN TEXT RECOGNITION.

Supported on: Windows.

Loading a B/W image containing handwritten English text.
Creating a page-sized zone for handwritten text recognition.
Defining a local filter to validate uppercase letters and digits only.
Recognizing and saving the result.

Sample 32: RECOGNIZING WITH UD-CHECKING. MAINTAINING THE USER DICTIONARY.

Creating a new user dictionary.
Adding items to the user dictionary.
Converting character codes to UNICODE.
Recognition using the user dictionary only.

Sample 33: SCANNING WITH AUTOMATIC ADAPTIVE THRESHOLDING.

Supported on: Windows.

Asking whether the scanner supports grayscale.
Scanning in gray.
During the loading process the image will be automatically converted to B/W.
Saving the loaded image.

Sample 34: LETTER STRUCTURE OUTPUT. RECOGNIZING OPTICAL MARKS.

Loading an image. Loading a Zone file.
Recognizing optical marks (checkboxes) using Letter structure output (memory).
Displaying the result.

Sample 35: RECOGNIZING BARCODES.

Getting information about the current setting of the barcode recognition module.
Specifying requested barcode type(s).
Loading an image. Loading a Zone file.
Recognizing the barcode. Displaying the result and the type of the barcode.

Sample 36: SCANNING IN COLOR. TRANSFORMING A COLOR IMAGE.

Supported on: Windows.

Scanning a page in color with default parameters.
Specifying scanning area.
Transforming the original image to other image types and resolutions.
Saving the transformed images.

Sample 37: DEPRECATED SAMPLE

Sample 38: DEPRECATED SAMPLE

Sample 39: CHANGING THE RECOGNITION DATA BEFORE EXPORTING.

Supported on: Windows.

Recognizing an image into the memory.
Suspect levels: influencing the indication of uncertain character marking.
Accessing and manipulating the low level recognition information in memory.
Updating the recognition data.
Converting into the final output document.

Sample 40: RECOGNIZING MICR (E-13B) ZONE.

Supported on: Windows.

Loading a B/W image from a one-page image file.
Specifying the MICR-specific characters.
Recognition.
Conversion to UNICODE plain text file.

Sample 41: 3D DESKEW.

Loading a 3D-distorted image file. Creating a 3D deskewed copy using the ImageFile object.
Loading the corrected image through memory. Performing recognition.
Exporting the results in plain text format.

Sample 42: RECOGNIZING IN TWO LANGUAGES WITH TWO SETTINGS COLLECTIONS.

Creating two Settings Collections for English and German recognition.
Loading an English and a German image.
Recognition.
Writing letters to text files.

Sample 43: ENUMERATING OUTPUT FORMATS.

Initializing by RecApiPlus engine.
Getting all the output format strings.

Sample 44: DOCUMENT OBJECT CREATING AND LOADING.

Creating a new document object.
Loading and recognizing a new page.
Adding this new page to this document.
Saving the document.

Sample 45: DOCUMENT CREATING, OPENING, INSERTING PAGE, UPDATING PAGE AND DELETING PAGE.

Supported on: Windows.

Creating a new document object.
Loading and recognizing a new page.
Adding this new page to this document.
Updating the document with a new image.
Reloading the document.
Deleting a page from the document.
Calculating number of pages before and after the delete.

Sample 46: DOCUMENT CONVERTING AND HANDLING OF SETTINGS FROM KERNELAPI.

Creating a new document object.
Loading a new page.
Preprocessing this page and recognizing it in fast mode.
Adding this page to the document.
Setting the output format.
Converting the document.

Sample 47: DOCUMENT CONVERTING AND HANDLING OF SETTINGS FROM CPP WRAPPER API.

(This does the same as Sample46, but in another way.)
Creating a new document object.
Loading a new page.
Preprocessing this page and recognizing it in fast mode.
Adding this page to the document.
Setting the output format.
Converting the document.

Sample 48: WORKFLOW-BASED PROCESSING\n(WORKFLOW CREATED BY VISUAL TOOLBOX).

Supported on: Windows.

Create an empty document object.
Execute Sample41.xwf workflow:

  • Loading an image (prompt for input)
  • Recognizing (in English)
  • Proofreading
  • Exporting results (prompt for output - defaulting to PDF, Save and Launch)

Sample 49: ACCESSING TABLE STRUCTURE INFORMATION.

Create an empty document. Load an image containing a table.
Perform decomposition, look for tables only.
Perform recognition, access OCR Zone table information.

Sample 50: RECOGNITION OF A JAPANESE DOCUMENT.

Loading the image (TIF, not compressed).
Specifying the Language environment.
Recognition.
Conversion to RTF (flowing page) format.

Sample 51: RECOGNIZING VERTICAL TEXT.

Creating a new document.
Loading a new page.
Preprocessing this page and recognizing it.
Adding this page to the document.
Setting the output format.
Converting the document.

Sample 52: DIGITAL CAMERA.

Loading a 3D distorted digital camera image.
Setting 3D deskew mode. Performing preprocess.
Saving the corrected image. Performing recognition.
Exporting the results in plain text format.

Sample 53: TEXT REDACTION.

Loading and recognizing a simple page.
Searching for a string, then redacting it.
Searching for another string and marking for redaction.
Redacting the marked words in one operation.
Exporting to RTF format.

Sample 54: XPS INPUT, XPS AND DOCX OUTPUT.

Supported on: Windows.

Loading and recognizing an XPS file.
Saving to XPS image-only format.
Recognizing and exporting to XPS and DocX format.

Sample 55: FORM DATA EXTRACTION.

Supported on: Windows.

Processing 4 filled forms and saving output in CSV file.
Template file FormTemplate.PDF is used.

Sample 56: RECOGNIZING DATAMATRIX(2D) BARCODE.

Getting information about the current setting of the Bar code recognition modules.
Setting the default recognition module.
Specifying requested barcode type.
Setting output format.
Loading an image. Loading a Zone file.
Recognizing the barcode.
Displaying the result, the type and the location of the barcode.

Sample 57: RECOGNIZING FROM MULTI-PAGE IMAGE FILE WITH DIRECT TEXT OUTPUT.

Recognizing all pages from a multi-page image file.
Saving output to a single text file.

Sample 58: INITIALIZING RECPDF, LOADING A PDF FILE AND GETTING THE NUMBER OF PAGES.

Initializing the PDF manager API - RecPDF.
Loading a PDF file, and getting the number of its pages.

Sample 59: DELETING A PAGE FROM A PDF FILE USING RECPDF.

Create a 2-page file, then delete the first page by RecPDF.

Sample 60: PDF FILES IN OPERATION USING RECPDF.

Enumerating the PDF files previously added to an operation.
Getting the operation to where the PDF files are assigned.

Sample 61: APPENDING A PDF FILE FROM MULTIPLE PDF FILES USING RECPDF.

Appending pages to a PDF file from multiple sources.

Sample 62: ADDING A HPAGE TO A PDF FILE VIA RECPDF.

Adding a page loaded by KernelAPI to a PDF file opened by RecPDF.
Merging text into a recently added image-only page in the PDF file.

Sample 63: RECOGNIZE IMAGE ONLY PDF AND MERGE RECOGNIZED TEXT USING RECPDF.

Load PDF file and recognize it.
Load PDF file with RecPDF and merge recognized text to it.
Execute operation.

Sample 64: FORM TEMPLATE MATCHING.

Load Form Template Library, created by FormTemplateEditor.
Load Load and Apply Template on two input files.
Extract Form field text.

Sample 65: USING SCANNER ENHANCEMENT TECHNOLOGY TOOLS WITH AND WITHOUT UI.

Supported on: Windows.

Sample 66: MAKE AN EXISTING IMAGE ONLY PDF SEARCHABLE.

Load a page from an image only PDF file.
Preprocess and recognize this page.
Write back the result to the PDF making it searchable.

Sample 67: CREATE A SEARCHABLE PDF IMAGE FROM A JPEG STREAM.

Load a JPEG stream.
Preprocess and recognize the page.
Create a PDF from the original JPEG stream and the recognized text.

Sample 68: SETTING COMPRESSION LEVELS FOR PDF/JPG/JP2 OUTPUTS.

Load a page and save it at different compression levels. Create PDF, JPG and JP2 outputs.

Sample 69: BURNING PDF ANNOTATION TO A TIFF.

Load a annotated PDF page.
Save the image to a TIFF file.