TextDetectorCNN.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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/text.hpp"
  8. #import "opencv2/text/textDetector.hpp"
  9. #else
  10. #define CV_EXPORTS
  11. #endif
  12. #import <Foundation/Foundation.h>
  13. #import "TextDetector.h"
  14. @class FloatVector;
  15. @class Mat;
  16. @class Rect2i;
  17. NS_ASSUME_NONNULL_BEGIN
  18. // C++: class TextDetectorCNN
  19. /**
  20. * TextDetectorCNN class provides the functionallity of text bounding box detection.
  21. * This class is representing to find bounding boxes of text words given an input image.
  22. * This class uses OpenCV dnn module to load pre-trained model described in CITE: LiaoSBWL17.
  23. * The original repository with the modified SSD Caffe version: https://github.com/MhLiao/TextBoxes.
  24. * Model can be downloaded from [DropBox](https://www.dropbox.com/s/g8pjzv2de9gty8g/TextBoxes_icdar13.caffemodel?dl=0).
  25. * Modified .prototxt file with the model description can be found in `opencv_contrib/modules/text/samples/textbox.prototxt`.
  26. *
  27. * Member of `Text`
  28. */
  29. CV_EXPORTS @interface TextDetectorCNN : TextDetector
  30. #ifdef __cplusplus
  31. @property(readonly)cv::Ptr<cv::text::TextDetectorCNN> nativePtrTextDetectorCNN;
  32. #endif
  33. #ifdef __cplusplus
  34. - (instancetype)initWithNativePtr:(cv::Ptr<cv::text::TextDetectorCNN>)nativePtr;
  35. + (instancetype)fromNative:(cv::Ptr<cv::text::TextDetectorCNN>)nativePtr;
  36. #endif
  37. #pragma mark - Methods
  38. //
  39. // void cv::text::TextDetectorCNN::detect(Mat inputImage, vector_Rect& Bbox, vector_float& confidence)
  40. //
  41. /**
  42. *
  43. *
  44. * @param inputImage an image expected to be a CV_U8C3 of any size
  45. * @param Bbox a vector of Rect that will store the detected word bounding box
  46. * @param confidence a vector of float that will be updated with the confidence the classifier has for the selected bounding box
  47. */
  48. - (void)detect:(Mat*)inputImage Bbox:(NSMutableArray<Rect2i*>*)Bbox confidence:(FloatVector*)confidence NS_SWIFT_NAME(detect(inputImage:Bbox:confidence:));
  49. //
  50. // static Ptr_TextDetectorCNN cv::text::TextDetectorCNN::create(String modelArchFilename, String modelWeightsFilename)
  51. //
  52. + (TextDetectorCNN*)create:(NSString*)modelArchFilename modelWeightsFilename:(NSString*)modelWeightsFilename NS_SWIFT_NAME(create(modelArchFilename:modelWeightsFilename:));
  53. @end
  54. NS_ASSUME_NONNULL_END