TextDetectionModel_DB.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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/dnn.hpp"
  8. #import "opencv2/dnn/dnn.hpp"
  9. #else
  10. #define CV_EXPORTS
  11. #endif
  12. #import <Foundation/Foundation.h>
  13. #import "TextDetectionModel.h"
  14. @class Net;
  15. NS_ASSUME_NONNULL_BEGIN
  16. // C++: class TextDetectionModel_DB
  17. /**
  18. * This class represents high-level API for text detection DL networks compatible with DB model.
  19. *
  20. * Related publications: CITE: liao2020real
  21. * Paper: https://arxiv.org/abs/1911.08947
  22. * For more information about the hyper-parameters setting, please refer to https://github.com/MhLiao/DB
  23. *
  24. * Configurable parameters:
  25. * - (float) binaryThreshold - The threshold of the binary map. It is usually set to 0.3.
  26. * - (float) polygonThreshold - The threshold of text polygons. It is usually set to 0.5, 0.6, and 0.7. Default is 0.5f
  27. * - (double) unclipRatio - The unclip ratio of the detected text region, which determines the output size. It is usually set to 2.0.
  28. * - (int) maxCandidates - The max number of the output results.
  29. *
  30. * Member of `Dnn`
  31. */
  32. CV_EXPORTS @interface TextDetectionModel_DB : TextDetectionModel
  33. #ifdef __cplusplus
  34. @property(readonly)cv::Ptr<cv::dnn::TextDetectionModel_DB> nativePtrTextDetectionModel_DB;
  35. #endif
  36. #ifdef __cplusplus
  37. - (instancetype)initWithNativePtr:(cv::Ptr<cv::dnn::TextDetectionModel_DB>)nativePtr;
  38. + (instancetype)fromNative:(cv::Ptr<cv::dnn::TextDetectionModel_DB>)nativePtr;
  39. #endif
  40. #pragma mark - Methods
  41. //
  42. // cv::dnn::TextDetectionModel_DB::TextDetectionModel_DB(Net network)
  43. //
  44. /**
  45. * Create text detection algorithm from deep learning network.
  46. * @param network Net object.
  47. */
  48. - (instancetype)initWithNetwork:(Net*)network;
  49. //
  50. // cv::dnn::TextDetectionModel_DB::TextDetectionModel_DB(string model, string config = "")
  51. //
  52. /**
  53. * Create text detection model from network represented in one of the supported formats.
  54. * An order of @p model and @p config arguments does not matter.
  55. * @param model Binary file contains trained weights.
  56. * @param config Text file contains network configuration.
  57. */
  58. - (instancetype)initWithModel:(NSString*)model config:(NSString*)config;
  59. /**
  60. * Create text detection model from network represented in one of the supported formats.
  61. * An order of @p model and @p config arguments does not matter.
  62. * @param model Binary file contains trained weights.
  63. */
  64. - (instancetype)initWithModel:(NSString*)model;
  65. //
  66. // TextDetectionModel_DB cv::dnn::TextDetectionModel_DB::setBinaryThreshold(float binaryThreshold)
  67. //
  68. - (TextDetectionModel_DB*)setBinaryThreshold:(float)binaryThreshold NS_SWIFT_NAME(setBinaryThreshold(binaryThreshold:));
  69. //
  70. // float cv::dnn::TextDetectionModel_DB::getBinaryThreshold()
  71. //
  72. - (float)getBinaryThreshold NS_SWIFT_NAME(getBinaryThreshold());
  73. //
  74. // TextDetectionModel_DB cv::dnn::TextDetectionModel_DB::setPolygonThreshold(float polygonThreshold)
  75. //
  76. - (TextDetectionModel_DB*)setPolygonThreshold:(float)polygonThreshold NS_SWIFT_NAME(setPolygonThreshold(polygonThreshold:));
  77. //
  78. // float cv::dnn::TextDetectionModel_DB::getPolygonThreshold()
  79. //
  80. - (float)getPolygonThreshold NS_SWIFT_NAME(getPolygonThreshold());
  81. //
  82. // TextDetectionModel_DB cv::dnn::TextDetectionModel_DB::setUnclipRatio(double unclipRatio)
  83. //
  84. - (TextDetectionModel_DB*)setUnclipRatio:(double)unclipRatio NS_SWIFT_NAME(setUnclipRatio(unclipRatio:));
  85. //
  86. // double cv::dnn::TextDetectionModel_DB::getUnclipRatio()
  87. //
  88. - (double)getUnclipRatio NS_SWIFT_NAME(getUnclipRatio());
  89. //
  90. // TextDetectionModel_DB cv::dnn::TextDetectionModel_DB::setMaxCandidates(int maxCandidates)
  91. //
  92. - (TextDetectionModel_DB*)setMaxCandidates:(int)maxCandidates NS_SWIFT_NAME(setMaxCandidates(maxCandidates:));
  93. //
  94. // int cv::dnn::TextDetectionModel_DB::getMaxCandidates()
  95. //
  96. - (int)getMaxCandidates NS_SWIFT_NAME(getMaxCandidates());
  97. @end
  98. NS_ASSUME_NONNULL_END