SimpleBlobDetector.h 3.0 KB

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