SimpleBlobDetector.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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 Point2i;
  14. @class SimpleBlobDetectorParams;
  15. NS_ASSUME_NONNULL_BEGIN
  16. // C++: class SimpleBlobDetector
  17. /**
  18. * Class for extracting blobs from an image. :
  19. *
  20. * The class implements a simple algorithm for extracting blobs from an image:
  21. *
  22. * 1. Convert the source image to binary images by applying thresholding with several thresholds from
  23. * minThreshold (inclusive) to maxThreshold (exclusive) with distance thresholdStep between
  24. * neighboring thresholds.
  25. * 2. Extract connected components from every binary image by findContours and calculate their
  26. * centers.
  27. * 3. Group centers from several binary images by their coordinates. Close centers form one group that
  28. * corresponds to one blob, which is controlled by the minDistBetweenBlobs parameter.
  29. * 4. From the groups, estimate final centers of blobs and their radiuses and return as locations and
  30. * sizes of keypoints.
  31. *
  32. * This class performs several filtrations of returned blobs. You should set filterBy\* to true/false
  33. * to turn on/off corresponding filtration. Available filtrations:
  34. *
  35. * - **By color**. This filter compares the intensity of a binary image at the center of a blob to
  36. * blobColor. If they differ, the blob is filtered out. Use blobColor = 0 to extract dark blobs
  37. * and blobColor = 255 to extract light blobs.
  38. * - **By area**. Extracted blobs have an area between minArea (inclusive) and maxArea (exclusive).
  39. * - **By circularity**. Extracted blobs have circularity
  40. * (`$$\frac{4*\pi*Area}{perimeter * perimeter}$$`) between minCircularity (inclusive) and
  41. * maxCircularity (exclusive).
  42. * - **By ratio of the minimum inertia to maximum inertia**. Extracted blobs have this ratio
  43. * between minInertiaRatio (inclusive) and maxInertiaRatio (exclusive).
  44. * - **By convexity**. Extracted blobs have convexity (area / area of blob convex hull) between
  45. * minConvexity (inclusive) and maxConvexity (exclusive).
  46. *
  47. * Default values of parameters are tuned to extract dark circular blobs.
  48. *
  49. * Member of `Features2d`
  50. */
  51. CV_EXPORTS @interface SimpleBlobDetector : Feature2D
  52. #ifdef __cplusplus
  53. @property(readonly)cv::Ptr<cv::SimpleBlobDetector> nativePtrSimpleBlobDetector;
  54. #endif
  55. #ifdef __cplusplus
  56. - (instancetype)initWithNativePtr:(cv::Ptr<cv::SimpleBlobDetector>)nativePtr;
  57. + (instancetype)fromNative:(cv::Ptr<cv::SimpleBlobDetector>)nativePtr;
  58. #endif
  59. #pragma mark - Methods
  60. //
  61. // static Ptr_SimpleBlobDetector cv::SimpleBlobDetector::create(SimpleBlobDetector_Params parameters = SimpleBlobDetector::Params())
  62. //
  63. + (SimpleBlobDetector*)create:(SimpleBlobDetectorParams*)parameters NS_SWIFT_NAME(create(parameters:));
  64. + (SimpleBlobDetector*)create NS_SWIFT_NAME(create());
  65. //
  66. // String cv::SimpleBlobDetector::getDefaultName()
  67. //
  68. - (NSString*)getDefaultName NS_SWIFT_NAME(getDefaultName());
  69. //
  70. // vector_vector_Point cv::SimpleBlobDetector::getBlobContours()
  71. //
  72. - (NSArray<NSArray<Point2i*>*>*)getBlobContours NS_SWIFT_NAME(getBlobContours());
  73. @end
  74. NS_ASSUME_NONNULL_END