Developer's Documentation for free mobile OCR SDK

Documentation Menu

DataField 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 a TextLine 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.

final class DataField {
    public final String Id;
    public final String Name;
    public final String Text;
    public final Point[] Quadrangle;
    public final TextLine[] Components;







An array of text fragments representing field components, that is, the fragments found on the image, which constitute the field.



The internal field identifier. Can be one of the predefined fields listed in Data Capture Profiles or the custom field identifier that you specified in the ISchemeBuilder.addField call.

note Note: Predefined data capture profiles are available only in the extended version of the library.



The human-readable name of the field. If you are using a custom data capture profile, this is the name you set with the IFieldBuilder.setName method.



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

note Note: Before recognition, the service rotates the image obtained from camera in order to bring text orientation to normal (horizontal). The vertex coordinates are specified for this rotated image and may require coordinate conversion if you display the quadrangle on the video frame.



The text of the field.