Dev Center
Swift
Objective-C
Table of contents

DSBarcodeResultItem Class

DSBarcodeResultItem extends the DSCapturedResultItem class and represents a single barcode result. This is the most basic item of the decoded barcode result, one of the captured result types that the Capture Vision Router can output.

Definition

Assembly: DynamsoftBarcodeReader.xcframework

  • Objective-C
  • Swift
  1. @interface DSBarcodeResultItem: DSCapturedResultItem
    
  2. class BarcodeResultItem : DSCapturedResultItem
    

Attributes

Attributes Type Description
format DSBarcodeFormat The format of the barcode.
formatString NSString * The format text of the barcode.
text NSString * The decode text of the barcode.
bytes NSData * The decode byte of the barcode.
location DSQuadrilateral * The location of the barcode.
confidence NSInteger The confidence of the decoding result.
angle NSInteger The rotation angle of the barcode.
moduleSize NSInteger The module size of the barcode.
details DSBarcodeDetails * The details of the decoded barcode.
isDPM BOOL Specifies if the decoded barcode is a DPM code or not.
isMirrored BOOL Specifies if the decoded barcode is mirrored or not.

The following attributes are inherited from DSCapturedResultItem.

Attributes Type Description
type DSCapturedResultItemType The type of the captured result item.
referencedItem DSCapturedResultItem * The referenced captured result item. The reference dependencies is defined in the Capture Vision settings.
targetROIDefName NSString The name of the TargetROIDef object which includes a task that generated the result.
taskName NSString The name of the task that generated the result.

format

The format of the barcode. This format will be one of the DSBarcodeFormat enumerations.

  • Objective-C
  • Swift
  1. @property(nonatomic, readonly) DSBarcodeFormat format;
    
  2. var format: DSBarcodeFormat { get }
    

formatString

The format of the barcode, but as a string instead of a DSBarcodeFormat enumeration item.

  • Objective-C
  • Swift
  1. @property(nonatomic, nullable, readonly) NSString *formatString;
    
  2. var formatString: String? { get }
    

text

The raw decoded text of the barcode.

  • Objective-C
  • Swift
  1. @property(nonatomic, nullable, readonly) NSString *text;
    
  2. var text: String? { get }
    

bytes

The raw bytes of the decoded barcode text which is useful when the text string cannot be used.

  • Objective-C
  • Swift
  1. @property(nonatomic, nullable, readonly) NSData *bytes;
    
  2. var bytes: Data? { get }
    

location

The location of the barcode as a DSQuadrilateral. The quadrilateral contains the four vertices of the location, with the first vertex in the points array being the top-left most vertex, and then going in a clockwise direction.

  • Objective-C
  • Swift
  1. @property(nonatomic, nullable, readonly) DSQuadrilateral *location;
    
  2. var location: DSQuadrilateral? { get }
    

confidence

The confidence of the decoded result, which is a measure of the result’s accuracy or reliability. If the confidence is lower than 30, the result will not be output by default. To change the minimum accepted confidence score for a barcode, please see the minResultConfidence setting.

  • Objective-C
  • Swift
  1. @property(nonatomic, readonly) NSInteger confidence;
    
  2. var confidence: Int { get }
    

angle

If the barcode is captured at an angle or is rotated by any measure, this property represents the rotation angle of the barcode.

  • Objective-C
  • Swift
  1. @property(nonatomic, readonly) NSInteger angle;
    
  2. var angle: Int { get }
    

moduleSize

The size of the individual modules or elements within the barcode.

  • Objective-C
  • Swift
  1. @property(nonatomic, readonly) NSInteger moduleSize;
    
  2. var moduleSize: Int { get }
    

details

The details of the decoded barcode. DSBarcodeDetails can offer much more enhanced details specific to the barcode format of the decoded barcode. If you would like to learn more about how you can use these barcode details, please see this article on how to get detailed barcode info.

  • Objective-C
  • Swift
  1. @property(nonatomic, nullable, readonly) DSBarcodeDetails *details;
    
  2. var details: DSBarcodeDetails? { get }
    

isDPM

Specifies if the decoded barcode is a Direct Part Marking (DPM) code or not. To learn how to read DPM codes, please visit how to read DPM codes.

  • Objective-C
  • Swift
  1. @property(nonatomic, readonly) BOOL isDPM;
    
  2. var isDPM: Bool { get }
    

isMirrored

Specifies if the decoded barcode is mirrored or not. Mirrored barcodes are read by setting the MirrorMode.

  • Objective-C
  • Swift
  1. @property(nonatomic, readonly) BOOL isMirrored;
    
  2. var isMirrored: Bool { get }
    

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version
    • Version 10.x
      • Version 10.2.1100
      • Version 10.2.1101
      • Version 10.2.10
      • Version 10.0.21
      • Version 10.0.20
      • Version 10.2.10
      • Version 10.0.21
      • Version 10.0.20
    • Version 9.x
      • Version 9.6.40
      • Version 9.6.20
      • Version 9.6.11
      • Version 9.6.10
      • Version 9.6.0
      • Version 9.4.0
      • Version 9.2.11
      • Version 9.2.10
      • Version 9.0.2
      • Version 9.0.1
      • Version 9.0.0
      • Version 9.6.40
      • Version 9.6.20
      • Version 9.6.10
      • Version 9.6.0
      • Version 9.4.0
      • Version 9.2.13
      • Version 9.2.10
      • Version 9.0.2
      • Version 9.0.1
      • Version 9.0.0
    • Version 8.x
      • Version 8.9.3
      • Version 8.9.1
      • Version 8.9.0
      • Version 8.8.0
      • Version 8.6.0
      • Version 8.4.0
      • Version 8.2.1
      • Version 8.2.0
      • Version 8.1.2
      • Version 8.1.0
      • Version 8.0.0
      • Version 8.9.3
      • Version 8.9.1
      • Version 8.9.0
      • Version 8.8.0
      • Version 8.6.0
      • Version 8.4.0
      • Version 8.2.1
      • Version 8.2.0
      • Version 8.1.2
      • Version 8.1.0
      • Version 8.0.0
    • Version 7.x
      • Version 7.6.0
      • Version 7.5.0
      • Version 7.6.0
      • Version 7.5.0
    • Documentation Homepage
    Change +