This section contains a step-by-step guide to creating an application that captures a single custom data field.
With Real-Time Recognition SDK you can create custom data capture profiles for documents that are not supported out-of-the-box. In corresponding result schemes you define custom data fields. (Currently, only one scheme per profile is supported, and only one field may be defined in the scheme). To tell the recognition engine that some text string is a data value (a field value), you will have to specify a regular expression that should match the strings you are looking for. The value may be a date, some code with a known format, and so on: the more specific the data is, the easier it would be to capture it.
This guide uses an alphanumeric code as an example of data that can be captured. Code format is the following: it contains 15 characters that are either digits or capital letters, and the first two characters are always digits. Example: 69KL46D7WF2AR5U.
Note: Before you begin, see Build your application with the OCR library for iOS.
Note: For details on regular expression syntax supported in ABBYY Real-Time Recognition SDK, see the Regular Expressions section.
An alphanumeric code needs no additional check besides the regular expression. However, there is the option of implementing a block which would perform additional validation after the data has passed the regular expression check, for example, calculate the field's checksum (see the setPredicateBlock: method).
Important! If nil is passed instead of a valid RTRDataScheme object, the data scheme has not yet been matched, which may mean that there is no data of the required type in the area of interest. In this case, the results are not usable.
See the description of classes and methods in the API Reference section.