QRCodeDetector.h 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  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. #else
  9. #define CV_EXPORTS
  10. #endif
  11. #import <Foundation/Foundation.h>
  12. @class Mat;
  13. NS_ASSUME_NONNULL_BEGIN
  14. // C++: class QRCodeDetector
  15. /**
  16. * The QRCodeDetector module
  17. *
  18. * Member of `Objdetect`
  19. */
  20. CV_EXPORTS @interface QRCodeDetector : NSObject
  21. #ifdef __cplusplus
  22. @property(readonly)cv::Ptr<cv::QRCodeDetector> nativePtr;
  23. #endif
  24. #ifdef __cplusplus
  25. - (instancetype)initWithNativePtr:(cv::Ptr<cv::QRCodeDetector>)nativePtr;
  26. + (instancetype)fromNative:(cv::Ptr<cv::QRCodeDetector>)nativePtr;
  27. #endif
  28. #pragma mark - Methods
  29. //
  30. // cv::QRCodeDetector::QRCodeDetector()
  31. //
  32. - (instancetype)init;
  33. //
  34. // void cv::QRCodeDetector::setEpsX(double epsX)
  35. //
  36. /**
  37. * sets the epsilon used during the horizontal scan of QR code stop marker detection.
  38. * @param epsX Epsilon neighborhood, which allows you to determine the horizontal pattern
  39. * of the scheme 1:1:3:1:1 according to QR code standard.
  40. */
  41. - (void)setEpsX:(double)epsX NS_SWIFT_NAME(setEpsX(epsX:));
  42. //
  43. // void cv::QRCodeDetector::setEpsY(double epsY)
  44. //
  45. /**
  46. * sets the epsilon used during the vertical scan of QR code stop marker detection.
  47. * @param epsY Epsilon neighborhood, which allows you to determine the vertical pattern
  48. * of the scheme 1:1:3:1:1 according to QR code standard.
  49. */
  50. - (void)setEpsY:(double)epsY NS_SWIFT_NAME(setEpsY(epsY:));
  51. //
  52. // bool cv::QRCodeDetector::detect(Mat img, Mat& points)
  53. //
  54. /**
  55. * Detects QR code in image and returns the quadrangle containing the code.
  56. * @param img grayscale or color (BGR) image containing (or not) QR code.
  57. * @param points Output vector of vertices of the minimum-area quadrangle containing the code.
  58. */
  59. - (BOOL)detect:(Mat*)img points:(Mat*)points NS_SWIFT_NAME(detect(img:points:));
  60. //
  61. // string cv::QRCodeDetector::decode(Mat img, Mat points, Mat& straight_qrcode = Mat())
  62. //
  63. /**
  64. * Decodes QR code in image once it's found by the detect() method.
  65. *
  66. * Returns UTF8-encoded output string or empty string if the code cannot be decoded.
  67. * @param img grayscale or color (BGR) image containing QR code.
  68. * @param points Quadrangle vertices found by detect() method (or some other algorithm).
  69. * @param straight_qrcode The optional output image containing rectified and binarized QR code
  70. */
  71. - (NSString*)decode:(Mat*)img points:(Mat*)points straight_qrcode:(Mat*)straight_qrcode NS_SWIFT_NAME(decode(img:points:straight_qrcode:));
  72. /**
  73. * Decodes QR code in image once it's found by the detect() method.
  74. *
  75. * Returns UTF8-encoded output string or empty string if the code cannot be decoded.
  76. * @param img grayscale or color (BGR) image containing QR code.
  77. * @param points Quadrangle vertices found by detect() method (or some other algorithm).
  78. */
  79. - (NSString*)decode:(Mat*)img points:(Mat*)points NS_SWIFT_NAME(decode(img:points:));
  80. //
  81. // String cv::QRCodeDetector::decodeCurved(Mat img, Mat points, Mat& straight_qrcode = Mat())
  82. //
  83. /**
  84. * Decodes QR code on a curved surface in image once it's found by the detect() method.
  85. *
  86. * Returns UTF8-encoded output string or empty string if the code cannot be decoded.
  87. * @param img grayscale or color (BGR) image containing QR code.
  88. * @param points Quadrangle vertices found by detect() method (or some other algorithm).
  89. * @param straight_qrcode The optional output image containing rectified and binarized QR code
  90. */
  91. - (NSString*)decodeCurved:(Mat*)img points:(Mat*)points straight_qrcode:(Mat*)straight_qrcode NS_SWIFT_NAME(decodeCurved(img:points:straight_qrcode:));
  92. /**
  93. * Decodes QR code on a curved surface in image once it's found by the detect() method.
  94. *
  95. * Returns UTF8-encoded output string or empty string if the code cannot be decoded.
  96. * @param img grayscale or color (BGR) image containing QR code.
  97. * @param points Quadrangle vertices found by detect() method (or some other algorithm).
  98. */
  99. - (NSString*)decodeCurved:(Mat*)img points:(Mat*)points NS_SWIFT_NAME(decodeCurved(img:points:));
  100. //
  101. // string cv::QRCodeDetector::detectAndDecode(Mat img, Mat& points = Mat(), Mat& straight_qrcode = Mat())
  102. //
  103. /**
  104. * Both detects and decodes QR code
  105. *
  106. * @param img grayscale or color (BGR) image containing QR code.
  107. * @param points optional output array of vertices of the found QR code quadrangle. Will be empty if not found.
  108. * @param straight_qrcode The optional output image containing rectified and binarized QR code
  109. */
  110. - (NSString*)detectAndDecode:(Mat*)img points:(Mat*)points straight_qrcode:(Mat*)straight_qrcode NS_SWIFT_NAME(detectAndDecode(img:points:straight_qrcode:));
  111. /**
  112. * Both detects and decodes QR code
  113. *
  114. * @param img grayscale or color (BGR) image containing QR code.
  115. * @param points optional output array of vertices of the found QR code quadrangle. Will be empty if not found.
  116. */
  117. - (NSString*)detectAndDecode:(Mat*)img points:(Mat*)points NS_SWIFT_NAME(detectAndDecode(img:points:));
  118. /**
  119. * Both detects and decodes QR code
  120. *
  121. * @param img grayscale or color (BGR) image containing QR code.
  122. */
  123. - (NSString*)detectAndDecode:(Mat*)img NS_SWIFT_NAME(detectAndDecode(img:));
  124. //
  125. // string cv::QRCodeDetector::detectAndDecodeCurved(Mat img, Mat& points = Mat(), Mat& straight_qrcode = Mat())
  126. //
  127. /**
  128. * Both detects and decodes QR code on a curved surface
  129. *
  130. * @param img grayscale or color (BGR) image containing QR code.
  131. * @param points optional output array of vertices of the found QR code quadrangle. Will be empty if not found.
  132. * @param straight_qrcode The optional output image containing rectified and binarized QR code
  133. */
  134. - (NSString*)detectAndDecodeCurved:(Mat*)img points:(Mat*)points straight_qrcode:(Mat*)straight_qrcode NS_SWIFT_NAME(detectAndDecodeCurved(img:points:straight_qrcode:));
  135. /**
  136. * Both detects and decodes QR code on a curved surface
  137. *
  138. * @param img grayscale or color (BGR) image containing QR code.
  139. * @param points optional output array of vertices of the found QR code quadrangle. Will be empty if not found.
  140. */
  141. - (NSString*)detectAndDecodeCurved:(Mat*)img points:(Mat*)points NS_SWIFT_NAME(detectAndDecodeCurved(img:points:));
  142. /**
  143. * Both detects and decodes QR code on a curved surface
  144. *
  145. * @param img grayscale or color (BGR) image containing QR code.
  146. */
  147. - (NSString*)detectAndDecodeCurved:(Mat*)img NS_SWIFT_NAME(detectAndDecodeCurved(img:));
  148. //
  149. // bool cv::QRCodeDetector::detectMulti(Mat img, Mat& points)
  150. //
  151. /**
  152. * Detects QR codes in image and returns the vector of the quadrangles containing the codes.
  153. * @param img grayscale or color (BGR) image containing (or not) QR codes.
  154. * @param points Output vector of vector of vertices of the minimum-area quadrangle containing the codes.
  155. */
  156. - (BOOL)detectMulti:(Mat*)img points:(Mat*)points NS_SWIFT_NAME(detectMulti(img:points:));
  157. //
  158. // bool cv::QRCodeDetector::decodeMulti(Mat img, Mat points, vector_string& decoded_info, vector_Mat& straight_qrcode = vector_Mat())
  159. //
  160. /**
  161. * Decodes QR codes in image once it's found by the detect() method.
  162. * @param img grayscale or color (BGR) image containing QR codes.
  163. * @param decoded_info UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
  164. * @param points vector of Quadrangle vertices found by detect() method (or some other algorithm).
  165. * @param straight_qrcode The optional output vector of images containing rectified and binarized QR codes
  166. */
  167. - (BOOL)decodeMulti:(Mat*)img points:(Mat*)points decoded_info:(NSMutableArray<NSString*>*)decoded_info straight_qrcode:(NSMutableArray<Mat*>*)straight_qrcode NS_SWIFT_NAME(decodeMulti(img:points:decoded_info:straight_qrcode:));
  168. /**
  169. * Decodes QR codes in image once it's found by the detect() method.
  170. * @param img grayscale or color (BGR) image containing QR codes.
  171. * @param decoded_info UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
  172. * @param points vector of Quadrangle vertices found by detect() method (or some other algorithm).
  173. */
  174. - (BOOL)decodeMulti:(Mat*)img points:(Mat*)points decoded_info:(NSMutableArray<NSString*>*)decoded_info NS_SWIFT_NAME(decodeMulti(img:points:decoded_info:));
  175. //
  176. // bool cv::QRCodeDetector::detectAndDecodeMulti(Mat img, vector_string& decoded_info, Mat& points = Mat(), vector_Mat& straight_qrcode = vector_Mat())
  177. //
  178. /**
  179. * Both detects and decodes QR codes
  180. * @param img grayscale or color (BGR) image containing QR codes.
  181. * @param decoded_info UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
  182. * @param points optional output vector of vertices of the found QR code quadrangles. Will be empty if not found.
  183. * @param straight_qrcode The optional output vector of images containing rectified and binarized QR codes
  184. */
  185. - (BOOL)detectAndDecodeMulti:(Mat*)img decoded_info:(NSMutableArray<NSString*>*)decoded_info points:(Mat*)points straight_qrcode:(NSMutableArray<Mat*>*)straight_qrcode NS_SWIFT_NAME(detectAndDecodeMulti(img:decoded_info:points:straight_qrcode:));
  186. /**
  187. * Both detects and decodes QR codes
  188. * @param img grayscale or color (BGR) image containing QR codes.
  189. * @param decoded_info UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
  190. * @param points optional output vector of vertices of the found QR code quadrangles. Will be empty if not found.
  191. */
  192. - (BOOL)detectAndDecodeMulti:(Mat*)img decoded_info:(NSMutableArray<NSString*>*)decoded_info points:(Mat*)points NS_SWIFT_NAME(detectAndDecodeMulti(img:decoded_info:points:));
  193. /**
  194. * Both detects and decodes QR codes
  195. * @param img grayscale or color (BGR) image containing QR codes.
  196. * @param decoded_info UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
  197. */
  198. - (BOOL)detectAndDecodeMulti:(Mat*)img decoded_info:(NSMutableArray<NSString*>*)decoded_info NS_SWIFT_NAME(detectAndDecodeMulti(img:decoded_info:));
  199. @end
  200. NS_ASSUME_NONNULL_END