QRCodeEncoder.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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. @class QRCodeEncoderParams;
  14. // C++: enum CorrectionLevel (cv.QRCodeEncoder.CorrectionLevel)
  15. typedef NS_ENUM(int, CorrectionLevel) {
  16. CORRECT_LEVEL_L = 0,
  17. CORRECT_LEVEL_M = 1,
  18. CORRECT_LEVEL_Q = 2,
  19. CORRECT_LEVEL_H = 3
  20. };
  21. // C++: enum ECIEncodings (cv.QRCodeEncoder.ECIEncodings)
  22. typedef NS_ENUM(int, ECIEncodings) {
  23. ECI_UTF8 = 26
  24. };
  25. // C++: enum EncodeMode (cv.QRCodeEncoder.EncodeMode)
  26. typedef NS_ENUM(int, EncodeMode) {
  27. MODE_AUTO = -1,
  28. MODE_NUMERIC = 1,
  29. MODE_ALPHANUMERIC = 2,
  30. MODE_BYTE = 4,
  31. MODE_ECI = 7,
  32. MODE_KANJI = 8,
  33. MODE_STRUCTURED_APPEND = 3
  34. };
  35. NS_ASSUME_NONNULL_BEGIN
  36. // C++: class QRCodeEncoder
  37. /**
  38. * Groups the object candidate rectangles.
  39. * rectList Input/output vector of rectangles. Output vector includes retained and grouped rectangles. (The Python list is not modified in place.)
  40. * weights Input/output vector of weights of rectangles. Output vector includes weights of retained and grouped rectangles. (The Python list is not modified in place.)
  41. * groupThreshold Minimum possible number of rectangles minus 1. The threshold is used in a group of rectangles to retain it.
  42. * eps Relative difference between sides of the rectangles to merge them into a group.
  43. *
  44. * Member of `Objdetect`
  45. */
  46. CV_EXPORTS @interface QRCodeEncoder : NSObject
  47. #ifdef __cplusplus
  48. @property(readonly)cv::Ptr<cv::QRCodeEncoder> nativePtr;
  49. #endif
  50. #ifdef __cplusplus
  51. - (instancetype)initWithNativePtr:(cv::Ptr<cv::QRCodeEncoder>)nativePtr;
  52. + (instancetype)fromNative:(cv::Ptr<cv::QRCodeEncoder>)nativePtr;
  53. #endif
  54. #pragma mark - Methods
  55. //
  56. // static Ptr_QRCodeEncoder cv::QRCodeEncoder::create(QRCodeEncoder_Params parameters = QRCodeEncoder::Params())
  57. //
  58. /**
  59. * Constructor
  60. * @param parameters QR code encoder parameters QRCodeEncoder::Params
  61. */
  62. + (QRCodeEncoder*)create:(QRCodeEncoderParams*)parameters NS_SWIFT_NAME(create(parameters:));
  63. /**
  64. * Constructor
  65. */
  66. + (QRCodeEncoder*)create NS_SWIFT_NAME(create());
  67. //
  68. // void cv::QRCodeEncoder::encode(String encoded_info, Mat& qrcode)
  69. //
  70. /**
  71. * Generates QR code from input string.
  72. * @param encoded_info Input string to encode.
  73. * @param qrcode Generated QR code.
  74. */
  75. - (void)encode:(NSString*)encoded_info qrcode:(Mat*)qrcode NS_SWIFT_NAME(encode(encoded_info:qrcode:));
  76. //
  77. // void cv::QRCodeEncoder::encodeStructuredAppend(String encoded_info, vector_Mat& qrcodes)
  78. //
  79. /**
  80. * Generates QR code from input string in Structured Append mode. The encoded message is splitting over a number of QR codes.
  81. * @param encoded_info Input string to encode.
  82. * @param qrcodes Vector of generated QR codes.
  83. */
  84. - (void)encodeStructuredAppend:(NSString*)encoded_info qrcodes:(NSMutableArray<Mat*>*)qrcodes NS_SWIFT_NAME(encodeStructuredAppend(encoded_info:qrcodes:));
  85. @end
  86. NS_ASSUME_NONNULL_END