Other Constants

The following constants are available globally.

  • Option key that instructs the reader to attach the frame that the detection was performed on to the read result. The default value is discard all. Frames that are passed as part of the read result will only be valid inside of the result callback block. A delay on the queue that result callbacks are being dispatched to could result in a high amount of memory being consumed as read results wait for processing. Use the frames with results options to mitigate memory usage issues and only return images when necessary. For detectors that require multiple sample buffers, such as audio detectors, the retained sample buffer will be only the most recent sample buffer used to finalize the detection.

    Declaration

    Objective-C

    extern const DMSReaderOptionKey DMSReaderOptionFrameRetentionKey

    Swift

    static let frameRetentionKey: ReaderOptionKey
  • Discard all sample buffers after processing. Read results will always contain a nil value for the sample buffer property.

    Declaration

    Objective-C

    static const DMSReaderFrameRetentionOption
        DMSReaderFrameRetentionOptionDiscardAll = 0

    Swift

    static let discardAll: ReaderFrameRetentionOption
  • Retain all sample buffers after processing. Read results will always contain a value for the sample buffer property.

    Declaration

    Objective-C

    static const DMSReaderFrameRetentionOption
        DMSReaderFrameRetentionOptionRetainAll = 1

    Swift

    static let retainAll: ReaderFrameRetentionOption
  • Retain all sample buffers after processing when a result is detected in the sample buffer. Read results will contain a value for the sample buffer property only when a detection result is found.

    Declaration

    Objective-C

    static const DMSReaderFrameRetentionOption
        DMSReaderFrameRetentionOptionRetainSampleBuffersWithResults = 2

    Swift

    static let retainSampleBuffersWithResults: ReaderFrameRetentionOption
  • Retain all sample buffers after processing when a result is detected in the sample buffer. Read results will contain a value for the sample buffer property only when a new detection result is found.

    Declaration

    Objective-C

    static const DMSReaderFrameRetentionOption
        DMSReaderFrameRetentionOptionRetainSampleBuffersWithNewResults = 3

    Swift

    static let retainSampleBuffersWithNewResults: ReaderFrameRetentionOption
  • The domain for any errors returned from a reader

    Declaration

    Objective-C

    extern NSErrorDomain _Nonnull const DMSErrorDomain

    Swift

    let DMSErrorDomain: String
  • Option key for setting the inverted read interval rate as an NSNumber. Some symbologies, such as the barcode symbologies, need to be configured to detect white-on-black codes in addition to black-on-white codes. Inverted codes will be read at an interval of 1/value, where 0 will configure applicable symbologies to never detect inverted symbols.

    Declaration

    Objective-C

    extern const DMSReaderOptionKey DMSReaderOptionImageReaderInvertedReadInterval

    Swift

    static let imageReaderInvertedReadInterval: ReaderOptionKey
  • Option key for setting a detection type. Refer to the DMSImageDetectionType constants for possible options.

    Declaration

    Objective-C

    extern const DMSReaderOptionKey DMSReaderOptionImageReaderDetectionType

    Swift

    static let imageReaderDetectionType: ReaderOptionKey
  • Option key for configuring if the detector is allowed to skip frames for performance reasons. It’s recommended to pass true for this value unless a developer has an overriding reason not to, like implementing their own frame skipping or reading from a source other than a video stream. Generally an image reader does not need to read every frame at 30 fps or higher to get a reliable detection.

    Declaration

    Objective-C

    extern const DMSReaderOptionKey DMSReaderOptionImageReaderAllowFrameSkipping

    Swift

    static let imageReaderAllowFrameSkipping: ReaderOptionKey
  • Option key for configuring the read distances of tranditional barcodes such as 1D and QR codes. Reading at further distances is more expensive. Use DMSReadDistance for available options. The value for this key is an NSNumber object containing an integer value.

    Declaration

    Objective-C

    extern const DMSReaderOptionKey DMSReaderOptionImageReader1DBarcodeReadDistance

    Swift

    static let imageReader1DBarcodeReadDistance: ReaderOptionKey
  • Option key for configuring the minimum detectable length of a ITF barcode. Default value is 10. This value must be even, must be at least 8, and cannot be more than 24. Attempting to set an unsupported value will result in an exception. The value for this key is an NSNumber object containing an integer value.

    Declaration

    Objective-C

    extern const DMSReaderOptionKey
        DMSReaderOptionImageReaderITFBarcodeMinimumLength

    Swift

    static let imageReaderITFBarcodeMinimumLength: ReaderOptionKey
  • Option key for enabling plastics reading mode which will search for Digimarc Barcodes on plastic substrates. This reader option is off by default. The value for this key is a Bool.

    Declaration

    Objective-C

    extern const DMSReaderOptionKey DMSReaderOptionImageReaderEnablePlasticsReading

    Swift

    static let imageReaderEnablePlasticsReading: ReaderOptionKey
  • Do a detection on an image that will attempt to balance speed and efficiency with the number of places to look in the frame. This is the recommended detection type for live video. Results may not be consistent with the same input.

    Declaration

    Objective-C

    static const DMSImageDetectionType DMSImageDetectionTypeQuick = 0

    Swift

    static let quick: ImageDetectionType
  • @b Beta. Detection type for exhaustively searching an image. This may be an extremely expensive operation based on the image size, but the results will always be complete and consistent. Recommended for images that are not part of a video stream.

    Declaration

    Objective-C

    static const DMSImageDetectionType DMSImageDetectionTypeThorough = 1

    Swift

    static let thorough: ImageDetectionType
  • @b Beta. Detection type for exhaustively searching an image by it’s width and height, but not by distance. Calibrated for images captured 4-6 inches away from a mobile device camera. More expensive than quick detection, but still suitable for most mobile devices. This detection type should be used for diagnostic applications on camera feeds. Because it is calibrated for a specific capture distance, this detection type may not be suitable for still image content.

    Declaration

    Objective-C

    static const DMSImageDetectionType DMSImageDetectionTypeThoroughLimitedRange = 2

    Swift

    static let thoroughLimitedRange: ImageDetectionType
  • The typical best case for a detector. Currently always defaults to quick detection. This may change in future versions as more detection types are added. Using the default detection type is generally the best option for developers, but if you are absolutely sure a specific detection type will always be best, you should use that detection type and not rely on the value of this default.

    Declaration

    Objective-C

    static const DMSImageDetectionType DMSImageDetectionTypeDefault =
        DMSImageDetectionTypeQuick

    Swift

    static let `default`: ImageDetectionType
  • The price of the item in local currency. Amount payable for variable measure trade. Value is a NSDecimalNumber. Float and Double may not have enough precision to correctly represent this value. String conversion should be done by passing this value directly to a Number Formatter as an NSDecimalNumber type.

    Declaration

    Objective-C

    extern const DMSPayloadRepresentationType
        DMSPayloadRepresentationTypeAmountPayable

    Swift

    static let amountPayable: PayloadRepresentationType
  • The weight of the item in pounds. Value is a NSDecimalNumber. Float and Double may not have enough precision to correctly represent this value. String conversion should be done by passing this value directly to a Number Formatter as an NSDecimalNumber type.

    Declaration

    Objective-C

    extern const DMSPayloadRepresentationType
        DMSPayloadRepresentationTypeWeightInPounds

    Swift

    static let weightInPounds: PayloadRepresentationType
  • The weight of the item in kilograms. Value is a NSDecimalNumber. Float and Double may not have enough precision to correctly represent this value. String conversion should be done by passing this value directly to a Number Formatter as an NSDecimalNumber type.

    Declaration

    Objective-C

    extern const DMSPayloadRepresentationType
        DMSPayloadRepresentationTypeWeightInKilograms

    Swift

    static let weightInKilograms: PayloadRepresentationType
  • The count of items. Value is an integer.

    Declaration

    Objective-C

    extern const DMSPayloadRepresentationType DMSPayloadRepresentationTypeCount

    Swift

    static let count: PayloadRepresentationType
  • The sell by date. Value is a Date.

    Declaration

    Objective-C

    extern const DMSPayloadRepresentationType DMSPayloadRepresentationTypeSellByDate

    Swift

    static let sellByDate: PayloadRepresentationType
  • The representation contains a variable measure value from within a GTIN 14 value. Thse values are identified by their prefixes, GS1 Variable Measure Numbers (VMNs). However, the value returned will not contain this prefix. Value is a string.

    Declaration

    Objective-C

    extern const DMSPayloadRepresentationType
        DMSPayloadRepresentationTypeVariableMeasure

    Swift

    static let variableMeasure: PayloadRepresentationType
  • Deprecated

    DMSPayloadRepresentationTypeGIAI is deprecated. The value can be accessed via AI 8004 in the GS1 Attributes property.

    Global Individual Asset Identifier. Value is a string.

    Declaration

    Objective-C

    extern const DMSPayloadRepresentationType DMSPayloadRepresentationTypeGIAI

    Swift

    static let GIAI: PayloadRepresentationType
  • Deprecated

    DMSPayloadRepresentationTypeGIAICompanyPrefix. The value is a substring of AI 8004 (GIAI) in the GS1 Attributes property.

    Global Individual Asset Identifier Company Prefix Value is a string.

    Declaration

    Objective-C

    extern const DMSPayloadRepresentationType
        DMSPayloadRepresentationTypeGIAICompanyPrefix

    Swift

    static let GIAICompanyPrefix: PayloadRepresentationType
  • Deprecated

    DMSPayloadRepresentationTypeGIAIAssetID. The value is a substring of AI 8004 (GIAI) in the GS1 Attributes property.

    Global Individual Asset Identifier Asset ID. Value is a string.

    Declaration

    Objective-C

    extern const DMSPayloadRepresentationType
        DMSPayloadRepresentationTypeGIAIAssetID

    Swift

    static let GIAIAssetID: PayloadRepresentationType
  • Contains the raw text value of the ITF code. Available if the symbology is an ITF 14 or ITF Variable Length code. Value is a string..

    Declaration

    Objective-C

    extern const DMSPayloadRepresentationType DMSPayloadRepresentationTypeITF

    Swift

    static let ITF: PayloadRepresentationType
  • Deprecated

    DMSReaderOptionDisableAnalytics is deprecated. Setting it will have no effect.

    Option key for disabling analytics. Digimarc will normally collect some anonymous statistics such as device and operating system information for diagnostics. If you are configuring multiple readers, and want to disable data collection for all of them, provide this option for each reader. Usage of the Resolver class to communicate with Digimarc’s backend will implicitly result in data disclosure, regardless of this option. See our privacy documentation for more information. Default value is true. The value for this key is an NSNumber object containing an boolean value.

    Declaration

    Objective-C

    extern const DMSReaderOptionKey DMSReaderOptionDisableAnalytics

    Swift

    static let disableAnalytics: ReaderOptionKey
  • The key for the value that returns a bitmask representing the symbologies that could not be processed due to the error.

    Declaration

    Objective-C

    extern DMSReaderErrorUserInfoKey _Nonnull const DMSReaderErrorAffectedSymbologiesUserInfoKey

    Swift

    static let affectedSymbologies: ReaderErrorUserInfoKey