Dictionary

Objective-C

@interface Dictionary : NSObject

Swift

class Dictionary : NSObject

Dictionary/Set of markers. It contains the inner codification

bytesList contains the marker codewords where

  • bytesList.rows is the dictionary size
  • each marker is encoded using nbytes = ceil(markerSize*markerSize/8.)
  • each row contains all 4 rotations of the marker, so its length is 4*nbytes

bytesList.ptr(i)[k*nbytes + j] is then the j-th byte of i-th marker, in its k-th rotation.

Member of Aruco

Methods

  • Transform list of bytes to matrix of bits

    Declaration

    Objective-C

    + (nonnull Mat *)getBitsFromByteList:(nonnull Mat *)byteList
                              markerSize:(int)markerSize;

    Swift

    class func getBitsFromByteList(byteList: Mat, markerSize: Int32) -> Mat
  • Transform matrix of bits to list of bytes in the 4 rotations

    Declaration

    Objective-C

    + (nonnull Mat *)getByteListFromBits:(nonnull Mat *)bits;

    Swift

    class func getByteListFromBits(bits: Mat) -> Mat
  • See

    generateCustomDictionary

    Declaration

    Objective-C

    + (nonnull Dictionary *)create_from:(int)nMarkers
                             markerSize:(int)markerSize
                         baseDictionary:(nonnull Dictionary *)baseDictionary
                             randomSeed:(int)randomSeed;

    Swift

    class func create(nMarkers: Int32, markerSize: Int32, baseDictionary: Dictionary, randomSeed: Int32) -> Dictionary
  • See

    generateCustomDictionary

    Declaration

    Objective-C

    + (nonnull Dictionary *)create_from:(int)nMarkers
                             markerSize:(int)markerSize
                         baseDictionary:(nonnull Dictionary *)baseDictionary;

    Swift

    class func create(nMarkers: Int32, markerSize: Int32, baseDictionary: Dictionary) -> Dictionary
  • See

    generateCustomDictionary

    Declaration

    Objective-C

    + (nonnull Dictionary *)create:(int)nMarkers
                        markerSize:(int)markerSize
                        randomSeed:(int)randomSeed;

    Swift

    class func create(nMarkers: Int32, markerSize: Int32, randomSeed: Int32) -> Dictionary
  • See

    generateCustomDictionary

    Declaration

    Objective-C

    + (nonnull Dictionary *)create:(int)nMarkers markerSize:(int)markerSize;

    Swift

    class func create(nMarkers: Int32, markerSize: Int32) -> Dictionary
  • See

    getPredefinedDictionary

    Declaration

    Objective-C

    + (nonnull Dictionary *)get:(int)dict;

    Swift

    class func get(dict: Int32) -> Dictionary
  • Draw a canonical marker image

    Declaration

    Objective-C

    - (void)drawMarker:(int)id
            sidePixels:(int)sidePixels
                  _img:(nonnull Mat *)_img
            borderBits:(int)borderBits;

    Swift

    func drawMarker(id: Int32, sidePixels: Int32, _img: Mat, borderBits: Int32)
  • Draw a canonical marker image

    Declaration

    Objective-C

    - (void)drawMarker:(int)id sidePixels:(int)sidePixels _img:(nonnull Mat *)_img;

    Swift

    func drawMarker(id: Int32, sidePixels: Int32, _img: Mat)
  • Declaration

    Objective-C

    @property Mat* bytesList

    Swift

    var bytesList: Mat { get set }
  • Declaration

    Objective-C

    @property int markerSize

    Swift

    var markerSize: Int32 { get set }
  • Declaration

    Objective-C

    @property int maxCorrectionBits

    Swift

    var maxCorrectionBits: Int32 { get set }