QRCodeDetector.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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. #import "GraphicalCodeDetector.h"
  13. @class Mat;
  14. NS_ASSUME_NONNULL_BEGIN
  15. // C++: class QRCodeDetector
  16. /**
  17. * The QRCodeDetector module
  18. *
  19. * Member of `Objdetect`
  20. */
  21. CV_EXPORTS @interface QRCodeDetector : GraphicalCodeDetector
  22. #ifdef __cplusplus
  23. @property(readonly)cv::Ptr<cv::QRCodeDetector> nativePtrQRCodeDetector;
  24. #endif
  25. #ifdef __cplusplus
  26. - (instancetype)initWithNativePtr:(cv::Ptr<cv::QRCodeDetector>)nativePtr;
  27. + (instancetype)fromNative:(cv::Ptr<cv::QRCodeDetector>)nativePtr;
  28. #endif
  29. #pragma mark - Methods
  30. //
  31. // cv::QRCodeDetector::QRCodeDetector()
  32. //
  33. - (instancetype)init;
  34. //
  35. // QRCodeDetector cv::QRCodeDetector::setEpsX(double epsX)
  36. //
  37. /**
  38. * sets the epsilon used during the horizontal scan of QR code stop marker detection.
  39. * @param epsX Epsilon neighborhood, which allows you to determine the horizontal pattern
  40. * of the scheme 1:1:3:1:1 according to QR code standard.
  41. */
  42. - (QRCodeDetector*)setEpsX:(double)epsX NS_SWIFT_NAME(setEpsX(epsX:));
  43. //
  44. // QRCodeDetector cv::QRCodeDetector::setEpsY(double epsY)
  45. //
  46. /**
  47. * sets the epsilon used during the vertical scan of QR code stop marker detection.
  48. * @param epsY Epsilon neighborhood, which allows you to determine the vertical pattern
  49. * of the scheme 1:1:3:1:1 according to QR code standard.
  50. */
  51. - (QRCodeDetector*)setEpsY:(double)epsY NS_SWIFT_NAME(setEpsY(epsY:));
  52. //
  53. // QRCodeDetector cv::QRCodeDetector::setUseAlignmentMarkers(bool useAlignmentMarkers)
  54. //
  55. /**
  56. * use markers to improve the position of the corners of the QR code
  57. *
  58. * alignmentMarkers using by default
  59. */
  60. - (QRCodeDetector*)setUseAlignmentMarkers:(BOOL)useAlignmentMarkers NS_SWIFT_NAME(setUseAlignmentMarkers(useAlignmentMarkers:));
  61. //
  62. // String cv::QRCodeDetector::decodeCurved(Mat img, Mat points, Mat& straight_qrcode = Mat())
  63. //
  64. /**
  65. * Decodes QR code on a curved surface in image once it's found by the detect() method.
  66. *
  67. * Returns UTF8-encoded output string or empty string if the code cannot be decoded.
  68. * @param img grayscale or color (BGR) image containing QR code.
  69. * @param points Quadrangle vertices found by detect() method (or some other algorithm).
  70. * @param straight_qrcode The optional output image containing rectified and binarized QR code
  71. */
  72. - (NSString*)decodeCurved:(Mat*)img points:(Mat*)points straight_qrcode:(Mat*)straight_qrcode NS_SWIFT_NAME(decodeCurved(img:points:straight_qrcode:));
  73. /**
  74. * Decodes QR code on a curved surface in image once it's found by the detect() method.
  75. *
  76. * Returns UTF8-encoded output string or empty string if the code cannot be decoded.
  77. * @param img grayscale or color (BGR) image containing QR code.
  78. * @param points Quadrangle vertices found by detect() method (or some other algorithm).
  79. */
  80. - (NSString*)decodeCurved:(Mat*)img points:(Mat*)points NS_SWIFT_NAME(decodeCurved(img:points:));
  81. //
  82. // string cv::QRCodeDetector::detectAndDecodeCurved(Mat img, Mat& points = Mat(), Mat& straight_qrcode = Mat())
  83. //
  84. /**
  85. * Both detects and decodes QR code on a curved surface
  86. *
  87. * @param img grayscale or color (BGR) image containing QR code.
  88. * @param points optional output array of vertices of the found QR code quadrangle. Will be empty if not found.
  89. * @param straight_qrcode The optional output image containing rectified and binarized QR code
  90. */
  91. - (NSString*)detectAndDecodeCurved:(Mat*)img points:(Mat*)points straight_qrcode:(Mat*)straight_qrcode NS_SWIFT_NAME(detectAndDecodeCurved(img:points:straight_qrcode:));
  92. /**
  93. * Both detects and decodes QR code on a curved surface
  94. *
  95. * @param img grayscale or color (BGR) image containing QR code.
  96. * @param points optional output array of vertices of the found QR code quadrangle. Will be empty if not found.
  97. */
  98. - (NSString*)detectAndDecodeCurved:(Mat*)img points:(Mat*)points NS_SWIFT_NAME(detectAndDecodeCurved(img:points:));
  99. /**
  100. * Both detects and decodes QR code on a curved surface
  101. *
  102. * @param img grayscale or color (BGR) image containing QR code.
  103. */
  104. - (NSString*)detectAndDecodeCurved:(Mat*)img NS_SWIFT_NAME(detectAndDecodeCurved(img:));
  105. @end
  106. NS_ASSUME_NONNULL_END