MSER.h 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  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/features2d.hpp"
  8. #else
  9. #define CV_EXPORTS
  10. #endif
  11. #import <Foundation/Foundation.h>
  12. #import "Feature2D.h"
  13. @class Mat;
  14. @class Point2i;
  15. @class Rect2i;
  16. NS_ASSUME_NONNULL_BEGIN
  17. // C++: class MSER
  18. /**
  19. * Maximally stable extremal region extractor
  20. *
  21. * The class encapsulates all the parameters of the %MSER extraction algorithm (see [wiki
  22. * article](http://en.wikipedia.org/wiki/Maximally_stable_extremal_regions)).
  23. *
  24. * - there are two different implementation of %MSER: one for grey image, one for color image
  25. *
  26. * - the grey image algorithm is taken from: CITE: nister2008linear ; the paper claims to be faster
  27. * than union-find method; it actually get 1.5~2m/s on my centrino L7200 1.2GHz laptop.
  28. *
  29. * - the color image algorithm is taken from: CITE: forssen2007maximally ; it should be much slower
  30. * than grey image method ( 3~4 times )
  31. *
  32. * - (Python) A complete example showing the use of the %MSER detector can be found at samples/python/mser.py
  33. *
  34. * Member of `Features2d`
  35. */
  36. CV_EXPORTS @interface MSER : Feature2D
  37. #ifdef __cplusplus
  38. @property(readonly)cv::Ptr<cv::MSER> nativePtrMSER;
  39. #endif
  40. #ifdef __cplusplus
  41. - (instancetype)initWithNativePtr:(cv::Ptr<cv::MSER>)nativePtr;
  42. + (instancetype)fromNative:(cv::Ptr<cv::MSER>)nativePtr;
  43. #endif
  44. #pragma mark - Methods
  45. //
  46. // static Ptr_MSER cv::MSER::create(int delta = 5, int min_area = 60, int max_area = 14400, double max_variation = 0.25, double min_diversity = .2, int max_evolution = 200, double area_threshold = 1.01, double min_margin = 0.003, int edge_blur_size = 5)
  47. //
  48. /**
  49. * Full constructor for %MSER detector
  50. *
  51. * @param delta it compares `$$(size_{i}-size_{i-delta})/size_{i-delta}$$`
  52. * @param min_area prune the area which smaller than minArea
  53. * @param max_area prune the area which bigger than maxArea
  54. * @param max_variation prune the area have similar size to its children
  55. * @param min_diversity for color image, trace back to cut off mser with diversity less than min_diversity
  56. * @param max_evolution for color image, the evolution steps
  57. * @param area_threshold for color image, the area threshold to cause re-initialize
  58. * @param min_margin for color image, ignore too small margin
  59. * @param edge_blur_size for color image, the aperture size for edge blur
  60. */
  61. + (MSER*)create:(int)delta min_area:(int)min_area max_area:(int)max_area max_variation:(double)max_variation min_diversity:(double)min_diversity max_evolution:(int)max_evolution area_threshold:(double)area_threshold min_margin:(double)min_margin edge_blur_size:(int)edge_blur_size NS_SWIFT_NAME(create(delta:min_area:max_area:max_variation:min_diversity:max_evolution:area_threshold:min_margin:edge_blur_size:));
  62. /**
  63. * Full constructor for %MSER detector
  64. *
  65. * @param delta it compares `$$(size_{i}-size_{i-delta})/size_{i-delta}$$`
  66. * @param min_area prune the area which smaller than minArea
  67. * @param max_area prune the area which bigger than maxArea
  68. * @param max_variation prune the area have similar size to its children
  69. * @param min_diversity for color image, trace back to cut off mser with diversity less than min_diversity
  70. * @param max_evolution for color image, the evolution steps
  71. * @param area_threshold for color image, the area threshold to cause re-initialize
  72. * @param min_margin for color image, ignore too small margin
  73. */
  74. + (MSER*)create:(int)delta min_area:(int)min_area max_area:(int)max_area max_variation:(double)max_variation min_diversity:(double)min_diversity max_evolution:(int)max_evolution area_threshold:(double)area_threshold min_margin:(double)min_margin NS_SWIFT_NAME(create(delta:min_area:max_area:max_variation:min_diversity:max_evolution:area_threshold:min_margin:));
  75. /**
  76. * Full constructor for %MSER detector
  77. *
  78. * @param delta it compares `$$(size_{i}-size_{i-delta})/size_{i-delta}$$`
  79. * @param min_area prune the area which smaller than minArea
  80. * @param max_area prune the area which bigger than maxArea
  81. * @param max_variation prune the area have similar size to its children
  82. * @param min_diversity for color image, trace back to cut off mser with diversity less than min_diversity
  83. * @param max_evolution for color image, the evolution steps
  84. * @param area_threshold for color image, the area threshold to cause re-initialize
  85. */
  86. + (MSER*)create:(int)delta min_area:(int)min_area max_area:(int)max_area max_variation:(double)max_variation min_diversity:(double)min_diversity max_evolution:(int)max_evolution area_threshold:(double)area_threshold NS_SWIFT_NAME(create(delta:min_area:max_area:max_variation:min_diversity:max_evolution:area_threshold:));
  87. /**
  88. * Full constructor for %MSER detector
  89. *
  90. * @param delta it compares `$$(size_{i}-size_{i-delta})/size_{i-delta}$$`
  91. * @param min_area prune the area which smaller than minArea
  92. * @param max_area prune the area which bigger than maxArea
  93. * @param max_variation prune the area have similar size to its children
  94. * @param min_diversity for color image, trace back to cut off mser with diversity less than min_diversity
  95. * @param max_evolution for color image, the evolution steps
  96. */
  97. + (MSER*)create:(int)delta min_area:(int)min_area max_area:(int)max_area max_variation:(double)max_variation min_diversity:(double)min_diversity max_evolution:(int)max_evolution NS_SWIFT_NAME(create(delta:min_area:max_area:max_variation:min_diversity:max_evolution:));
  98. /**
  99. * Full constructor for %MSER detector
  100. *
  101. * @param delta it compares `$$(size_{i}-size_{i-delta})/size_{i-delta}$$`
  102. * @param min_area prune the area which smaller than minArea
  103. * @param max_area prune the area which bigger than maxArea
  104. * @param max_variation prune the area have similar size to its children
  105. * @param min_diversity for color image, trace back to cut off mser with diversity less than min_diversity
  106. */
  107. + (MSER*)create:(int)delta min_area:(int)min_area max_area:(int)max_area max_variation:(double)max_variation min_diversity:(double)min_diversity NS_SWIFT_NAME(create(delta:min_area:max_area:max_variation:min_diversity:));
  108. /**
  109. * Full constructor for %MSER detector
  110. *
  111. * @param delta it compares `$$(size_{i}-size_{i-delta})/size_{i-delta}$$`
  112. * @param min_area prune the area which smaller than minArea
  113. * @param max_area prune the area which bigger than maxArea
  114. * @param max_variation prune the area have similar size to its children
  115. */
  116. + (MSER*)create:(int)delta min_area:(int)min_area max_area:(int)max_area max_variation:(double)max_variation NS_SWIFT_NAME(create(delta:min_area:max_area:max_variation:));
  117. /**
  118. * Full constructor for %MSER detector
  119. *
  120. * @param delta it compares `$$(size_{i}-size_{i-delta})/size_{i-delta}$$`
  121. * @param min_area prune the area which smaller than minArea
  122. * @param max_area prune the area which bigger than maxArea
  123. */
  124. + (MSER*)create:(int)delta min_area:(int)min_area max_area:(int)max_area NS_SWIFT_NAME(create(delta:min_area:max_area:));
  125. /**
  126. * Full constructor for %MSER detector
  127. *
  128. * @param delta it compares `$$(size_{i}-size_{i-delta})/size_{i-delta}$$`
  129. * @param min_area prune the area which smaller than minArea
  130. */
  131. + (MSER*)create:(int)delta min_area:(int)min_area NS_SWIFT_NAME(create(delta:min_area:));
  132. /**
  133. * Full constructor for %MSER detector
  134. *
  135. * @param delta it compares `$$(size_{i}-size_{i-delta})/size_{i-delta}$$`
  136. */
  137. + (MSER*)create:(int)delta NS_SWIFT_NAME(create(delta:));
  138. /**
  139. * Full constructor for %MSER detector
  140. *
  141. */
  142. + (MSER*)create NS_SWIFT_NAME(create());
  143. //
  144. // void cv::MSER::detectRegions(Mat image, vector_vector_Point& msers, vector_Rect& bboxes)
  145. //
  146. /**
  147. * Detect %MSER regions
  148. *
  149. * @param image input image (8UC1, 8UC3 or 8UC4, must be greater or equal than 3x3)
  150. * @param msers resulting list of point sets
  151. * @param bboxes resulting bounding boxes
  152. */
  153. - (void)detectRegions:(Mat*)image msers:(NSMutableArray<NSMutableArray<Point2i*>*>*)msers bboxes:(NSMutableArray<Rect2i*>*)bboxes NS_SWIFT_NAME(detectRegions(image:msers:bboxes:));
  154. //
  155. // void cv::MSER::setDelta(int delta)
  156. //
  157. - (void)setDelta:(int)delta NS_SWIFT_NAME(setDelta(delta:));
  158. //
  159. // int cv::MSER::getDelta()
  160. //
  161. - (int)getDelta NS_SWIFT_NAME(getDelta());
  162. //
  163. // void cv::MSER::setMinArea(int minArea)
  164. //
  165. - (void)setMinArea:(int)minArea NS_SWIFT_NAME(setMinArea(minArea:));
  166. //
  167. // int cv::MSER::getMinArea()
  168. //
  169. - (int)getMinArea NS_SWIFT_NAME(getMinArea());
  170. //
  171. // void cv::MSER::setMaxArea(int maxArea)
  172. //
  173. - (void)setMaxArea:(int)maxArea NS_SWIFT_NAME(setMaxArea(maxArea:));
  174. //
  175. // int cv::MSER::getMaxArea()
  176. //
  177. - (int)getMaxArea NS_SWIFT_NAME(getMaxArea());
  178. //
  179. // void cv::MSER::setPass2Only(bool f)
  180. //
  181. - (void)setPass2Only:(BOOL)f NS_SWIFT_NAME(setPass2Only(f:));
  182. //
  183. // bool cv::MSER::getPass2Only()
  184. //
  185. - (BOOL)getPass2Only NS_SWIFT_NAME(getPass2Only());
  186. //
  187. // String cv::MSER::getDefaultName()
  188. //
  189. - (NSString*)getDefaultName NS_SWIFT_NAME(getDefaultName());
  190. @end
  191. NS_ASSUME_NONNULL_END