Dictionary.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. //
  2. // This file is auto-generated. Please don't modify it!
  3. //
  4. #pragma once
  5. #ifdef __cplusplus
  6. //#import "opencv.hpp"
  7. #import "opencv2/objdetect.hpp"
  8. #import "opencv2/objdetect/aruco_dictionary.hpp"
  9. #else
  10. #define CV_EXPORTS
  11. #endif
  12. #import <Foundation/Foundation.h>
  13. @class Mat;
  14. NS_ASSUME_NONNULL_BEGIN
  15. // C++: class Dictionary
  16. /**
  17. * Dictionary/Set of markers, it contains the inner codification
  18. *
  19. * BytesList contains the marker codewords where:
  20. * - bytesList.rows is the dictionary size
  21. * - each marker is encoded using `nbytes = ceil(markerSize*markerSize/8.)`
  22. * - each row contains all 4 rotations of the marker, so its length is `4*nbytes`
  23. *
  24. * `bytesList.ptr(i)[k*nbytes + j]` is then the j-th byte of i-th marker, in its k-th rotation.
  25. *
  26. * Member of `Objdetect`
  27. */
  28. CV_EXPORTS @interface Dictionary : NSObject
  29. #ifdef __cplusplus
  30. @property(readonly)cv::Ptr<cv::aruco::Dictionary> nativePtr;
  31. #endif
  32. #ifdef __cplusplus
  33. - (instancetype)initWithNativePtr:(cv::Ptr<cv::aruco::Dictionary>)nativePtr;
  34. + (instancetype)fromNative:(cv::Ptr<cv::aruco::Dictionary>)nativePtr;
  35. #endif
  36. #pragma mark - Methods
  37. //
  38. // cv::aruco::Dictionary::Dictionary()
  39. //
  40. - (instancetype)init;
  41. //
  42. // cv::aruco::Dictionary::Dictionary(Mat bytesList, int _markerSize, int maxcorr = 0)
  43. //
  44. - (instancetype)initWithBytesList:(Mat*)bytesList _markerSize:(int)_markerSize maxcorr:(int)maxcorr;
  45. - (instancetype)initWithBytesList:(Mat*)bytesList _markerSize:(int)_markerSize;
  46. //
  47. // bool cv::aruco::Dictionary::readDictionary(FileNode fn)
  48. //
  49. // Unknown type 'FileNode' (I), skipping the function
  50. //
  51. // void cv::aruco::Dictionary::writeDictionary(FileStorage fs, String name = String())
  52. //
  53. // Unknown type 'FileStorage' (I), skipping the function
  54. //
  55. // bool cv::aruco::Dictionary::identify(Mat onlyBits, int& idx, int& rotation, double maxCorrectionRate)
  56. //
  57. /**
  58. * Given a matrix of bits. Returns whether if marker is identified or not.
  59. *
  60. * It returns by reference the correct id (if any) and the correct rotation
  61. */
  62. - (BOOL)identify:(Mat*)onlyBits idx:(int*)idx rotation:(int*)rotation maxCorrectionRate:(double)maxCorrectionRate NS_SWIFT_NAME(identify(onlyBits:idx:rotation:maxCorrectionRate:));
  63. //
  64. // int cv::aruco::Dictionary::getDistanceToId(Mat bits, int id, bool allRotations = true)
  65. //
  66. /**
  67. * Returns the distance of the input bits to the specific id.
  68. *
  69. * If allRotations is true, the four posible bits rotation are considered
  70. */
  71. - (int)getDistanceToId:(Mat*)bits id:(int)id allRotations:(BOOL)allRotations NS_SWIFT_NAME(getDistanceToId(bits:id:allRotations:));
  72. /**
  73. * Returns the distance of the input bits to the specific id.
  74. *
  75. * If allRotations is true, the four posible bits rotation are considered
  76. */
  77. - (int)getDistanceToId:(Mat*)bits id:(int)id NS_SWIFT_NAME(getDistanceToId(bits:id:));
  78. //
  79. // void cv::aruco::Dictionary::generateImageMarker(int id, int sidePixels, Mat& _img, int borderBits = 1)
  80. //
  81. /**
  82. * Generate a canonical marker image
  83. */
  84. - (void)generateImageMarker:(int)id sidePixels:(int)sidePixels _img:(Mat*)_img borderBits:(int)borderBits NS_SWIFT_NAME(generateImageMarker(id:sidePixels:_img:borderBits:));
  85. /**
  86. * Generate a canonical marker image
  87. */
  88. - (void)generateImageMarker:(int)id sidePixels:(int)sidePixels _img:(Mat*)_img NS_SWIFT_NAME(generateImageMarker(id:sidePixels:_img:));
  89. //
  90. // static Mat cv::aruco::Dictionary::getByteListFromBits(Mat bits)
  91. //
  92. /**
  93. * Transform matrix of bits to list of bytes in the 4 rotations
  94. */
  95. + (Mat*)getByteListFromBits:(Mat*)bits NS_SWIFT_NAME(getByteListFromBits(bits:));
  96. //
  97. // static Mat cv::aruco::Dictionary::getBitsFromByteList(Mat byteList, int markerSize)
  98. //
  99. /**
  100. * Transform list of bytes to matrix of bits
  101. */
  102. + (Mat*)getBitsFromByteList:(Mat*)byteList markerSize:(int)markerSize NS_SWIFT_NAME(getBitsFromByteList(byteList:markerSize:));
  103. //
  104. // C++: Mat cv::aruco::Dictionary::bytesList
  105. //
  106. @property Mat* bytesList;
  107. //
  108. // C++: int cv::aruco::Dictionary::markerSize
  109. //
  110. @property int markerSize;
  111. //
  112. // C++: int cv::aruco::Dictionary::maxCorrectionBits
  113. //
  114. @property int maxCorrectionBits;
  115. @end
  116. NS_ASSUME_NONNULL_END