SBSTrackedCode Class Reference

Inherits SBSCode.

Properties

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
readnonatomicassign

The predicted location of the tracked code.

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

Since
5.2.0
- (NSTimeInterval) deltaTimeForPrediction
readnonatomicassign

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.

Since
5.2.0
- (BOOL) shouldAnimateFromPreviousToNextState
readnonatomicassign

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.

Since
5.2.0
- (NSString*) symbologyString
readnonatomicassigninherited

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
readnonatomicassigninherited

The symbology name of the barcode as a string.

Returns
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.
Since
4.10.0
- (SBSSymbology) symbology
readnonatomicassigninherited

Returns the symbology of a recognized barcode.

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

- (NSString*) data
readnonatomicassigninherited

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
readnonatomicassigninherited

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
readnonatomicassigninherited

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
readnonatomicassigninherited

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
readnonatomicassigninherited

Whether the code is a GS1 data carrier.

Returns
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.
Since
4.10.2
- (int) symbolCount
readnonatomicassigninherited

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
readnonatomicassigninherited

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
readnonatomicassigninherited

Whether the scanned code is color inverted.

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

Since
5.5.0

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