SBSTrackedCode Class Reference

Inherits SBSCode.


SBSQuadrilateral predictedLocation
NSTimeInterval deltaTimeForPrediction
BOOL shouldAnimateFromPreviousToNextState
NSString * symbologyString
NSString * symbologyName
SBSSymbology symbology
NSString * data
NSData * rawData
BOOL isRecognized
SBSQuadrilateral location
BOOL isGs1DataCarrier
int symbolCount
SBSCompositeFlag compositeFlag
BOOL isColorInverted

Detailed Description

Represents a recognized/localized barcode/2D code that is being tracked over multiple frames.

The SBSTrackedCode class represents a barcode, or 2D code that is being tracked over multiple frames by the barcode recognition engine.

Property Documentation

- (SBSQuadrilateral) predictedLocation

The predicted location of the tracked code.

The location where the tracked code is predicted to be in SBSTrackedCode::deltaTimeForPrediction

- (NSTimeInterval) deltaTimeForPrediction

The delta time for the predicted location of the code in seconds.

The time (in seconds) it will take the tracked code to move to the predicted location (SBSTrackedCode::predictedLocation). This value can be used to animate the predicted change of location of the tracked code.

- (BOOL) shouldAnimateFromPreviousToNextState

Whether the change in location should be animated.

As there are state transitions that do not guarantee a stable ordering of the location's corners you should always check this function before animating a location change.

- (NSString*) symbologyString

The symbology of the barcode as a string, including GS1 data carrier states.

Codes for which SBSCode::isRecognized is NO, "UNKNOWN" is returned.

- (NSString*) symbologyName

The symbology name of the barcode as a string.

Lower-case symbology name. Codes for which SBSCode::isRecognized is NO, "unknown" is returned. In contrast to SBSCode::symbologyString, the returned symbology does not contain any information on whether the code is a GS1 data carrier, use SBSCode::isGs1DataCarrier for that.
- (SBSSymbology) symbology

Returns the symbology of a recognized barcode.

Codes for which SBSCode::isRecognized is NO return SBSSymbologyUnknown.

- (NSString*) data

The data contained in the barcode/2D code, e.g. the 13 digit number of a EAN-13 code.

For some types of barcodes/2D codes (for example DATAMATRIX, AZTEC, PDF417), the data string may contain non-printable characters and nul-bytes in the middle of the string. SBSCode::data may be nil in these cases. Use SBSCode::rawData if your application scans these types of codes and you are expecting binary/non- printable data.

- (NSData*) rawData

The raw byte data contained in the barcode.

Use this method in case you are encoding binary data in barcodes\2D codes that can not be represented as UTF-8 strings. For codes that are localized but not recognized, nil is returned.

- (BOOL) isRecognized

Whether the code was completely recognized.

This property is true for barcodes that were completely recognized and false for codes that were localized but not recognized. For codes returned by SBSScanSession::newlyRecognizedCodes and SBSScanSession::allRecognizedCodes isRecognized always returns YES, for codes returned by SBSScanSession::newlyLocalizedCodes isRecognized always returns NO.

- (SBSQuadrilateral) location

The location of the code in the image.

The location is returned as a a polygon with 4 corners. The corners are in the coordinate system of the raw preview image. In order to be displayed they must be transformed to the coordinate system of the view. The meaning of the values of topLeft, topRight etc is such that the topLeft point corresponds to the top-left corner of the barcode regardless of how it is oriented in the image.

See also
- convertPointToPickerCoordinates: (SBSBarcodePicker)
- (BOOL) isGs1DataCarrier

Whether the code is a GS1 data carrier.

True if the code is a GS1 data carrier, false if not. False is returned for codes that have only been localized but not recognized.
- (int) symbolCount

The symbol count of this barcode.

Use this value to determine the symbol count of a particular barcode, e.g. to configure the active symbol counts. For localized, but not recognized barcodes as well as 2d codes this property is set to -1.

- (SBSCompositeFlag) compositeFlag

Flag to hint whether the barcode is part of a composite code.

For barcodes that are localized but not recognized, SBSCompositeFlagUnknown is returned.

- (BOOL) isColorInverted

Whether the scanned code is color inverted.

For codes that have been localized but nor recognized, this property is set to NO.


The documentation for this class was generated from the following file: