GraphicalCodeDetector.h 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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/graphical_code_detector.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 GraphicalCodeDetector
  16. /**
  17. * The GraphicalCodeDetector module
  18. *
  19. * Member of `Objdetect`
  20. */
  21. CV_EXPORTS @interface GraphicalCodeDetector : NSObject
  22. #ifdef __cplusplus
  23. @property(readonly)cv::Ptr<cv::GraphicalCodeDetector> nativePtr;
  24. #endif
  25. #ifdef __cplusplus
  26. - (instancetype)initWithNativePtr:(cv::Ptr<cv::GraphicalCodeDetector>)nativePtr;
  27. + (instancetype)fromNative:(cv::Ptr<cv::GraphicalCodeDetector>)nativePtr;
  28. #endif
  29. #pragma mark - Methods
  30. //
  31. // bool cv::GraphicalCodeDetector::detect(Mat img, Mat& points)
  32. //
  33. /**
  34. * Detects graphical code in image and returns the quadrangle containing the code.
  35. * @param img grayscale or color (BGR) image containing (or not) graphical code.
  36. * @param points Output vector of vertices of the minimum-area quadrangle containing the code.
  37. */
  38. - (BOOL)detect:(Mat*)img points:(Mat*)points NS_SWIFT_NAME(detect(img:points:));
  39. //
  40. // string cv::GraphicalCodeDetector::decode(Mat img, Mat points, Mat& straight_code = Mat())
  41. //
  42. /**
  43. * Decodes graphical code in image once it's found by the detect() method.
  44. *
  45. * Returns UTF8-encoded output string or empty string if the code cannot be decoded.
  46. * @param img grayscale or color (BGR) image containing graphical code.
  47. * @param points Quadrangle vertices found by detect() method (or some other algorithm).
  48. * @param straight_code The optional output image containing binarized code, will be empty if not found.
  49. */
  50. - (NSString*)decode:(Mat*)img points:(Mat*)points straight_code:(Mat*)straight_code NS_SWIFT_NAME(decode(img:points:straight_code:));
  51. /**
  52. * Decodes graphical code in image once it's found by the detect() method.
  53. *
  54. * Returns UTF8-encoded output string or empty string if the code cannot be decoded.
  55. * @param img grayscale or color (BGR) image containing graphical code.
  56. * @param points Quadrangle vertices found by detect() method (or some other algorithm).
  57. */
  58. - (NSString*)decode:(Mat*)img points:(Mat*)points NS_SWIFT_NAME(decode(img:points:));
  59. //
  60. // string cv::GraphicalCodeDetector::detectAndDecode(Mat img, Mat& points = Mat(), Mat& straight_code = Mat())
  61. //
  62. /**
  63. * Both detects and decodes graphical code
  64. *
  65. * @param img grayscale or color (BGR) image containing graphical code.
  66. * @param points optional output array of vertices of the found graphical code quadrangle, will be empty if not found.
  67. * @param straight_code The optional output image containing binarized code
  68. */
  69. - (NSString*)detectAndDecode:(Mat*)img points:(Mat*)points straight_code:(Mat*)straight_code NS_SWIFT_NAME(detectAndDecode(img:points:straight_code:));
  70. /**
  71. * Both detects and decodes graphical code
  72. *
  73. * @param img grayscale or color (BGR) image containing graphical code.
  74. * @param points optional output array of vertices of the found graphical code quadrangle, will be empty if not found.
  75. */
  76. - (NSString*)detectAndDecode:(Mat*)img points:(Mat*)points NS_SWIFT_NAME(detectAndDecode(img:points:));
  77. /**
  78. * Both detects and decodes graphical code
  79. *
  80. * @param img grayscale or color (BGR) image containing graphical code.
  81. */
  82. - (NSString*)detectAndDecode:(Mat*)img NS_SWIFT_NAME(detectAndDecode(img:));
  83. //
  84. // bool cv::GraphicalCodeDetector::detectMulti(Mat img, Mat& points)
  85. //
  86. /**
  87. * Detects graphical codes in image and returns the vector of the quadrangles containing the codes.
  88. * @param img grayscale or color (BGR) image containing (or not) graphical codes.
  89. * @param points Output vector of vector of vertices of the minimum-area quadrangle containing the codes.
  90. */
  91. - (BOOL)detectMulti:(Mat*)img points:(Mat*)points NS_SWIFT_NAME(detectMulti(img:points:));
  92. //
  93. // bool cv::GraphicalCodeDetector::decodeMulti(Mat img, Mat points, vector_string& decoded_info, vector_Mat& straight_code = vector_Mat())
  94. //
  95. /**
  96. * Decodes graphical codes in image once it's found by the detect() method.
  97. * @param img grayscale or color (BGR) image containing graphical codes.
  98. * @param decoded_info UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
  99. * @param points vector of Quadrangle vertices found by detect() method (or some other algorithm).
  100. * @param straight_code The optional output vector of images containing binarized codes
  101. */
  102. - (BOOL)decodeMulti:(Mat*)img points:(Mat*)points decoded_info:(NSMutableArray<NSString*>*)decoded_info straight_code:(NSMutableArray<Mat*>*)straight_code NS_SWIFT_NAME(decodeMulti(img:points:decoded_info:straight_code:));
  103. /**
  104. * Decodes graphical codes in image once it's found by the detect() method.
  105. * @param img grayscale or color (BGR) image containing graphical codes.
  106. * @param decoded_info UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
  107. * @param points vector of Quadrangle vertices found by detect() method (or some other algorithm).
  108. */
  109. - (BOOL)decodeMulti:(Mat*)img points:(Mat*)points decoded_info:(NSMutableArray<NSString*>*)decoded_info NS_SWIFT_NAME(decodeMulti(img:points:decoded_info:));
  110. //
  111. // bool cv::GraphicalCodeDetector::detectAndDecodeMulti(Mat img, vector_string& decoded_info, Mat& points = Mat(), vector_Mat& straight_code = vector_Mat())
  112. //
  113. /**
  114. * Both detects and decodes graphical codes
  115. * @param img grayscale or color (BGR) image containing graphical codes.
  116. * @param decoded_info UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
  117. * @param points optional output vector of vertices of the found graphical code quadrangles. Will be empty if not found.
  118. * @param straight_code The optional vector of images containing binarized codes
  119. */
  120. - (BOOL)detectAndDecodeMulti:(Mat*)img decoded_info:(NSMutableArray<NSString*>*)decoded_info points:(Mat*)points straight_code:(NSMutableArray<Mat*>*)straight_code NS_SWIFT_NAME(detectAndDecodeMulti(img:decoded_info:points:straight_code:));
  121. /**
  122. * Both detects and decodes graphical codes
  123. * @param img grayscale or color (BGR) image containing graphical codes.
  124. * @param decoded_info UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
  125. * @param points optional output vector of vertices of the found graphical code quadrangles. Will be empty if not found.
  126. */
  127. - (BOOL)detectAndDecodeMulti:(Mat*)img decoded_info:(NSMutableArray<NSString*>*)decoded_info points:(Mat*)points NS_SWIFT_NAME(detectAndDecodeMulti(img:decoded_info:points:));
  128. /**
  129. * Both detects and decodes graphical codes
  130. * @param img grayscale or color (BGR) image containing graphical codes.
  131. * @param decoded_info UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
  132. */
  133. - (BOOL)detectAndDecodeMulti:(Mat*)img decoded_info:(NSMutableArray<NSString*>*)decoded_info NS_SWIFT_NAME(detectAndDecodeMulti(img:decoded_info:));
  134. @end
  135. NS_ASSUME_NONNULL_END