DMSPayloadMetadata


@interface DMSPayloadMetadata : NSObject

Payload Metadata contains additional information for a payload that isn’t releated to the embedded data.

  • Rotation of a given payload. Rotation may be applicable for payloads that are formed by a repeating grid. These payloads don’t have a clear detection bounding box, but the plane of the grid may have an angle relative to the image frame. The value is a float.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) NSNumber *_Nullable rotation;

    Swift

    var rotation: NSNumber? { get }
  • Path representing the region in the image sample buffer that the payload was found in. Only provided for image sample buffers. Normalized between 0..1 for each axis. This region is approximate and may be larger or smaller than the actual code detected. For Digimarc Barcodes, this will be a subregion of the content detected and not the entire content. The accuracy of regions may be improved in future versions of DMSDK. For drawing, the path can be projected into the local co-ordinate space with a CGAffineTransform. The path can also be transformed to a less accurate rect using CGPathGetBoundingBox. Individual points of the path can be retrieved using CGPathApply. See the CGPath documentation for more information.

    Declaration

    Objective-C

    @property (nonatomic, readonly) CF_RETURNS_NOT_RETAINED CGPathRef path;

    Swift

    var path: Int32 { get }
  • Size of the image frame this result was derived from. The image frame size should be the same for all payloads in the same result. Source frame size is provided as part of DMSPayloadMetadata for consistancy with how other metadata is returned. If the result wasn’t derived from image data, like a Digimarc Barcode for Audio, this value will be CGSizeZero. AVFoundation may provide frames in a different orientation that the device. This value should not be assumed to be related to display size or the interface orientation of a device.

    Declaration

    Objective-C

    @property (readonly) CGSize sourceFrameSize;

    Swift

    var sourceFrameSize: Size { get }
  • Distance from the center of where the code was detected, to the center of the detection region as an exponential value. This value is in an undefined unit, and should only be treated as a general guide of which detects are closest to the center of the detection region. Smaller values are closer to the center of the detection region.

    Declaration

    Objective-C

    @property (readonly, nullable) NSNumber *distanceFromCenterSquared;

    Swift

    var distanceFromCenterSquared: NSNumber? { get }