Developer's Documentation for free mobile OCR SDK

Documentation Menu

RTRDataField class

A recognized data field. Provides field contents, location and data scheme information.

Note that a field may have several components — for example, it can contain two or more words. Component details are available from the components array. Each element of this array is an RTRTextLine object with its own text property (for example, a word) and quadrangle property (the bounding quadrangle of this component). The field's text property contains its entire text, and the field's quadrangle property represents the whole area of a field: this quadrangle encloses the quadrangles of all components.

The components array always contains at least one element. When a field contains only one component, the text and quadrangle properties of the field and this component are identical.

Properties

Name

Type

Description

id

NSString*, read-only

The internal field identifier that you specified when adding the field in the RTRDataSchemeBuilder.

name

NSString*, read-only

The name of the field as specified in the custom data capture profile.

quadrangle

NSArray<NSValue*>*, read-only

The four vertex points of the bounding quadrangle. The vertices are indexed clockwise starting from the bottom left.

Use the NSValue.CGPointValue property to get point coordinates as a CGPoint.

text

NSString*, read-only

The recognized field contents.

components

NSArray<RTRTextLine*>*, read-only

Field components represented by RTRTextLine objects. If the field has only one component, this array contains one element.