- Obtaining a digital copy of a business card
- Recognizing business cards
- Saving recognized data in a suitable format
Scenario implementation
The code samples provided in this topic are Windows -specific.
Step 1. Loading ABBYY FineReader Engine
Step 1. Loading ABBYY FineReader Engine
To start your work with ABBYY FineReader Engine, you need to create the Engine object. The Engine object is the top object in the hierarchy of the ABBYY FineReader Engine objects and provides various global settings, some processing methods, and methods for creating the other objects.To create the Engine object, you can use the InitializeEngine function. See also other ways to load Engine object (Win).
C#
Step 2. Loading settings for the scenario
Step 2. Loading settings for the scenario
You can load the processing settings suitable for this scenario using the LoadPredefinedProfile method of the Engine object. This method uses the name of a settings profile as an input parameter. Please see Working with Profiles for more information.The settings for this scenario are available in the BusinessCardsProcessing predefined profile:If you wish to change processing settings, use appropriate parameter objects. Please see Additional optimization for specific tasks below for further information.
- Detects only business cards (sets the SynthesizeBusinessCards property of the SynthesisParamsForPage object to TRUE).
- Enables detection of all text on an image, including small text areas of low quality (pictures and tables are not detected).
- Resolution correction is performed.
- Full synthesis of the logical structure of a document is not performed.
C#
Step 3. Loading and preprocessing the images of business cards
Step 3. Loading and preprocessing the images of business cards
To load images to FineReader Engine, you can use the methods of these objects:To load images to the FRDocument object, do one of the following:
- FRDocument
- BatchProcessor for Linux and Windows
Linux and Windows users can learn about the advantages and disadvantages of each approach in Parallel Processing with ABBYY FineReader Engine. The current topic focuses on FRDocument .
- When creating the FRDocument object, use the CreateFRDocumentFromImage method of the Engine object.
- Add images to the created FRDocument object from file (use the AddImageFile, AddImageFileWithPassword, or AddImageFileWithPasswordCallback method).
C#
Step 4. Recognizing business cards
Step 4. Recognizing business cards
To recognize business cards:
- Specify the language of business cards using the SetPredefinedTextLanguage method of the RecognizerParams object. See the list of predefined languages available for business card recognition.
- Set other processing parameters, if necessary. See Tuning Parameters of Page Preprocessing, Analysis, Recognition, and Synthesis.
- Pass the parameters to any of the processing methods (e.g., the Process method of the FRDocument object). The method fills in the collections of business cards of the document and its pages (IFRDocument::BusinessCards, IFRPage::BusinessCards).
You can also synthesize a business card from the whole page or a region on each page using the SynthesizeBusinessCard or SynthesizeBusinessCardEx method of the FRPage object. The method returns a BusinessCard object. Note that in this case, a business card is not added to the collection of business cards of the page. This way is especially useful if you select the way of processing that uses Batch Processor.
C#
Step 5. Working with recognized data
Step 5. Working with recognized data
A recognized business card (the BusinessCard object) can contain the following fields:
You can access each field by its type (FieldByType property) or by its index in the collection of fields (Field property). Each field has the Value property, which provides access to the field value in the string format. For each character in the field, its recognition variants are available (GetCharParams method).Some fields can consist of several components, e.g., the address field can contain zip code, country, USA state, city, street address. To access a field component, you can use the Component property or the FindComponent method. The first one allows you to access the component by its index; the second one finds the component by its type. For each component, you can view its type and value and get parameters and recognition variants for each character (GetCharParams method).
|
|
C#
Step 6. Saving results in vCard format
Step 6. Saving results in vCard format
The BusinessCard object provides the special ExportToVCard method for saving a business card in vCard format. The path to the file is passed as the parameter.You can save business card in any other available export format, for example, in XML.
C#
Step 7. Unloading ABBYY FineReader Engine
Step 7. Unloading ABBYY FineReader Engine
After finishing your work with ABBYY FineReader Engine, you need to unload the Engine object. To do this, use the DeinitializeEngine exported function.
C#
Required resources
You can use the FREngineDistribution.csv file to automatically create a list of files required for your application to function. For processing with this scenario, select in the column 5 (RequiredByModule) the following values: Core Core.Resources Opening Opening, Processing Processing Processing.BCR Processing.OCR Processing.OCR, Processing.ICR Processing.OCR.NaturalLanguages Processing.OCR.NaturalLanguages, Processing.ICR.NaturalLanguages Export Export, Processing If you modify the standard scenario, change the required modules accordingly. You also need to specify the interface languages, recognition languages and any additional features which your application uses (such as, e.g., Opening.PDF if you need to open PDF files, or Processing.OCR.CJK if you need to recognize texts in CJK languages). See Working with the FREngineDistribution.csv File for further details.Additional optimization
These are the sections of the Help file where you can find additional information about setting up the parameters for the various processing stages:- Loading Engine
- Different Ways to Load the Engine Object for Windows
Describes the ways of loading Engine object in detail. - Using ABBYY FineReader Engine in Multi-Threaded Server Applications for Windows
Discusses the specifics of using FineReader Engine in server applications. - Working with Profiles
Provides detailed description of predefined and user profiles.
- Different Ways to Load the Engine Object for Windows
- Recognition
- Tuning Parameters of Preprocessing, Analysis, Recognition, and Synthesis
Customization of document processing using objects of preprocessing, analysis, recognition, and synthesis parameters. - Parallel Processing with ABBYY FineReader Engine for Linux and Windows
You can use another way of document processing which uses Batch Processor.
- Tuning Parameters of Preprocessing, Analysis, Recognition, and Synthesis
- Export
- Tuning Export Parameters
Setting up export with the objects of export parameters. - XMLExportParams Object
This object allows you to set up the saving of recognition results to XML.
- Tuning Export Parameters

