TextDetectionModel.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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 "Model.h"
  14. @class FloatVector;
  15. @class Mat;
  16. @class Point2i;
  17. @class RotatedRect;
  18. NS_ASSUME_NONNULL_BEGIN
  19. // C++: class TextDetectionModel
  20. /**
  21. * Base class for text detection networks
  22. *
  23. * Member of `Dnn`
  24. */
  25. CV_EXPORTS @interface TextDetectionModel : Model
  26. #ifdef __cplusplus
  27. @property(readonly)cv::Ptr<cv::dnn::TextDetectionModel> nativePtrTextDetectionModel;
  28. #endif
  29. #ifdef __cplusplus
  30. - (instancetype)initWithNativePtr:(cv::Ptr<cv::dnn::TextDetectionModel>)nativePtr;
  31. + (instancetype)fromNative:(cv::Ptr<cv::dnn::TextDetectionModel>)nativePtr;
  32. #endif
  33. #pragma mark - Methods
  34. //
  35. // void cv::dnn::TextDetectionModel::detect(Mat frame, vector_vector_Point& detections, vector_float& confidences)
  36. //
  37. /**
  38. * Performs detection
  39. *
  40. * Given the input @p frame, prepare network input, run network inference, post-process network output and return result detections.
  41. *
  42. * Each result is quadrangle's 4 points in this order:
  43. * - bottom-left
  44. * - top-left
  45. * - top-right
  46. * - bottom-right
  47. *
  48. * Use cv::getPerspectiveTransform function to retrieve image region without perspective transformations.
  49. *
  50. * NOTE: If DL model doesn't support that kind of output then result may be derived from detectTextRectangles() output.
  51. *
  52. * @param frame The input image
  53. * @param detections array with detections' quadrangles (4 points per result)
  54. * @param confidences array with detection confidences
  55. */
  56. - (void)detect:(Mat*)frame detections:(NSMutableArray<NSMutableArray<Point2i*>*>*)detections confidences:(FloatVector*)confidences NS_SWIFT_NAME(detect(frame:detections:confidences:));
  57. //
  58. // void cv::dnn::TextDetectionModel::detect(Mat frame, vector_vector_Point& detections)
  59. //
  60. - (void)detect:(Mat*)frame detections:(NSMutableArray<NSMutableArray<Point2i*>*>*)detections NS_SWIFT_NAME(detect(frame:detections:));
  61. //
  62. // void cv::dnn::TextDetectionModel::detectTextRectangles(Mat frame, vector_RotatedRect& detections, vector_float& confidences)
  63. //
  64. /**
  65. * Performs detection
  66. *
  67. * Given the input @p frame, prepare network input, run network inference, post-process network output and return result detections.
  68. *
  69. * Each result is rotated rectangle.
  70. *
  71. * NOTE: Result may be inaccurate in case of strong perspective transformations.
  72. *
  73. * @param frame the input image
  74. * @param detections array with detections' RotationRect results
  75. * @param confidences array with detection confidences
  76. */
  77. - (void)detectTextRectangles:(Mat*)frame detections:(NSMutableArray<RotatedRect*>*)detections confidences:(FloatVector*)confidences NS_SWIFT_NAME(detectTextRectangles(frame:detections:confidences:));
  78. //
  79. // void cv::dnn::TextDetectionModel::detectTextRectangles(Mat frame, vector_RotatedRect& detections)
  80. //
  81. - (void)detectTextRectangles:(Mat*)frame detections:(NSMutableArray<RotatedRect*>*)detections NS_SWIFT_NAME(detectTextRectangles(frame:detections:));
  82. @end
  83. NS_ASSUME_NONNULL_END