Captured Field

Defined in framework ScanditLabelCapture

SDCLabelField
@interface SDCLabelField : NSObject

Added in version 6.0.0

name
@property (nonatomic, nonnull, readonly) NSString *name

Added in version 6.0.0

The field name. Unique within a label, for example barcode-a, or price. The names are defined when defining the label.

type
@property (nonatomic, readonly) SDCLabelFieldType type

Added in version 6.0.0

Identifies the type of the captured field type. This either returns SDCLabelFieldTypeBarcode, or SDCLabelFieldTypeText. Depending on the type, further information such as captured data is available through the following properties:

predictedLocation
@property (nonatomic, readonly) SDCQuadrilateral predictedLocation

Added in version 6.0.0

The location of the captured field inside the image. These coordinates will need to be converted to view coordinates before they can be visualized. When the field’s state is SDCLabelFieldStateUnknown, a quadrilateral with all points set to (0,0) is returned.

state
@property (nonatomic, readonly) SDCLabelFieldState state

Added in version 6.0.0

The field state. For fields that have been captured SDCLabelFieldStateCaptured is returned. For fields whose location has been predicted, SDCLabelFieldStatePredicted is returned. For fields whose location could not be predicted, SDCLabelFieldStateUnknown is returned.

isRequired
@property (nonatomic, readonly) BOOL isRequired

Added in version 6.0.0

Whether the captured field is required. This property is NO for optional fields.

barcode
@property (nonatomic, nullable, readonly) SDCBarcode *barcode

Added in version 6.0.0

The barcode associated to this captured field. This property is nil when the type is not equal to SDCLabelFieldTypeBarcode.

text
@property (nonatomic, nullable, readonly) NSString *text

Added in version 6.0.0

The text associated to this captured field. This property is nil when the type is not equal to SDCLabelFieldTypeText.

JSONString
@property (nonatomic, nonnull, readonly) NSString *JSONString

Added in version 6.4.0

Returns the JSON representation of the label field.